mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-515 fixup: Cover dict_table_t::clear() during ADD INDEX
This commit is contained in:
@@ -17,7 +17,6 @@ SET DEBUG_SYNC = 'RESET';
|
||||
SET DEBUG_SYNC = 'write_row_noreplace SIGNAL have_handle WAIT_FOR go_ahead';
|
||||
INSERT INTO t1 VALUES(1,2,3);
|
||||
connect con1,localhost,root,,;
|
||||
connection con1;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR have_handle';
|
||||
SET lock_wait_timeout = 1;
|
||||
ALTER TABLE t1 ADD UNIQUE INDEX(c2);
|
||||
@@ -524,6 +523,26 @@ CREATE TABLE t2 (c VARCHAR(64)) ENGINE=InnoDB;
|
||||
ALTER TABLE t2 ADD FOREIGN KEY (c) REFERENCES t1 (c);
|
||||
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
DROP TABLE t2,t1;
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
|
||||
connect con1,localhost,root,,;
|
||||
SET DEBUG_SYNC = 'row_log_apply_before SIGNAL created WAIT_FOR inserted';
|
||||
ALTER TABLE t1 ADD INDEX(b);
|
||||
connection default;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR created';
|
||||
BEGIN;
|
||||
INSERT INTO t1 VALUES(1,1);
|
||||
ROLLBACK;
|
||||
SET DEBUG_SYNC = 'now SIGNAL inserted';
|
||||
connection con1;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
SELECT * FROM t1;
|
||||
a b
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
DROP TABLE t1;
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
SET GLOBAL innodb_file_per_table = @global_innodb_file_per_table_orig;
|
||||
SET GLOBAL innodb_monitor_enable = default;
|
||||
SET GLOBAL innodb_monitor_disable = default;
|
||||
|
Reference in New Issue
Block a user