Debian Codegraph @

mysql-test/suite/binlog_gtid/t/binlog_shutdown_hang.test

raw
1 # ==== Purpose ====
2 #
3 # Test verifies that server shutdown doesn't hang when
4 #
5 # * Gtid's are enabled.
6 # * AUTOCOMMIT=0
7 # * super_read_only=ON
8 #
9 # ==== Implementation ====
10 #
11 # Do some operations on master like CREATE/INSERT so that GTIDs are generated.
12 # Shutdown and restart the server.
13 # Shutdown should not hang.
14 # Upon restart verify the content of 'gtid_executed' table.
15 #
16 # ==== References ====
17 #
18 # Bug#28183718: CANNOT SHUTDOWN MYSQLD WHEN LAST BINLOG HAS
19 # GTIDS TO SAVE AND AUTOCOMMIT=0
20 #
21
22 # For reseting mysql.gtid_executed table
23 RESET MASTER;
24
25 CREATE TABLE t (f INT PRIMARY KEY) ENGINE=INNODB;
26
27 INSERT INTO t VALUES (10);
28
29 SET GLOBAL autocommit= 0;
30 SET GLOBAL super_read_only= ON;
31
32 --source include/restart_mysqld.inc
33
34 --let $master_uuid= `SELECT @@GLOBAL.SERVER_UUID`
35
36 --echo #
37 --echo # Verify that we can get correct gtid sets after server restarts
38 --echo #
39 --let $assert_text= committed gtid set is MASTER_UUID:1-2
40 --let $assert_cond= @@GLOBAL.GTID_EXECUTED = "$master_uuid:1-2"
41 --source include/assert.inc
42
43 FLUSH LOGS;
44 --replace_result $master_uuid MASTER_UUID
45 SELECT * FROM mysql.gtid_executed;
46
47 DROP TABLE t;
48
49 # Cleanup
50 RESET MASTER;