mariadb/mysql-test/suite/innodb/t/innodb-dict.test
Marko Mäkelä 9608773f75 MDEV-4750 follow-up: Reduce disabling innodb_stats_persistent
This essentially reverts commit 4e89ec6692
and only disables InnoDB persistent statistics for tests where it is
desirable. By design, InnoDB persistent statistics will not be updated
except by ANALYZE TABLE or by STATS_AUTO_RECALC.

The internal transactions that update persistent InnoDB statistics
in background tasks (with innodb_stats_auto_recalc=ON) may cause
nondeterministic query plans or interfere with some tests that deal
with other InnoDB internals, such as the purge of transaction history.
2021-08-31 13:55:02 +03:00

32 lines
1 KiB
Text

--source include/have_innodb.inc
#
# Fix MySQL Bug#20755615: InnoDB compares column names case sensitively,
# while according to Storage Engine API column names should be compared
# case insensitively. This can cause FRM and InnoDB data dictionary to
# go out of sync:
#
CREATE TABLE t1 (D INT) ENGINE=innodb;
INSERT INTO t1 VALUES (10);
ALTER TABLE t1 MODIFY COLUMN d INT;
ALTER TABLE t1 ADD INDEX my_d (d);
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9);
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
EXPLAIN SELECT d FROM t1 WHERE d = 5;
EXPLAIN SELECT D FROM t1 WHERE D = 5;
ALTER TABLE t1 DROP INDEX my_d;
ALTER TABLE t1 MODIFY COLUMN D INT;
ANALYZE TABLE t1;
ALTER TABLE t1 ADD INDEX my_d (D);
EXPLAIN SELECT d FROM t1 WHERE d = 5;
EXPLAIN SELECT D FROM t1 WHERE D = 5;
SHOW CREATE TABLE t1;
DROP TABLE t1;