Current Path : /home/usr.opt/mysql57/mysql-test/t/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //home/usr.opt/mysql57/mysql-test/t/mysqldump_gtid_state.test |
--echo # --echo # Bug#32843447: GTID_PURGED IS GETTING EMPTY AND GTID_EXECUTED IS --echo # GETTING UPDATED AFTER RESTARTING MYSQL --echo # # Embedded server doesn't support external clients --source include/not_embedded.inc --source include/have_gtid.inc --let $master_uuid= `SELECT @@GLOBAL.SERVER_UUID` CREATE TABLE t (a INT PRIMARY KEY, b INT); INSERT INTO t VALUES (1, 1); INSERT INTO t VALUES (2, 1); INSERT INTO t VALUES (3, 1); INSERT INTO t VALUES (4, 1); INSERT INTO t VALUES (5, 1); INSERT INTO t VALUES (6, 1); FLUSH LOGS; --echo # BEFORE RESET --let $assert_text= Committed gtids :- MASTER_UUID:1-7 --let $assert_cond= "[SELECT @@GLOBAL.GTID_EXECUTED]" = "$master_uuid:1-7" --source include/assert.inc --let $assert_text= No purged gtids --let $assert_cond= "[SELECT @@GLOBAL.GTID_PURGED]" = "" --source include/assert.inc --replace_result $master_uuid MASTER_UUID SELECT * FROM mysql.gtid_executed; --echo # MYSQLDUMP SKIPING THE DROP DATABASE FOR MYSQL SCHEMA USING THE OPTION --skip-mysql-schema --let $dump_file_without_mysql = $MYSQLTEST_VARDIR/tmp/rpl_gtid_state_after_restore_without_mysql.sql --exec $MYSQL_DUMP --socket=$MASTER_MYSOCK --single-transaction --add-drop-database --skip-mysql-schema --databases mysql -uroot > $dump_file_without_mysql --let SEARCH_FILE= $dump_file_without_mysql --let SEARCH_PATTERN=DROP DATABASE IF EXISTS `mysql` --source include/search_pattern.inc --echo # MYSQLDUMP WITHOUT SKIPING THE DROP DATABASE FOR MYSQL SCHEMA --let $dump_file_with_mysql = $MYSQLTEST_VARDIR/tmp/rpl_gtid_state_after_restore_with_mysql.sql --exec $MYSQL_DUMP --socket=$MASTER_MYSOCK --single-transaction --add-drop-database --databases mysql -uroot > $dump_file_with_mysql --let SEARCH_FILE= $dump_file_with_mysql --let SEARCH_PATTERN=DROP DATABASE IF EXISTS `mysql` --source include/search_pattern.inc --echo # RESET RESET MASTER; --echo # AFTER RESET --let $assert_text= No committed gtids after RESET --let $assert_cond= "[SELECT @@GLOBAL.GTID_EXECUTED]" = "" --source include/assert.inc --let $assert_text= No purged gtids after RESET --let $assert_cond= "[SELECT @@GLOBAL.GTID_PURGED]" = "" --source include/assert.inc --replace_result $master_uuid MASTER_UUID SELECT * FROM mysql.gtid_executed; --echo # DUMP RESTORE WITH THE DUMP FILE HAVING DROP DATABASE ON MYSQL SCHEMA. --exec $MYSQL -h localhost -P $MASTER_MYPORT < $dump_file_with_mysql --echo # AFTER RESTORE --let $assert_text= Committed gtids after restore :- MASTER_UUID:1-7 --let $assert_cond= "[SELECT @@GLOBAL.GTID_EXECUTED]" = "$master_uuid:1-7" --source include/assert.inc --let $assert_text= Purged gtids after restore :- MASTER_UUID:1-7 --let $assert_cond= "[SELECT @@GLOBAL.GTID_PURGED]" = "$master_uuid:1-7" --source include/assert.inc --replace_result $master_uuid MASTER_UUID SELECT * FROM mysql.gtid_executed; --echo # INSERT INSERT INTO t VALUES (7, 1); INSERT INTO t VALUES (8, 1); INSERT INTO t VALUES (9, 1); --echo # AFTER INSERTING --let $assert_text= Committed gtids after inserting :- MASTER_UUID:1-10 --let $assert_cond= "[SELECT @@GLOBAL.GTID_EXECUTED]" = "$master_uuid:1-10" --source include/assert.inc --let $assert_text= Purged gtids after inserting :- MASTER_UUID:1-7 --let $assert_cond= "[SELECT @@GLOBAL.GTID_PURGED]" = "$master_uuid:1-7" --source include/assert.inc --replace_result $master_uuid MASTER_UUID SELECT * FROM mysql.gtid_executed; --let $gtid_executed = `SELECT @@GLOBAL.gtid_executed` --echo # RESTART --source include/restart_mysqld.inc --echo # AFTER RESTART --let $assert_text= Committed gtids after restart :- MASTER_UUID:1-10 --let $assert_cond= "[SELECT @@GLOBAL.GTID_EXECUTED]" = "$master_uuid:1-10" --source include/assert.inc --let $assert_text= Purged gtids after restart :- MASTER_UUID:1-7 --let $assert_cond= "[SELECT @@GLOBAL.GTID_PURGED]" = "$master_uuid:1-7" --source include/assert.inc --replace_result $master_uuid MASTER_UUID SELECT * FROM mysql.gtid_executed; --let $assert_text = GTID_EXECUTED is correct after the restart --let $assert_cond = "[SELECT @@GLOBAL.gtid_executed]" = "$gtid_executed" --source include/assert.inc CALL mtr.add_suppression(".*InnoDB: Table `mysql`.`innodb_table_stats` not found.*"); SHOW CREATE TABLE `mysql`.`innodb_table_stats`; --echo #CLEANUP DROP TABLE t; RESET MASTER; --source include/restart_mysqld.inc