Debian Codegraph @

mysql-test/suite/innodb/r/index-lock-mode.result

raw
1 create table t1 (f1 int primary key, f2 int, unique key k1(f2)) engine=innodb;
2 show create table t1;
3 Table Create Table
4 t1 CREATE TABLE `t1` (
5 `f1` int NOT NULL,
6 `f2` int DEFAULT NULL,
7 PRIMARY KEY (`f1`),
8 UNIQUE KEY `k1` (`f2`)
9 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
10 insert into t1(f1, f2) values (1, 10);
11 insert into t1(f1, f2) values (2, 55);
12 set debug = '+d,idx_mimic_not_committed';
13 update t1 set f2 = 55 where f1 = 1;
14 ERROR 23000: Duplicate entry '55' for key 't1.k1'
15 set debug = '-d,idx_mimic_not_committed';
16 drop table t1;