15.
MySQL 5.7の新機能
MySQL :: MySQL 5.7 Reference Manual :: 1.4 What Is
New in MySQL 5.7
MySQL :: MySQL 5.7 Release Notes
Complete list of new features in MySQL 5.7
MySQL 5.7の新機能完全リスト Yakst
⽇々の覚書: 5.7
14/85
17.
show_compatibility_56= OFF問題 解決
p̲s.global̲status, p̲s.session̲status,
p̲s.global̲variables, p̲s.session̲variablesはSELECT権
限なしでSELECT可能に(i̲sと同じ扱い)
まあまあ悪くない解決策だと思う
MySQL Bugs: #77732: REGRESSION: replication fails
for insufficient privileges
16/85
18.
5.6までのGTID
今までは2択&オンライン変更不可能
enforce̲gtid̲consistencyもOFF/ONの2択でオンライン変
更不可能
masterslave gtid-mode= OFF gtid-mode= ON
gtid-mode= OFF ○ ×
gtid-mode= ON × ○
17/85
19.
5.7のGTID
masterslave OFF OFF̲PERMISSIVE ON̲PERMISSIVE ON
OFF ○ ○ ○ ×
OFF̲PERMIS
SIVE
○ ○ ○ ×
ON̲PERMISS
IVE
× ○ ○ ○
ON × ○ ○ ○
18/85
27.
ダイナミックレプリケーションフィルター
mysql57> CHANGE REPLICATION FILTER replicate_ignore_db= (mysql, p
erformance_schema);
ERROR 3017 (HY000): This operation cannot be performed with a run
ning slave sql thread; run STOP SLAVE SQL_THREAD first
mysql57> STOP SLAVE sql_thread;
mysql57> CHANGE REPLICATION FILTER replicate_ignore_db= (mysql, p
erformance_schema);
Query OK, 0 rows affected (0.00 sec)
mysql57> START SLAVE sql_thread;
26/85
54.
1テーブル複数トリガー
闇が⾒える
mysql57> CREATE TRIGGER before_insert_1 BEFORE INSERT ON t1 FOR EACH RO
W INSERT INTO t2 SET num = NEW.num, val = NEW.val;
Query OK, 0 rows affected (0.01 sec)
mysql57> CREATE TRIGGER before_insert_2 BEFORE INSERT ON t1 FOR EACH RO
W UPDATE t2 SET val = '残念だったな' WHERE num = NEW.num;
Query OK, 0 rows affected (0.00 sec)
mysql57> INSERT INTO t1 VALUES (1, 'one');
Query OK, 1 row affected (0.00 sec)
mysql57> SELECT * FROM t2;
+-----+--------------------+
| num | val |
+-----+--------------------+
| 1 | 残念だったな |
+-----+--------------------+
1 row in set (0.00 sec)
53/85
59.
offline_mode
クエリーが終わったものから順番に切断(server has gone
awayが返る)
SUPER権限以外はそれ以降接続できなくなる
mysql57> SET GLOBAL offline_mode= 1;
Query OK, 0 rows affected (0.00 sec)
mysql57> show databases;
ERROR 2006 (HY000): MySQL server has gone away
$ mysql57 -uyoku0825
ERROR 3032 (HY000): The server is currently in offline mode
58/85
60.
GET̲LOCKの複数ロック獲得
複数取れるってことは、デッドロックの可能性があるってこ
とだ
デッドロックしてもInnoDBのように他のロックをリリース
はしてくれないから、コネクションを切断するか⾃分で
release_lockかrelease_all_locksしてやらないとダメ
ERROR 3058 (HY000): Deadlock found when trying to get user-level
lock; try rolling back transaction/releasing locks and restartin
g lock acquisition.
59/85
61.
--require-secure-transport
SSL接続を強制
ソケット接続には関係なし
オンライン変更可能
mysql57> SET GLOBAL require_secure_transport= 1;
Query OK, 0 rows affected (0.00 sec)
$ mysql57 --protocol=tcp
ERROR 3159 (HY000): Connections using insecure transport are proh
ibited while --require_secure_transport=ON.
60/85
81.
innodb_default_row_format
The innodb_file_format configuration option is ignored if a tabl
e is created or altered to use ROW_FORMAT=DYNAMIC. For example, i
nnodb_file_format=Antelope is ignored if you create a table with
a DYNAMIC row format. The Barracuda file format is used instead.
80/85
Be the first to comment