Debian Codegraph @

mysql-test/suite/innodb/t/index_length.test

raw
1 --source include/have_innodb.inc
2 --source include/test_db_charset_latin1.inc
3
4 --connect (stop_purge,localhost,root)
5 # Prevent the purge of history from acquiring a table handle.
6 START TRANSACTION WITH CONSISTENT SNAPSHOT;
7 --connection default
8
9 CREATE TABLE t1(a INT PRIMARY KEY, b VARCHAR(1024))
10 ENGINE=InnoDB STATS_PERSISTENT=1;
11 INSERT INTO t1 VALUES (1,REPEAT('b',1024));
12
13 SELECT index_length FROM information_schema.tables
14 WHERE table_schema = 'test' AND table_name = 't1';
15 ALTER TABLE t1 ADD INDEX b (b(800));
16 SELECT FLOOR(index_length/@@innodb_page_size) FROM information_schema.tables
17 WHERE table_schema = 'test' AND table_name = 't1';
18 ALTER TABLE t1 ADD INDEX ba (b(800),a);
19 SELECT FLOOR(index_length/@@innodb_page_size) FROM information_schema.tables
20 WHERE table_schema = 'test' AND table_name = 't1';
21 disconnect stop_purge;
22 DROP TABLE t1;
23
24 --echo #
25 --echo # MDEV-22855 Assertion (!field->prefix_len ||
26 --echo # field->fixed_len == field->prefix_len)
27 --echo # failed in btr_node_ptr_max_size
28 --echo #
29 CREATE TABLE t1(c CHAR(194) CHARACTER SET UTF32, KEY k1(c(193)))ENGINE=InnoDB;
30 INSERT INTO t1 SET c='';
31 DROP TABLE t1;
32 --echo # End of 10.4 tests
33
34 --source include/test_db_charset_restore.inc