Commit 009e872b authored by Marko Mäkelä's avatar Marko Mäkelä

Merge a test case from MySQL 5.7 (no code fix needed)

parent d4ea179e
......@@ -900,3 +900,30 @@ SELECT b FROM t1 WHERE b = 0;
ERROR HY000: Table definition has changed, please retry transaction
disconnect con1;
DROP TABLE t1;
#
# Bug#26390658 RENAMING A PARTITIONED TABLE DOES NOT UPDATE
# MYSQL.INNODB_TABLE_STATS
#
CREATE DATABASE test_jfg;
CREATE TABLE test_jfg.test_jfg1 (id int(10) unsigned NOT NULL,PRIMARY
KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=latin1 STATS_PERSISTENT=1;
CREATE TABLE test_jfg.test_jfg2 (id int(10) unsigned NOT NULL,PRIMARY
KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=latin1 STATS_PERSISTENT=1
PARTITION BY RANGE ( id ) (PARTITION p1000 VALUES LESS THAN (1000)
ENGINE = InnoDB,PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE =
InnoDB);
SELECT database_name, table_name FROM mysql.innodb_table_stats WHERE
database_name = 'test_jfg';
database_name table_name
test_jfg test_jfg1
test_jfg test_jfg2#P#p1000
test_jfg test_jfg2#P#pmax
RENAME TABLE test_jfg.test_jfg1 TO test_jfg.test_jfg11;
RENAME TABLE test_jfg.test_jfg2 TO test_jfg.test_jfg12;
SELECT database_name, table_name FROM mysql.innodb_table_stats WHERE
database_name = 'test_jfg';
database_name table_name
test_jfg test_jfg11
test_jfg test_jfg12#P#p1000
test_jfg test_jfg12#P#pmax
DROP DATABASE test_jfg;
......@@ -991,3 +991,31 @@ SELECT b FROM t1 WHERE b = 0;
SELECT b FROM t1 WHERE b = 0;
--disconnect con1
DROP TABLE t1;
--echo #
--echo # Bug#26390658 RENAMING A PARTITIONED TABLE DOES NOT UPDATE
--echo # MYSQL.INNODB_TABLE_STATS
--echo #
CREATE DATABASE test_jfg;
CREATE TABLE test_jfg.test_jfg1 (id int(10) unsigned NOT NULL,PRIMARY
KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=latin1 STATS_PERSISTENT=1;
CREATE TABLE test_jfg.test_jfg2 (id int(10) unsigned NOT NULL,PRIMARY
KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=latin1 STATS_PERSISTENT=1
PARTITION BY RANGE ( id ) (PARTITION p1000 VALUES LESS THAN (1000)
ENGINE = InnoDB,PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE =
InnoDB);
--replace_result #p# #P#
SELECT database_name, table_name FROM mysql.innodb_table_stats WHERE
database_name = 'test_jfg';
RENAME TABLE test_jfg.test_jfg1 TO test_jfg.test_jfg11;
RENAME TABLE test_jfg.test_jfg2 TO test_jfg.test_jfg12;
--replace_result #p# #P#
SELECT database_name, table_name FROM mysql.innodb_table_stats WHERE
database_name = 'test_jfg';
DROP DATABASE test_jfg;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment