2016.06.03

MySQL

MySQL Community Server 5.7.13がリリースされました

オリジナル版:https://lists.mysql.com/announce/1076

2016年6月2日に、MySQL 5.7.13がリリースされました。同製品は、General Availability(GA版)となります。

公式ブログでのアナウンスはこちら:http://mysqlserverteam.com/whats-new-in-mysql-5-7-generally-available/

Changes in MySQL 5.7.13(主な変更点)

Account Management Notes(アカウント管理)

* In MySQL 5.7.8, the maximum length of MySQL user names was increased from 16 to 32 characters, but some applicable contexts for this increase were overlooked. Additional changes in maximum user name length now have been applied:

The size of these mysql system table columns is increased:
   The definer column of the event and proc tables
   The grantor column of the procs_priv and tables_priv tables

In each case, the column previously was defined as CHAR(77), where 77 was chosen to permit a user_name@host_name string containing a user name up to 16 characters, a @ character, and a host name up to 60 characters. Each column now is defined as CHAR(93), reflecting an increase in permitted user name length from 16 to 32 characters.

  MySQL5.7.8では、MySQLユーザの名前の上限が16文字から32文字に引き上げられました。しかし、これに連動する一部の関連情報を合わせて変更することが見落とされていました。そのため、ユーザ名の最大長に関して、追加で以下の変更を適用しています:
  
  mysqlシステムテーブルのカラムのサイズが引き上げられています:
    ・event, proc テーブルの定義カラム
    ・procs_priv, tables_priv テーブルの権限カラム

これらのカラムは以前まで、CHAR(77)と定義されていました。この(77)により、user_name@host_name の形式で設定されるユーザ名が16文字、ホスト名が60文字までとなっていました。これが、新しくCHAR(93)という定義に変更されました。これにより、ユーザ名が32文字まで設定することが可能となりました。

Audit Log Notes(監査ログ)

* The audit_log plugin that forms the basis for MySQL Enterprise Audit now supports fine-grained filtering of events. This enables a reduction in the number of log entries written to the audit log file, which increases overall performance due to fewer write operations during log recording. It also simplifies subsequent audit log processing in terms of readability and processing time.

Fine-grained audit log filtering is rule based, implemented using tables that store filter definitions and a set of user-defined functions (UDFs) that enable filter manipulation. To simplify installing the tables and UDFs along with the audit_log plugin, an installation script is now provided. For more information, see Installing or Uninstalling MySQL Enterprise Audit, and Audit Log Filtering.

By default, audit log filtering now logs no auditable events for any users. This differs from the pre-MySQL 5.7.13 legacy audit log, which logs all auditable events for all users. To produce log-everything behavior, see the installation instructions.

  MySQL Enterprise Audit機能の根幹となる、audit_logプラグインが新しく fine-grained フィルタリングをサポートするようになりました。これにより、ログに記録されるイベントの制限が可能となり、ログ書き込み処理による負荷が軽減されることが期待されます。また、ログの可読性や効率の向上にもつながります。

fine-grained フィルタリングは、ルールベースであり、ユーザ定義関数を利用して独自のフィルタリングを実現できます。導入の簡略化のためのインストールスクリプトも用意しています。詳細な情報は、「Installing or Uninstalling MySQL Enterprise Audit」,「Audit Log Filtering」のページをご確認ください。

デフォルトでは、監査可能なイベントも全てログに記録しない設定になっています。これは、監査可能なイベントは全て記録していた、MySQL5.7.12以前の挙動と異なります。全イベントをログに記録するようにしたい場合は、「installation instructions」をご覧ください。

Configuration Notes(MySQL設定関連)

