mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
d270525dfd
- In ha_innobase::prepare_inplace_alter_table(), InnoDB should check whether the table is empty. If the table is empty then server should avoid downgrading the MDL after prepare phase. It is more like instant alter, does change only in dicationary and metadata. - Changed few debug test case to make non-empty DDL table
26 lines
697 B
Text
26 lines
697 B
Text
CREATE TABLE t0 (pk INT PRIMARY KEY) ENGINE=InnoDB;
|
|
CREATE TABLE t1 (pk INT PRIMARY KEY, b INT) ENGINE=InnoDB;
|
|
INSERT INTO t1 VALUES(100, 100);
|
|
connect con1,localhost,root,,test;
|
|
BEGIN;
|
|
INSERT INTO t0 SET pk=1;
|
|
connect con2,localhost,root,,test;
|
|
BEGIN;
|
|
INSERT INTO t0 SET pk=2;
|
|
connection default;
|
|
SET DEBUG_SYNC='alter_table_inplace_after_lock_downgrade SIGNAL prepared WAIT_FOR logged';
|
|
ALTER TABLE t1 FORCE;
|
|
connection con1;
|
|
SET DEBUG_SYNC='now WAIT_FOR prepared';
|
|
INSERT INTO t1 SET pk=1;
|
|
COMMIT;
|
|
disconnect con1;
|
|
connection con2;
|
|
UPDATE t1 SET b=1;
|
|
DELETE FROM t1;
|
|
ROLLBACK;
|
|
SET DEBUG_SYNC='now SIGNAL logged';
|
|
disconnect con2;
|
|
connection default;
|
|
SET DEBUG_SYNC='RESET';
|
|
DROP TABLE t0,t1;
|