mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-23805 Make Online DDL to Instant DDL when table is empty
- 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
This commit is contained in:
@ -80,6 +80,7 @@ SET DEBUG_SYNC='RESET';
|
||||
#
|
||||
CREATE TABLE t1 (f VARCHAR(8) CHARACTER SET latin1 COLLATE latin1_swedish_ci)
|
||||
ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES('ZERO');
|
||||
connection con1;
|
||||
SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL scanned WAIT_FOR insert_done';
|
||||
ALTER TABLE t1 MODIFY f VARCHAR(256) COLLATE latin1_german2_ci NOT NULL;
|
||||
@ -96,5 +97,6 @@ ALTER TABLE t1 CHANGE f eins VARCHAR(257) COLLATE latin1_german1_ci NOT NULL,
|
||||
ALGORITHM=INSTANT;
|
||||
SELECT * FROM t1;
|
||||
eins
|
||||
ZERO
|
||||
one
|
||||
DROP TABLE t1;
|
||||
|
Reference in New Issue
Block a user