Debian Codegraph @

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

raw
1 set old_alter_table=0;
2 create table bug53592(a int) engine=innodb row_format=compact;
3 alter table bug53592 add column b text charset utf8;
4 Warnings:
5 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
6 alter table bug53592 add column c blob not null;
7 create index bug53592_b on bug53592(b(81));
8 create unique index bug53592_c on bug53592(c(1));
9 SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
10 replace into bug53592 values (),();
11 Warnings:
12 Warning 1364 Field 'c' doesn't have a default value
13 SET sql_mode = default;
14 check table bug53592;
15 Table Op Msg_type Msg_text
16 test.bug53592 check status OK
17 drop table bug53592;
18 set old_alter_table=1;
19 create table bug53592(a int) engine=innodb row_format=compact;
20 alter table bug53592 add column b text charset utf8;
21 Warnings:
22 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
23 alter table bug53592 add column c blob not null;
24 create index bug53592_b on bug53592(b(81));
25 create unique index bug53592_c on bug53592(c(1));
26 SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
27 replace into bug53592 values (),();
28 Warnings:
29 Warning 1364 Field 'c' doesn't have a default value
30 SET sql_mode = default;
31 check table bug53592;
32 Table Op Msg_type Msg_text
33 test.bug53592 check status OK
34 drop table bug53592;
35 CREATE TABLE bug53592_1(
36 col1 int, col2 int,
37 PRIMARY KEY (col1, col2)
38 ) ENGINE=InnoDB;
39 CREATE TABLE bug53592_2 (
40 col int PRIMARY KEY,
41 FOREIGN KEY (col) REFERENCES bug53592_1 (col1)
42 ON DELETE CASCADE ON UPDATE CASCADE
43 ) ENGINE=InnoDB;
44 INSERT INTO bug53592_1 VALUES (1, 2);
45 INSERT INTO bug53592_1 VALUES (3, 4);
46 INSERT INTO bug53592_2 VALUES (1);
47 INSERT INTO bug53592_2 VALUES (3);
48 UPDATE bug53592_1 SET col1 = 3 WHERE col2 = 2;
49 ERROR 23000: Foreign key constraint for table 'bug53592_1', record '3-2' would lead to a duplicate entry in table 'bug53592_2', key 'PRIMARY'
50 drop table bug53592_2;
51 drop table bug53592_1;