Server IP : 104.21.38.3 / Your IP : 172.68.164.57 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/server/mysql/src/mysql-test/t/ |
Upload File : |
--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 # mysqldump will execute FTWRL when used with --single-transaction, --echo # every usage of FTWRL will cause FLUSH TABLES, which causes an --echo # extra GTID. --echo # AFTER RESTORE --let $assert_text= Committed gtids after restore :- MASTER_UUID:1-9 --let $assert_cond= "[SELECT @@GLOBAL.GTID_EXECUTED]" = "$master_uuid:1-9" --source include/assert.inc --let $assert_text= Purged gtids after restore :- MASTER_UUID:1-9 --let $assert_cond= "[SELECT @@GLOBAL.GTID_PURGED]" = "$master_uuid:1-9" --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-12 --let $assert_cond= "[SELECT @@GLOBAL.GTID_EXECUTED]" = "$master_uuid:1-12" --source include/assert.inc --let $assert_text= Purged gtids after inserting :- MASTER_UUID:1-9 --let $assert_cond= "[SELECT @@GLOBAL.GTID_PURGED]" = "$master_uuid:1-9" --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-12 --let $assert_cond= "[SELECT @@GLOBAL.GTID_EXECUTED]" = "$master_uuid:1-12" --source include/assert.inc --let $assert_text= Purged gtids after restart :- MASTER_UUID:1-9 --let $assert_cond= "[SELECT @@GLOBAL.GTID_PURGED]" = "$master_uuid:1-9" --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