Skip to content

Don't dump mysql.gtid_executed #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions client/mysqldump.c
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,9 @@ static int get_options(int *argc, char ***argv)
if (my_hash_insert(&ignore_table,
(uchar*) my_strdup(PSI_NOT_INSTRUMENTED,
"mysql.apply_status", MYF(MY_WME))) ||
my_hash_insert(&ignore_table,
(uchar*) my_strdup(PSI_NOT_INSTRUMENTED,
"mysql.gtid_executed", MYF(MY_WME))) ||
my_hash_insert(&ignore_table,
(uchar*) my_strdup(PSI_NOT_INSTRUMENTED,
"mysql.schema", MYF(MY_WME))) ||
Expand Down
12 changes: 12 additions & 0 deletions mysql-test/r/bug82848.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
RESET MASTER;
USE test;
CREATE TABLE t1 (id SERIAL);
FLUSH LOGS;
PURGE BINARY LOGS BEFORE NOW();
Warnings:
Warning 1868 file ./master-bin.000002 was not purged because it is the active log file.
INSERT INTO t1 VALUES(NULL),(NULL),(NULL);
RESET MASTER;
# restart
1
DROP TABLE t1;
22 changes: 22 additions & 0 deletions mysql-test/t/bug82848.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
--source include/have_gtid.inc
--source include/force_restart.inc

RESET MASTER;
USE test;
CREATE TABLE t1 (id SERIAL);
FLUSH LOGS;
PURGE BINARY LOGS BEFORE NOW();
INSERT INTO t1 VALUES(NULL),(NULL),(NULL);
--exec $MYSQL_DUMP --all-databases --triggers --routines --events --master-data=2 > $MYSQLTEST_VARDIR/tmp/bug82848.sql 2> /dev/null

RESET MASTER;
--exec $MYSQL --force < $MYSQLTEST_VARDIR/tmp/bug82848.sql
--let $gtid_executed_before= `SELECT @@GLOBAL.GTID_EXECUTED`

--source include/restart_mysqld.inc
--let $gtid_executed_after= `SELECT @@GLOBAL.GTID_EXECUTED`

--let $gtid_diff= `SELECT '$gtid_executed_before' = '$gtid_executed_after'`
--echo $gtid_diff

DROP TABLE t1;