Skip to content

Commit 9cf57e3

Browse files
committed
Bug#22655287: MYSQLDUMP GENERATES INVALID SCRIPT DUE TO DDL
ON DICTIONARY TABLES Follow-up patch: Remove workarounds from main.mysqldump and sysschema.mysqldump which are no longer needed now that this bug has been fixed.
1 parent 8023346 commit 9cf57e3

File tree

3 files changed

+6
-30
lines changed

3 files changed

+6
-30
lines changed

mysql-test/suite/sysschema/t/mysqldump.test

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
-- source include/not_embedded.inc
33

44
# Dump all databases
5-
# TODO: Allow dump/restore of innodb_index_stats/innodb_table_stats
6-
# See Bug#22655287
7-
--exec $MYSQL_DUMP -uroot --all-databases --ignore-table=mysql.innodb_index_stats --ignore-table=mysql.innodb_table_stats > $MYSQLTEST_VARDIR/tmp/bug20902791.sql
5+
--exec $MYSQL_DUMP -uroot --all-databases > $MYSQLTEST_VARDIR/tmp/bug20902791.sql
86

97
# Save a copy of the user/tables_priv tables, to restore later
108
# Otherwise the final mysql_upgrade will REPLACE and update timestamps etc.

mysql-test/t/mysqldump.test

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,8 +1426,6 @@ insert into u1 values (4);
14261426
create view v1 (c1) as select * from t1;
14271427

14281428
# Backup should not fail for Bug#21527. Flush priviliges test begins.
1429-
# TODO (Bug#22655287): mysqldump should skip the innodb_*_stats tables.
1430-
# Restoring the dump will cause errors (see below).
14311429
--exec $MYSQL_DUMP --skip-comments --add-drop-table --flush-privileges --ignore-table=mysql.general_log --ignore-table=mysql.slow_log --databases mysqldump_myDB mysql > $MYSQLTEST_VARDIR/tmp/bug21527.sql
14321430

14331431
# Clean up
@@ -1446,11 +1444,7 @@ flush privileges;
14461444
--echo # Restore. Flush Privileges test ends.
14471445
--echo #
14481446

1449-
# TODO (Bug#22655287): mysqldump should skip the innodb_*_stats tables.
1450-
# Restoring the dump will cause errors. Using '--force' will ignore
1451-
# errors and allow the dump to be restored. Fixing Bug#22655287 should
1452-
# allow the command below to succeed without '--force'.
1453-
--exec $MYSQL --force < $MYSQLTEST_VARDIR/tmp/bug21527.sql
1447+
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug21527.sql
14541448

14551449
# Do as a user
14561450
connection user1;
@@ -1812,8 +1806,6 @@ drop database mysqldump_test_db;
18121806
#
18131807
# Bug#26121 mysqldump includes LOCK TABLES general_log WRITE
18141808
#
1815-
# TODO: Allow dump/restore of innodb_index_stats/innodb_table_stats See
1816-
# Bug#22655287
18171809
--exec $MYSQL_DUMP --all-databases > $MYSQLTEST_VARDIR/tmp/bug26121.sql
18181810
# take a backup of sys db.
18191811
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug26121.sql
@@ -1885,9 +1877,7 @@ DROP DATABASE mysqldump_test_db;
18851877
USE test;
18861878
CREATE event e29938 ON SCHEDULE AT '2035-12-31 20:01:23' DO SET @bug29938=29938;
18871879
SHOW EVENTS;
1888-
# TODO: Allow dump/restore of innodb_index_stats/innodb_table_stats
1889-
# See Bug#22655287
1890-
--exec $MYSQL_DUMP --skip-events --all-databases --ignore-table=mysql.innodb_index_stats --ignore-table=mysql.innodb_table_stats > $MYSQLTEST_VARDIR/tmp/bug29938.sql
1880+
--exec $MYSQL_DUMP --skip-events --all-databases > $MYSQLTEST_VARDIR/tmp/bug29938.sql
18911881

18921882
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug29938.sql
18931883
SHOW EVENTS;
@@ -2484,9 +2474,7 @@ while ($colnum)
24842474
}
24852475
--eval CREATE VIEW v1 AS SELECT $str
24862476

2487-
# TODO: Allow dump/restore of innodb_index_stats/innodb_table_stats
2488-
# See Bug#22655287
2489-
--exec $MYSQL_DUMP -uroot --all-databases --ignore-table=mysql.innodb_index_stats --ignore-table=mysql.innodb_table_stats > $MYSQLTEST_VARDIR/tmp/bug17477959.sql
2477+
--exec $MYSQL_DUMP -uroot --all-databases > $MYSQLTEST_VARDIR/tmp/bug17477959.sql
24902478
#Reload of the dump fails without the patch
24912479
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug17477959.sql
24922480
#Cleanup.
@@ -2499,9 +2487,7 @@ DROP VIEW v1;
24992487
CREATE DATABASE `a\\k`;
25002488
CREATE TABLE `a\\k`.t1(i INT);
25012489
SHOW TABLES FROM `a\\k`;
2502-
# TODO: Allow dump/restore of innodb_index_stats/innodb_table_stats
2503-
# See Bug#22655287
2504-
--exec $MYSQL_DUMP -uroot --all-databases --ignore-table=mysql.innodb_index_stats --ignore-table=mysql.innodb_table_stats > $MYSQLTEST_VARDIR/tmp/bug18109728.sql
2490+
--exec $MYSQL_DUMP -uroot --all-databases > $MYSQLTEST_VARDIR/tmp/bug18109728.sql
25052491
DROP DATABASE `a\\k`;
25062492
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug18109728.sql
25072493
SHOW TABLES FROM `a\\k`;
@@ -2626,9 +2612,7 @@ DROP DATABASE dump_generated;
26262612
# take backup of sys schema
26272613
--exec $MYSQL_DUMP --databases sys --routines > $MYSQLTEST_VARDIR/tmp/sys.sql
26282614
# this will not dump sys schema and sys schema routines.
2629-
# TODO: Allow dump/restore of innodb_index_stats/innodb_table_stats
2630-
# See Bug#22655287
2631-
--exec $MYSQL_DUMP --all-databases --ignore-table=mysql.innodb_index_stats --ignore-table=mysql.innodb_table_stats > $MYSQLTEST_VARDIR/tmp/bug21549860.sql
2615+
--exec $MYSQL_DUMP --all-databases > $MYSQLTEST_VARDIR/tmp/bug21549860.sql
26322616
SELECT COUNT(*) FROM INFORMATION_SCHEMA.routines WHERE routine_schema = 'sys';
26332617
DROP DATABASE sys;
26342618
SELECT COUNT(*) FROM INFORMATION_SCHEMA.routines WHERE routine_schema = 'sys';

sql/dd/mtr_readme.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,6 @@ innodb.partition WL6378_ALTER_PARTITION_TABLESPACE
7474
// TEST COMMENTED IN-LINE WITHIN .test FILES
7575
///////////////////////////////////////////////////////////////////
7676

77-
/*
78-
Allow dump/restore of innodb_index_stats and innodb_table_stats.
79-
See Bug#22655287
80-
*/
81-
sysschema.mysqldump WL6378_DDL_ON_DD_TABLE
82-
8377
/** MEDIUM - Joh
8478
Needs understanding of test case scenario and bit more
8579
involved study to re-write these tests. We may or may

0 commit comments

Comments
 (0)