mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge branch '10.3' into 10.4
This commit is contained in:
@ -100,6 +100,30 @@ CREATE TABLE t2 (b INT, KEY(b)) ENGINE=InnoDB;
|
||||
INSERT INTO t2 VALUES(2);
|
||||
ALTER TABLE t2 ADD FOREIGN KEY(b) REFERENCES t1(a), LOCK=EXCLUSIVE;
|
||||
DROP TABLE t2, t1;
|
||||
#
|
||||
# MDEV-16060 - InnoDB: Failing assertion: ut_strcmp(index->name, key->name)
|
||||
#
|
||||
CREATE TABLE t1 (`pk` INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
FLUSH TABLES;
|
||||
SET debug_sync='alter_table_intermediate_table_created SIGNAL ready WAIT_FOR go';
|
||||
ALTER TABLE t1 ADD FOREIGN KEY(pk) REFERENCES t2(pk) ON UPDATE CASCADE;
|
||||
connect con1, localhost, root;
|
||||
SET debug_sync='now WAIT_FOR ready';
|
||||
SET lock_wait_timeout=1;
|
||||
UPDATE t2 SET pk=10 WHERE pk=1;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
PREPARE stmt FROM 'UPDATE t2 SET pk=10 WHERE pk=1';
|
||||
DEALLOCATE PREPARE stmt;
|
||||
SET debug_sync='now SIGNAL go';
|
||||
connection default;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
SET debug_sync='reset';
|
||||
SHOW OPEN TABLES FROM test;
|
||||
Database Table In_use Name_locked
|
||||
test t2 0 0
|
||||
DROP TABLE t1, t2;
|
||||
create table t1 (a int primary key, b int) engine=innodb;
|
||||
create table t2 (c int primary key, d int,
|
||||
foreign key (d) references t1 (a) on update cascade) engine=innodb;
|
||||
|
Reference in New Issue
Block a user