Debian Codegraph @

mysql-test/suite/innodb/r/innodb_bug53592.result

raw
1 create table bug53592(a int) engine=innodb row_format=compact;
2 alter table bug53592 add column b text charset utf8;
3 alter table bug53592 add column c blob not null;
4 create index bug53592_b on bug53592(b(81));
5 create unique index bug53592_c on bug53592(c(1));
6 set statement sql_mode = '' for
7 replace into bug53592 values (),();
8 Warnings:
9 Warning 1364 Field 'c' doesn't have a default value
10 check table bug53592;
11 Table Op Msg_type Msg_text
12 test.bug53592 check status OK
13 drop table bug53592;
14 CREATE TABLE bug53592_1(
15 col1 int, col2 int,
16 PRIMARY KEY (col1, col2)
17 ) ENGINE=InnoDB;
18 CREATE TABLE bug53592_2 (
19 col int PRIMARY KEY,
20 FOREIGN KEY (col) REFERENCES bug53592_1 (col1)
21 ON DELETE CASCADE ON UPDATE CASCADE
22 ) ENGINE=InnoDB;
23 INSERT INTO bug53592_1 VALUES (1, 2);
24 INSERT INTO bug53592_1 VALUES (3, 4);
25 INSERT INTO bug53592_2 VALUES (1);
26 INSERT INTO bug53592_2 VALUES (3);
27 UPDATE bug53592_1 SET col1 = 3 WHERE col2 = 2;
28 ERROR 23000: Foreign key constraint for table 'bug53592_1', record '3-2' would lead to a duplicate entry in table 'bug53592_2', key 'PRIMARY'
29 drop table bug53592_2;
30 drop table bug53592_1;