mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-22232 Fix test after changing behavior of ALTER DROP FOREIGN KEY
Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
This commit is contained in:
committed by
Julius Goryavsky
parent
b7d1f65b81
commit
f4ee7c110c
@@ -3,21 +3,21 @@ connection node_1;
|
|||||||
connect con1,127.0.0.1,root,,test,$NODE_MYPORT_1;
|
connect con1,127.0.0.1,root,,test,$NODE_MYPORT_1;
|
||||||
--- CTAS with empty result set ---
|
--- CTAS with empty result set ---
|
||||||
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||||
SET DEBUG_SYNC = 'create_table_select_before_create SIGNAL may_alter WAIT_FOR bf_abort';
|
SET DEBUG_SYNC = 'create_table_select_before_create SIGNAL may_run WAIT_FOR bf_abort';
|
||||||
CREATE TABLE t2 SELECT * FROM t1;
|
CREATE TABLE t2 SELECT * FROM t1;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
SET DEBUG_SYNC = 'now WAIT_FOR may_alter';
|
SET DEBUG_SYNC = 'now WAIT_FOR may_run';
|
||||||
ALTER TABLE t1 DROP FOREIGN KEY b, ALGORITHM=COPY;
|
TRUNCATE TABLE t1;
|
||||||
connection con1;
|
connection con1;
|
||||||
ERROR 70100: Query execution was interrupted
|
ERROR 70100: Query execution was interrupted
|
||||||
SET DEBUG_SYNC = 'RESET';
|
SET DEBUG_SYNC = 'RESET';
|
||||||
--- CTAS with non-empty result set ---
|
--- CTAS with non-empty result set ---
|
||||||
INSERT INTO t1 VALUES (10), (20), (30);
|
INSERT INTO t1 VALUES (10), (20), (30);
|
||||||
SET DEBUG_SYNC = 'create_table_select_before_create SIGNAL may_alter WAIT_FOR bf_abort';
|
SET DEBUG_SYNC = 'create_table_select_before_create SIGNAL may_run WAIT_FOR bf_abort';
|
||||||
CREATE TABLE t2 SELECT * FROM t1;
|
CREATE TABLE t2 SELECT * FROM t1;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
SET DEBUG_SYNC = 'now WAIT_FOR may_alter';
|
SET DEBUG_SYNC = 'now WAIT_FOR may_run';
|
||||||
ALTER TABLE t1 DROP FOREIGN KEY b, ALGORITHM=COPY;
|
TRUNCATE TABLE t1;
|
||||||
connection con1;
|
connection con1;
|
||||||
ERROR 70100: Query execution was interrupted
|
ERROR 70100: Query execution was interrupted
|
||||||
SET DEBUG_SYNC = 'RESET';
|
SET DEBUG_SYNC = 'RESET';
|
||||||
|
@@ -18,19 +18,16 @@
|
|||||||
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||||
|
|
||||||
# Run CTAS until the resulting table gets created,
|
# Run CTAS until the resulting table gets created,
|
||||||
# then it gets BF aborted by ALTER.
|
# then it gets BF aborted by other DDL.
|
||||||
SET DEBUG_SYNC = 'create_table_select_before_create SIGNAL may_alter WAIT_FOR bf_abort';
|
SET DEBUG_SYNC = 'create_table_select_before_create SIGNAL may_run WAIT_FOR bf_abort';
|
||||||
--send
|
--send
|
||||||
CREATE TABLE t2 SELECT * FROM t1;
|
CREATE TABLE t2 SELECT * FROM t1;
|
||||||
|
|
||||||
# Wait for CTAS to reach the table create point,
|
# Wait for CTAS to reach the table create point,
|
||||||
# start executing ALTER and BF abort CTAS.
|
# start executing other DDL and BF abort CTAS.
|
||||||
--connection node_1
|
--connection node_1
|
||||||
SET DEBUG_SYNC = 'now WAIT_FOR may_alter';
|
SET DEBUG_SYNC = 'now WAIT_FOR may_run';
|
||||||
--disable_result_log
|
TRUNCATE TABLE t1;
|
||||||
--error ER_ERROR_ON_RENAME
|
|
||||||
ALTER TABLE t1 DROP FOREIGN KEY b, ALGORITHM=COPY;
|
|
||||||
--enable_result_log
|
|
||||||
|
|
||||||
--connection con1
|
--connection con1
|
||||||
# CTAS gets BF aborted.
|
# CTAS gets BF aborted.
|
||||||
@@ -46,19 +43,16 @@ SET DEBUG_SYNC = 'RESET';
|
|||||||
INSERT INTO t1 VALUES (10), (20), (30);
|
INSERT INTO t1 VALUES (10), (20), (30);
|
||||||
|
|
||||||
# Run CTAS until the resulting table gets created,
|
# Run CTAS until the resulting table gets created,
|
||||||
# then it gets BF aborted by ALTER.
|
# then it gets BF aborted by other DDL.
|
||||||
SET DEBUG_SYNC = 'create_table_select_before_create SIGNAL may_alter WAIT_FOR bf_abort';
|
SET DEBUG_SYNC = 'create_table_select_before_create SIGNAL may_run WAIT_FOR bf_abort';
|
||||||
--send
|
--send
|
||||||
CREATE TABLE t2 SELECT * FROM t1;
|
CREATE TABLE t2 SELECT * FROM t1;
|
||||||
|
|
||||||
# Wait for CTAS to reach the table create point,
|
# Wait for CTAS to reach the table create point,
|
||||||
# start executing ALTER and BF abort CTAS.
|
# start executing other DDL and BF abort CTAS.
|
||||||
--connection node_1
|
--connection node_1
|
||||||
SET DEBUG_SYNC = 'now WAIT_FOR may_alter';
|
SET DEBUG_SYNC = 'now WAIT_FOR may_run';
|
||||||
--disable_result_log
|
TRUNCATE TABLE t1;
|
||||||
--error ER_ERROR_ON_RENAME
|
|
||||||
ALTER TABLE t1 DROP FOREIGN KEY b, ALGORITHM=COPY;
|
|
||||||
--enable_result_log
|
|
||||||
|
|
||||||
--connection con1
|
--connection con1
|
||||||
# CTAS gets BF aborted.
|
# CTAS gets BF aborted.
|
||||||
|
Reference in New Issue
Block a user