* On platforms for which systemd support is installed, systemd has the capability of managing multiple MySQL instances. For details, see Configuring Multiple MySQL Instances Using systemd. Consequently, mysqld_multi and mysqld_multi.server are not installed because they are unnecessary. (Bug #81093, Bug #23134620)

  sysyemdサポートがインストール済みのプラットフォームならば、systemdはMySQLのマルチインスタンス機能との互換性を持っています。詳細は「Configuring Multiple MySQL Instances Using systemd」のページをご確認ください。従って、mysqld_multi, mysqld_multi.serverコマンドは、不要となるためインストールされていません。

Security Notes(セキュリティ)

* The linked OpenSSL library for the MySQL Commercial Server has been updated to version 1.0.1t. Issues fixed in the new version are described at http://www.openssl.org/news/vulnerabilities.html.

This change does not affect the Oracle-produced MySQL Community build of MySQL Server, which uses the yaSSL library instead. (Bug #23229564)

  MySQLコミュニティサーバとリンクされているOpenSSLのバージョンが、1.0.1tに上がりました。修正点についてはURLをご覧下さい。

  なお、yaSSLライブラリを使用しているMySQLに関しては、上記変更による影響はありません。

Functionality Added or Changed(機能の追加・変更)

* For better separation of output from multiple statements, mysqltest now flushes output sent to stdout when the output destination is not a file. Previously, flushing occurred only for file output. (Bug #21435906)

複数ステートメントの出力結果をより良く分割するため、出力先がファイル以外の時も、mysqltestコマンドは出力をstdoutにフラッシュするようになりました。以前は、この処理は出力先がファイルの時のみに限られていました。

* it is possible to use ALTER TABLE to change the default value of a column col_name, which may change the value of a generated column expression that refers to the column using DEFAULT(col_name). For this reason, ALTER TABLE operations that change the definition of a column now cause a table rebuild if any generated column expression uses DEFAULT(). (Bug #80299, Bug #22680839)

  特定のカラムのデフォルト値を変更するためにALTER TABLE文が使えますが、それによりGenerated Columnのデフォルト値もDEFAULT(col_name)の形に変更となります。そのため、DEFAULT()を設定しているGenerated Columnがある場合、ALTER文を実行するとテーブルの再構築が実行されます。

* This release adds an unquoting extraction operator ->>, sometimes also referred to as an inline path operator, for use with JSON documents stored in MySQL. The new operator is similar to the -> operator, but performs JSON unquoting of the value as well. For a JSON column mycol and JSON path expression mypath, the following three expressions are equivalent:

● JSON_UNQUOTE( JSON_EXTRACT(mycol, "$.mypath") )
● JSON_UNQUOTE(mycol->"$.mypath")
● mycol->>"$.mypath"

The ->> operator can be used in SQL statements wherever JSON_UNQUOTE(JSON_EXTRACT()) would be allowed. This includes (but is not limited to) SELECT lists, WHERE and HAVING clauses, and ORDER BY and GROUP BY clauses.

For more information, see Functions That Search JSON Values, and JSON Path Syntax. (Bug #78736, Bug #21980346)
  
  新しい引用・抽出の演算子として「->>」が追加されました。これは時折インラインパスを示す記号としても使用され、MySQL内のJSONドキュメントでも利用されています。この新しい演算子は原則「->」と同じ意味ですが、値のみの引用符であっても実行してくれます。以下3つの書き方は同じ意味となります。(JSONカラムをmycol, JSONパスをmypathとしています):
  
  ● JSON_UNQUOTE( JSON_EXTRACT(mycol, "$.mypath") )
  ● JSON_UNQUOTE(mycol->"$.mypath")
  ● mycol->>"$.mypath"
  
  「->>」演算子は、JSON_UNQUOTE(JSON_EXTRACT())句が許されていれば、どこでも使用できます。つまり、SELECT list, WHERE, HAVING, ORDER BY, GROUP BYなどです。
  さらに詳しい情報は、「Functions That Search JSON Values」「JSON Path Syntax」のページをご確認ください。

Bugs Fixed(バグ修正)

* InnoDB: A rollback operation run concurrently with an operation involving a generated virtual column caused a server exit. (Bug #23313102)

  【InnoDB】Gererated Virtual Columnを含んだトランザクションをロールバックした時に、サーバがダウンしてしまう不具合を修正しました。
  
* InnoDB: Memory was allocated to I/O slots unnecessarily, causing an apparent memory leak. (Bug #22956469, Bug #80772)

  【InnoDB】メモリが不必要にI/Oスロットに割り当てらて、メモリリークを引き起こしてしまう不具合を修正しました。

* InnoDB: A buffer pool load operation resulted in a “Cannot allocate 0 bytes” error. (Bug #21371070)

  【InnoDB】バッファプールのロード処理が“Cannot allocate 0 bytes”エラーで終了してしまう不具合を修正しました。

* Replication: With gtid_mode=ON, executing an empty query before setting gtid_next made the latter action fail. It was because only statements that do not change the data can be executed before one can successfully change gtid_next, and an empty query was not considered one of those “safe” statements. This fix allows the setting of gtid_next after an empty query. (Bug #22811150)

  【レプリケーション】gtid_mode=ON の時、gtid_next変数をセットする前に空クエリを実行すると、その後の処理がエラーとなる不具合を修正しました。これは、テーブルデータに変更を加えないクエリは、"safe"なステートメントとして判定され、gtid_nextをセットするより先に空クエリが実行されるためです。この修正により、空クエリの後にgtid_nextをセットする挙動が許可されました。

* Replication: Slaves running MySQL 5.7 could not connect to a MySQL 5.5 master due to an error retrieving the server_uuid, which is not part of MySQL 5.5. This was caused by changes in the method of retrieving the server_uuid. (Bug #22748612)

  【レプリケーション】MySQL5.5のserver_uuidの検索が出来ないため、MySQL5.7をMySQL5.5のスレーブにすることが出来なかった不具合を修正しました。

* Replication: mysqldump has been updated to make it compatible with multi-source replication. Now when replication channels other than the default channel are found, mysqldump --dump-slave outputs a CHANGE MASTER TO statement for each replication channel. (Bug #78467, Bug #21855705)

  【レプリケーション】マルチソースレプリケーションとの互換性を保つため、mysqldumpコマンドを改良しました。デフォルト値以外のレプリケーションチャンネルが存在する場合、--dump-slaveオプションを利用すれば各チャンネルに対応した CHANGE MASTER TO 文を出力することが出来ます。

* Allocation of a large number (2^20) of Performance Schema index statistic objects could cause a server exit. (Bug #23188107)

  Performance_Schema のインデックス統計情報に、大きすぎる数字(2^20)を入ってしまうとサーバがダウンする不具合を修正しました。

* If the expression for an indexed generated column contained an AND or OR operator, the optimizer could choose that index too often and create execution plans that produced incorrect results. (Bug #22810883)

  インデックスが貼られたGenerated Columnに対してAND, OR条件が使われていた場合、オプティマイザが適切でない実行計画を選んでしまうことがある不具合を修正しました。
  
* SHOW CREATE TABLE for a table containing a generated column could cause a server exit or produce an Illegal mix of collations error. (Bug #22392268)

  Gerarated Columnを含むテーブルのSHOW CREATE TABLE文を実行すると、サーバダウンもしくは"Illegal mix of collations"エラーが発生する可能性がある不具合を修正しました。

* mysqlpump could exit due to improper handling of error conditions in a dump thread. (Bug #22017120)

  mysqlpump実行時に、dumpスレッドのエラーハンドリングが正常に働かず終了してしまう不具合を修正しました。
  
上記以外にも、さまざまな変更やバグ修正が行われています。それらを全て確認する場合は、下記リリースノートを参照して下さい。
http://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-10.html

 

MySQL5.7は、世界的に注目されているオープンソースデータベース「MySQL」の最新の開発バージョンです。MySQL5.6の後継バージョンにあたり、様々な機能や特徴があります。

・パフォーマンスやスケーラビリティの向上(MySQL5.6の3倍の速度に)

・JSON形式のサポート

・マルチソースレプリケーションの実装

・SYSスキーマの導入

・セキュリティの向上

・InnoDBにおけるGIS(位置データ)の対応

MySQL5.7には、上記以外にも様々な特徴があります。詳細については、下記URLを参照してください。

http://mysqlserverteam.com/whats-new-in-mysql-5-7-generally-available/

新たなサーバにMySQL5.7をインストール、または利用中のMySQLからMySQL5.7にアップグレードする際の情報については、以下を参照してください。

http://dev.mysql.com/doc/refman/5.7/en/installing.html

下記のダウンロードページから、MySQLのソースコード及び多数のプラットフォーム用バイナリが入手可能です。

http://dev.mysql.com/downloads/mysql/

その他、ご不明な点がございましたら、以下の公式リファレンスマニュアルをご利用いただけます。

http://dev.mysql.com/doc/refman/5.7/en/

以上