Debian Codegraph @

mysql-test/suite/gcol/t/innodb_prefix_index_check.test

raw
1 --source include/have_innodb.inc
2
3 --echo #Bug #22445211 GCOLS: SIMPLE DML, FAILING ASSERTION:
4 --echo #!CURSOR->INDEX->IS_COMMITTED()
5
6 --echo #Create and alter table examples for virtual column for full
7 --echo #column index followed by prefix index.
8
9 CREATE TABLE t1(
10 f1 INT DEFAULT NULL,
11 f2 CHAR(2) GENERATED ALWAYS AS ('11') VIRTUAL,
12 f3 INT,
13 UNIQUE KEY(f1),
14 UNIQUE KEY(f3,f1),
15 KEY(f2,f1),
16 key(f1,f2(1))
17 )ENGINE=INNODB;
18
19 REPLACE INTO t1(f3) VALUES (1),(1);
20
21 DROP TABLE t1;
22
23 --echo #Create and alter table examples for full column index followed by prefix index.
24
25 CREATE TABLE t1(
26 f1 VARCHAR(100),
27 f2 char(2),
28 KEY(f1,f2),
29 KEY(f1(5)))ENGINE=INNODB;
30
31 REPLACE INTO t1(f2) VALUES (1),(1);
32
33 ALTER TABLE t1 ADD INDEX(f2,f1);
34
35 DROP TABLE t1;
36
37 --echo #Create and alter table examples for small prefix index followed by large
38 --echo #prefix index.
39
40 CREATE TABLE t1(
41 f1 VARCHAR(100),
42 f2 char(2),
43 KEY(f1(5),f2),
44 KEY(f1(10)))ENGINE=INNODB;
45
46 REPLACE INTO t1(f2) VALUES (1),(1);
47
48 ALTER TABLE t1 ADD INDEX(f2,f1);
49
50 DROP TABLE t1;
51
52 --echo #Create and alter table examples for prefix index followed by full column
53 --echo #index.
54
55 CREATE TABLE t1(
56 f1 VARCHAR(100),
57 f2 char(2),
58 KEY(f1(5),f2),
59 KEY(f1))ENGINE=INNODB;
60
61 REPLACE INTO t1(f2) VALUES (1),(1);
62
63 ALTER TABLE t1 ADD INDEX(f2,f1);
64
65 DROP TABLE t1;