diff options
Diffstat (limited to 'mysql-test/suite/innodb/r/innodb.result')
-rw-r--r-- | mysql-test/suite/innodb/r/innodb.result | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/mysql-test/suite/innodb/r/innodb.result b/mysql-test/suite/innodb/r/innodb.result index fd7cf87d138..651ad391db0 100644 --- a/mysql-test/suite/innodb/r/innodb.result +++ b/mysql-test/suite/innodb/r/innodb.result @@ -2,6 +2,9 @@ set optimizer_switch='index_condition_pushdown=off'; set @@optimizer_use_mrr=disable; drop table if exists t1,t2,t3,t4; drop database if exists mysqltest; +CREATE TABLE bug58912 (a BLOB, b TEXT, PRIMARY KEY(a(1))) ENGINE=InnoDB; +INSERT INTO bug58912 VALUES(REPEAT('a',8000),REPEAT('b',8000)); +UPDATE bug58912 SET a=REPEAT('a',7999); create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) engine=innodb; insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David'), (2, 'Erik'), (3, 'Sasha'), (3, 'Jeremy'), (4, 'Matt'); select id, code, name from t1 order by id; @@ -1672,10 +1675,10 @@ variable_value - @innodb_rows_deleted_orig 71 SELECT variable_value - @innodb_rows_inserted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted'; variable_value - @innodb_rows_inserted_orig -1065 +1066 SELECT variable_value - @innodb_rows_updated_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_updated'; variable_value - @innodb_rows_updated_orig -865 +866 SELECT variable_value - @innodb_row_lock_waits_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_waits'; variable_value - @innodb_row_lock_waits_orig 0 @@ -2426,10 +2429,6 @@ drop table t1,t2; CREATE TABLE t1 ( id INTEGER NOT NULL AUTO_INCREMENT, PRIMARY KEY (id) ) ENGINE=InnoDB; -CREATE TABLE t2 ( -id INTEGER NOT NULL, -FOREIGN KEY (id) REFERENCES t1 (id) -) ENGINE=InnoDB; INSERT INTO t1 (id) VALUES (NULL); SELECT * FROM t1; id @@ -2445,7 +2444,7 @@ INSERT INTO t1 (id) VALUES (NULL); SELECT * FROM t1; id 1 -DROP TABLE t2, t1; +DROP TABLE t1; CREATE TABLE t1 ( id INT PRIMARY KEY @@ -2623,13 +2622,15 @@ ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fail update t4 set a=2; ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t4`, CONSTRAINT `t4_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t3` (`a`)) truncate t1; -ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t1` (`a`)) +ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`a`) REFERENCES `test`.`t1` (`a`)) truncate t3; -ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t4`, CONSTRAINT `t4_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t3` (`a`)) +ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`t4`, CONSTRAINT `t4_ibfk_1` FOREIGN KEY (`a`) REFERENCES `test`.`t3` (`a`)) truncate t2; truncate t4; truncate t1; +ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`a`) REFERENCES `test`.`t1` (`a`)) truncate t3; +ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`t4`, CONSTRAINT `t4_ibfk_1` FOREIGN KEY (`a`) REFERENCES `test`.`t3` (`a`)) drop table t4,t3,t2,t1; create table t1 (a varchar(255) character set utf8, b varchar(255) character set utf8, @@ -3177,3 +3178,4 @@ Variable_name Value Handler_update 1 Variable_name Value Handler_delete 1 +DROP TABLE bug58912; |