diff options
author | Eugene Kosov <claprix@yandex.ru> | 2020-10-20 20:10:40 +0300 |
---|---|---|
committer | Eugene Kosov <claprix@yandex.ru> | 2020-10-26 17:39:52 +0300 |
commit | 31cde275c26ba5009d16dfc62654884b94b22322 (patch) | |
tree | 22accfbb43d0a36b48831f48224b1162dd29dac9 /mysql-test/suite/innodb/t/instant_alter_index_rename.test | |
parent | 045671d473609fe1947b1ce7775c4aa2e1a6269b (diff) | |
download | mariadb-git-31cde275c26ba5009d16dfc62654884b94b22322.tar.gz |
MDEV-23356 InnoDB: Failing assertion: field->col->mtype == type, crash or ASAN failures in row_sel_convert_mysql_key_to_innobase, InnoDB indexes are inconsistent after INDEX changes
innobase_rename_indexes_cache(): fix corruption of index cache. Index ids
help distinguish indexes when their names clash.
innobase_rename_indexes_cache(): fix corruption of index statistics table.
Use unique temporary names to avoid names clashing.
Reviewed by: Marko Mäkelä
Diffstat (limited to 'mysql-test/suite/innodb/t/instant_alter_index_rename.test')
-rw-r--r-- | mysql-test/suite/innodb/t/instant_alter_index_rename.test | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/t/instant_alter_index_rename.test b/mysql-test/suite/innodb/t/instant_alter_index_rename.test index dd6cee7c860..af66c1027cc 100644 --- a/mysql-test/suite/innodb/t/instant_alter_index_rename.test +++ b/mysql-test/suite/innodb/t/instant_alter_index_rename.test @@ -1,5 +1,6 @@ --source include/have_innodb.inc --source include/have_debug.inc +--source include/have_sequence.inc delimiter |; create function get_index_id(tbl_id int, index_name char(100)) @@ -207,3 +208,22 @@ CHECK TABLE t1 EXTENDED ; DROP TABLE t1; DROP FUNCTION get_index_id; + +--echo # +--echo # MDEV-23356 InnoDB: Failing assertion: field->col->mtype == type, crash or ASAN failures in row_sel_convert_mysql_key_to_innobase, InnoDB indexes are inconsistent after INDEX changes +--echo # + +CREATE TABLE t1 (a INT, b INT, c CHAR(8), + KEY ind1(c), KEY ind2(b)) ENGINE=InnoDB STATS_PERSISTENT=1; + +INSERT INTO t1 SELECT 1, 1, 'a' FROM seq_1_to_100; + +SELECT table_name, index_name, stat_name FROM mysql.innodb_index_stats; + +ALTER TABLE t1 DROP INDEX ind2, ADD INDEX ind3(b), + DROP INDEX ind1, ADD INDEX ind2(c); + +SELECT table_name, index_name, stat_name FROM mysql.innodb_index_stats; + +UPDATE t1 SET a = 1 WHERE c = 'foo'; +DROP TABLE t1; |