diff options
Diffstat (limited to 'mysql-test/suite/innodb/r/innodb-table-online.result')
-rw-r--r-- | mysql-test/suite/innodb/r/innodb-table-online.result | 501 |
1 files changed, 501 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/r/innodb-table-online.result b/mysql-test/suite/innodb/r/innodb-table-online.result new file mode 100644 index 00000000..9296fded --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb-table-online.result @@ -0,0 +1,501 @@ +call mtr.add_suppression("InnoDB: Warning: Small buffer pool size"); +call mtr.add_suppression("InnoDB: Error: table 'test/t1'"); +call mtr.add_suppression("MariaDB is trying to open a table handle but the .ibd file for"); +SET @global_innodb_file_per_table_orig = @@global.innodb_file_per_table; +SET GLOBAL innodb_file_per_table = on; +CREATE TABLE t1 (c1 INT PRIMARY KEY, c2 INT NOT NULL, c3 CHAR(255) NOT NULL) +ENGINE = InnoDB; +INSERT INTO t1 VALUES (1,1,''), (2,2,''), (3,3,''), (4,4,''), (5,5,''); +SET GLOBAL innodb_monitor_enable = module_ddl; +SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl'; +name count +ddl_background_drop_indexes 0 +ddl_online_create_index 0 +ddl_pending_alter_table 0 +ddl_sort_file_alter_table 0 +ddl_log_file_alter_table 0 +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,,; +SET DEBUG_SYNC = 'now WAIT_FOR have_handle'; +SET lock_wait_timeout = 1; +ALTER TABLE t1 ROW_FORMAT=REDUNDANT; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +SET DEBUG_SYNC = 'now SIGNAL go_ahead'; +connection default; +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl'; +name count +ddl_background_drop_indexes 0 +ddl_online_create_index 0 +ddl_pending_alter_table 0 +ddl_sort_file_alter_table 0 +ddl_log_file_alter_table 0 +connection con1; +SET @saved_debug_dbug = @@SESSION.debug_dbug; +SET DEBUG_DBUG = '+d,innodb_OOM_prepare_inplace_alter'; +ALTER TABLE t1 ROW_FORMAT=REDUNDANT, ALGORITHM=INPLACE, LOCK=NONE; +ERROR HY000: Out of memory. +SET SESSION DEBUG = @saved_debug_dbug; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead +SET SESSION DEBUG = '+d,innodb_OOM_inplace_alter'; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead +ALTER TABLE t1 ROW_FORMAT=REDUNDANT, ALGORITHM=INPLACE, LOCK=NONE; +ERROR HY000: Out of memory. +SET SESSION DEBUG = @saved_debug_dbug; +Warnings: +Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead +ALTER TABLE t1 ROW_FORMAT=REDUNDANT, ALGORITHM=INPLACE, LOCK=NONE; +connection default; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL, + `c2` int(11) NOT NULL, + `c3` char(255) NOT NULL, + PRIMARY KEY (`c1`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=REDUNDANT +BEGIN; +INSERT INTO t1 VALUES(7,4,2); +connection con1; +SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL scanned WAIT_FOR insert_done'; +ALTER TABLE t1 DROP PRIMARY KEY, ADD UNIQUE INDEX(c2); +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +connection default; +COMMIT; +connection con1; +ALTER TABLE t1 DROP PRIMARY KEY, ADD UNIQUE INDEX(c2); +ERROR 23000: Duplicate entry '4' for key 'c2' +connection default; +DELETE FROM t1 WHERE c1 = 7; +connection con1; +ALTER TABLE t1 DROP PRIMARY KEY, ADD UNIQUE INDEX(c2), ROW_FORMAT=COMPACT, +LOCK = SHARED, ALGORITHM = INPLACE; +ALTER TABLE t1 ADD UNIQUE INDEX(c2), +LOCK = EXCLUSIVE, ALGORITHM = INPLACE; +Warnings: +Note 1831 Duplicate index `c2_2`. This is deprecated and will be disallowed in a future release +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL, + `c2` int(11) NOT NULL, + `c3` char(255) NOT NULL, + UNIQUE KEY `c2` (`c2`), + UNIQUE KEY `c2_2` (`c2`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=COMPACT +ALTER TABLE t1 DROP INDEX c2, ADD PRIMARY KEY(c1); +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR scanned'; +SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl'; +name count +ddl_background_drop_indexes 0 +ddl_online_create_index 1 +ddl_pending_alter_table 1 +ddl_sort_file_alter_table 0 +ddl_log_file_alter_table 0 +INSERT INTO t1 VALUES(4,7,2); +SET DEBUG_SYNC = 'now SIGNAL insert_done'; +connection con1; +ERROR 23000: Duplicate entry '4' for key 'PRIMARY' +DELETE FROM t1 WHERE c1=4 and c2=7; +connection default; +ROLLBACK; +connection con1; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL, + `c2` int(11) NOT NULL, + `c3` char(255) NOT NULL, + UNIQUE KEY `c2` (`c2`), + UNIQUE KEY `c2_2` (`c2`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=COMPACT +ALTER TABLE t1 DROP PRIMARY KEY, ADD UNIQUE INDEX(c2), ALGORITHM = INPLACE; +ERROR 42000: Can't DROP INDEX `PRIMARY`; check that it exists +ALTER TABLE t1 DROP INDEX c2, ADD PRIMARY KEY(c1), ALGORITHM = INPLACE; +SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl'; +name count +ddl_background_drop_indexes 0 +ddl_online_create_index 0 +ddl_pending_alter_table 0 +ddl_sort_file_alter_table 0 +ddl_log_file_alter_table 0 +connection default; +INSERT INTO t1 VALUES(6,3,1); +ERROR 23000: Duplicate entry '3' for key 'c2_2' +INSERT INTO t1 VALUES(7,4,2); +ERROR 23000: Duplicate entry '4' for key 'c2_2' +DROP INDEX c2_2 ON t1; +BEGIN; +INSERT INTO t1 VALUES(7,4,2); +ROLLBACK; +connection con1; +KILL QUERY @id; +ERROR 70100: Query execution was interrupted +SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt WAIT_FOR dml_done'; +SET DEBUG_SYNC = 'row_log_table_apply2_before SIGNAL applied WAIT_FOR kill_done'; +ALTER TABLE t1 ROW_FORMAT=REDUNDANT; +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR rebuilt'; +SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl'; +name count +ddl_background_drop_indexes 0 +ddl_online_create_index 1 +ddl_pending_alter_table 1 +ddl_sort_file_alter_table 0 +ddl_log_file_alter_table 0 +BEGIN; +INSERT INTO t1 VALUES(7,4,2); +ROLLBACK; +SET DEBUG_SYNC = 'now SIGNAL dml_done WAIT_FOR applied'; +KILL QUERY @id; +SET DEBUG_SYNC = 'now SIGNAL kill_done'; +connection con1; +ERROR 70100: Query execution was interrupted +SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl'; +name count +ddl_background_drop_indexes 0 +ddl_online_create_index 0 +ddl_pending_alter_table 0 +ddl_sort_file_alter_table 0 +ddl_log_file_alter_table 0 +connection default; +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +INSERT INTO t1 SELECT 5 + c1, c2, c3 FROM t1; +INSERT INTO t1 SELECT 10 + c1, c2, c3 FROM t1; +INSERT INTO t1 SELECT 20 + c1, c2, c3 FROM t1; +INSERT INTO t1 SELECT 40 + c1, c2, c3 FROM t1; +EXPLAIN SELECT COUNT(*) FROM t1 WHERE c2 > 3; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL ROWS Using where +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +SET @merge_encrypt_0= +(SELECT variable_value FROM information_schema.global_status +WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted'); +SET @merge_decrypt_0= +(SELECT variable_value FROM information_schema.global_status +WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted'); +SET @rowlog_encrypt_0= +(SELECT variable_value FROM information_schema.global_status +WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted'); +connection con1; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL, + `c2` int(11) NOT NULL, + `c3` char(255) NOT NULL, + PRIMARY KEY (`c1`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=COMPACT +ALTER TABLE t1 ROW_FORMAT=REDUNDANT; +SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt2 WAIT_FOR dml2_done'; +SET lock_wait_timeout = 10; +ALTER TABLE t1 ROW_FORMAT=COMPACT +PAGE_COMPRESSED = YES PAGE_COMPRESSION_LEVEL = 1, ALGORITHM = INPLACE; +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR rebuilt2'; +INSERT INTO t1 SELECT 80 + c1, c2, c3 FROM t1; +INSERT INTO t1 SELECT 160 + c1, c2, c3 FROM t1; +UPDATE t1 SET c2 = c2 + 1; +SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl'; +name count +ddl_background_drop_indexes 0 +ddl_online_create_index 1 +ddl_pending_alter_table 1 +ddl_sort_file_alter_table 0 +ddl_log_file_alter_table 1 +UPDATE t1 SET c2 = c2 + 1; +UPDATE t1 SET c2 = c2 + 2; +UPDATE t1 SET c2 = c2 + 1; +UPDATE t1 SET c2 = c2 + 2; +UPDATE t1 SET c2 = c2 + 1; +UPDATE t1 SET c2 = c2 + 2; +UPDATE t1 SET c2 = c2 + 1; +UPDATE t1 SET c2 = c2 + 2; +UPDATE t1 SET c2 = c2 + 1; +UPDATE t1 SET c2 = c2 + 2; +UPDATE t1 SET c2 = c2 + 1; +UPDATE t1 SET c2 = c2 + 2; +UPDATE t1 SET c2 = c2 + 1; +UPDATE t1 SET c2 = c2 + 2; +UPDATE t1 SET c2 = c2 + 1; +UPDATE t1 SET c2 = c2 + 2; +SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl'; +name count +ddl_background_drop_indexes 0 +ddl_online_create_index 1 +ddl_pending_alter_table 1 +ddl_sort_file_alter_table 0 +ddl_log_file_alter_table 1 +SET @merge_encrypt_1= +(SELECT variable_value FROM information_schema.global_status +WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted'); +SET @merge_decrypt_1= +(SELECT variable_value FROM information_schema.global_status +WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted'); +SET @rowlog_encrypt_1= +(SELECT variable_value FROM information_schema.global_status +WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted'); +SELECT +(@merge_encrypt_1-@merge_encrypt_0)- +(@merge_decrypt_1-@merge_decrypt_0) as sort_balance, +@merge_encrypt_1>@merge_encrypt_0, @merge_decrypt_1>@merge_decrypt_0, +@rowlog_encrypt_1>@rowlog_encrypt_0; +sort_balance @merge_encrypt_1>@merge_encrypt_0 @merge_decrypt_1>@merge_decrypt_0 @rowlog_encrypt_1>@rowlog_encrypt_0 +0 0 0 0 +SET DEBUG_SYNC = 'now SIGNAL dml2_done'; +connection con1; +ERROR HY000: Creating index 'PRIMARY' required more than 'innodb_online_alter_log_max_size' bytes of modification log. Please try again +SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl'; +name count +ddl_background_drop_indexes 0 +ddl_online_create_index 0 +ddl_pending_alter_table 0 +ddl_sort_file_alter_table 0 +ddl_log_file_alter_table 1 +SET @merge_encrypt_1= +(SELECT variable_value FROM information_schema.global_status +WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted'); +SET @merge_decrypt_1= +(SELECT variable_value FROM information_schema.global_status +WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted'); +SET @rowlog_encrypt_1= +(SELECT variable_value FROM information_schema.global_status +WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted'); +SET @rowlog_decrypt_1= +(SELECT variable_value FROM information_schema.global_status +WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_decrypted'); +SET GLOBAL innodb_max_purge_lag_wait=0; +SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt3 WAIT_FOR dml3_done'; +ALTER TABLE t1 ADD PRIMARY KEY(c22f), CHANGE c2 c22f INT; +ERROR 42000: Multiple primary key defined +ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(c22f), CHANGE c2 c22f INT; +ERROR 23000: Duplicate entry '26' for key 'PRIMARY' +ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(c22f,c1,c4(5)), +CHANGE c2 c22f INT, CHANGE c3 c3 CHAR(255) NULL, CHANGE c1 c1 INT AFTER c22f, +ADD COLUMN c4 VARCHAR(6) DEFAULT 'Online', LOCK=NONE; +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR rebuilt3'; +SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl'; +name count +ddl_background_drop_indexes 0 +ddl_online_create_index 1 +ddl_pending_alter_table 1 +ddl_sort_file_alter_table 2 +ddl_log_file_alter_table 1 +BEGIN; +INSERT INTO t1 SELECT 320 + c1, c2, c3 FROM t1 WHERE c1 > 240; +DELETE FROM t1 WHERE c1 > 320; +UPDATE t1 SET c2 = c2 + 1; +COMMIT; +SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl'; +name count +ddl_background_drop_indexes 0 +ddl_online_create_index 1 +ddl_pending_alter_table 1 +ddl_sort_file_alter_table 2 +ddl_log_file_alter_table 2 +SET DEBUG_SYNC = 'now SIGNAL dml3_done'; +connection con1; +SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl'; +name count +ddl_background_drop_indexes 0 +ddl_online_create_index 0 +ddl_pending_alter_table 0 +ddl_sort_file_alter_table 2 +ddl_log_file_alter_table 2 +SELECT COUNT(c22f) FROM t1; +COUNT(c22f) +320 +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +SET @merge_encrypt_2= +(SELECT variable_value FROM information_schema.global_status +WHERE variable_name = 'innodb_encryption_n_merge_blocks_encrypted'); +SET @merge_decrypt_2= +(SELECT variable_value FROM information_schema.global_status +WHERE variable_name = 'innodb_encryption_n_merge_blocks_decrypted'); +SET @rowlog_encrypt_2= +(SELECT variable_value FROM information_schema.global_status +WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted'); +SET @rowlog_decrypt_2= +(SELECT variable_value FROM information_schema.global_status +WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_decrypted'); +SELECT +(@merge_encrypt_2-@merge_encrypt_1)- +(@merge_decrypt_2-@merge_decrypt_1) as sort_balance, +(@rowlog_encrypt_2-@rowlog_encrypt_1)- +(@rowlog_decrypt_2-@rowlog_decrypt_1) as log_balance; +sort_balance log_balance +0 0 +SELECT +@merge_encrypt_2-@merge_encrypt_1>0 as sort_encrypted, +@merge_decrypt_2-@merge_decrypt_1>0 as sort_decrypted, +@rowlog_encrypt_2-@rowlog_encrypt_1>0 as log_encrypted, +@rowlog_decrypt_2-@rowlog_decrypt_1>0 as log_decrypted; +sort_encrypted sort_decrypted log_encrypted log_decrypted +0 0 0 0 +ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY c3p5(c3(5)); +ERROR 23000: Duplicate entry '' for key 'PRIMARY' +UPDATE t1 SET c3 = NULL WHERE c3 = ''; +SET lock_wait_timeout = 1; +ALTER TABLE t1 DROP COLUMN c22f, ADD PRIMARY KEY c3p5(c3(5)); +ERROR 42000: Key column 'c22f' doesn't exist in table +ALTER IGNORE TABLE t1 DROP COLUMN c22f, DROP PRIMARY KEY, ADD PRIMARY KEY c3p5(c3(5)), +ALGORITHM = INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Creating unique indexes with IGNORE requires COPY algorithm to remove duplicate rows. Try ALGORITHM=COPY +UPDATE t1 SET c3=LEFT(CONCAT(c1,REPEAT('foo',c1)),255) WHERE c3 IS NULL; +SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL c3p5_created0 WAIT_FOR ins_done0'; +ALTER TABLE t1 MODIFY c3 CHAR(255) NOT NULL, DROP COLUMN c22f, +DROP PRIMARY KEY, ADD PRIMARY KEY(c1,c4(5)), +ADD COLUMN c5 CHAR(5) DEFAULT 'tired' FIRST; +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR c3p5_created0'; +BEGIN; +INSERT INTO t1 VALUES(347,33101,'Pikku kakkosen posti','YLETV2'); +INSERT INTO t1 VALUES(33101,347,NULL,''); +COMMIT; +SET DEBUG_SYNC = 'now SIGNAL ins_done0'; +connection con1; +ERROR 22004: Invalid use of NULL value +DELETE FROM t1 WHERE c1= 347 and c22f = 33101; +ALTER TABLE t1 MODIFY c3 CHAR(255) NOT NULL; +SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL c3p5_created WAIT_FOR ins_done'; +ALTER TABLE t1 DROP PRIMARY KEY, DROP COLUMN c22f, +ADD COLUMN c6 VARCHAR(1000) DEFAULT +'I love tracking down hard-to-reproduce bugs.', +ADD PRIMARY KEY c3p5(c3(5), c6(2)); +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR c3p5_created'; +SET DEBUG_SYNC = 'ib_after_row_insert SIGNAL ins_done WAIT_FOR ddl_timed_out'; +INSERT INTO t1 VALUES(347,33101,NULL,''); +ERROR 23000: Column 'c3' cannot be null +INSERT INTO t1 VALUES(347,33101,'Pikku kakkosen posti',''); +connection con1; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +SET DEBUG_SYNC = 'now SIGNAL ddl_timed_out'; +SELECT name, count FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE subsystem = 'ddl'; +name count +ddl_background_drop_indexes 0 +ddl_online_create_index 0 +ddl_pending_alter_table 0 +ddl_sort_file_alter_table 6 +ddl_log_file_alter_table 2 +connection default; +SELECT COUNT(*) FROM t1; +COUNT(*) +322 +ALTER TABLE t1 ROW_FORMAT=REDUNDANT; +SELECT * FROM t1 LIMIT 10; +c22f c1 c3 c4 +27 1 1foo Online +27 6 6foofoofoofoofoofoo Online +27 11 11foofoofoofoofoofoofoofoofoofoofoo Online +27 16 16foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online +27 21 21foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online +27 26 26foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online +27 31 31foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online +27 36 36foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online +27 41 41foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online +27 46 46foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo Online +connection con1; +ALTER TABLE t1 DISCARD TABLESPACE; +connection default; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c22f` int(11) NOT NULL, + `c1` int(11) NOT NULL, + `c3` char(255) NOT NULL, + `c4` varchar(6) NOT NULL DEFAULT 'Online', + PRIMARY KEY (`c22f`,`c1`,`c4`(5)) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=REDUNDANT +SET GLOBAL innodb_monitor_disable = module_ddl; +DROP TABLE t1; +CREATE TABLE t1 (a INT PRIMARY KEY, b blob) ENGINE=InnoDB; +INSERT INTO t1 VALUES(0,NULL); +connection con1; +SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL created WAIT_FOR ins'; +ALTER TABLE t1 FORCE; +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR created'; +BEGIN; +INSERT INTO t1 VALUES(1, repeat('a', 10000)); +ROLLBACK; +SET DEBUG_SYNC = 'now SIGNAL ins'; +connection con1; +connection default; +SELECT * FROM t1; +a b +0 NULL +DROP TABLE t1; +SET DEBUG_SYNC = 'RESET'; +# +# MDEV-29600 Memory leak in row_log_table_apply_update() +# +CREATE TABLE t1 (pk INT PRIMARY KEY, f TEXT) ENGINE=InnoDB; +INSERT INTO t1 SET pk=1; +connection con1; +SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL created WAIT_FOR updated'; +ALTER TABLE t1 FORCE; +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR created'; +UPDATE t1 SET f = REPEAT('a', 20000); +SET DEBUG_SYNC = 'now SIGNAL updated'; +connection con1; +connection default; +DROP TABLE t1; +# +# MDEV-29977 Memory leak in row_log_table_apply_update +# +CREATE TABLE t1(f1 longtext, f2 int, KEY(f1(1024)), KEY(f2, f1(20))) ENGINE=InnoDB; +INSERT INTO t1 VALUES('a', 1); +connection con1; +set DEBUG_SYNC="innodb_inplace_alter_table_enter SIGNAL con_default WAIT_FOR con1_signal"; +ALTER TABLE t1 FORCE; +connection default; +SET DEBUG_SYNC="now WAIT_FOR con_default"; +UPDATE t1 SET f1 = NULL; +UPDATE t1 SET f1 = REPEAT('b', 9000); +SET DEBUG_SYNC="now SIGNAL con1_signal"; +connection con1; +DROP TABLE t1; +connection default; +# +# MDEV-28122 Optimize table crash while applying online log +# +CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL, +f3 CHAR(200), f4 CHAR(200), +f5 VARCHAR(87), PRIMARY KEY(f1))ENGINE=InnoDB; +INSERT INTO t1 VALUES(6000, 6000, "InnoDB", +"MariaDB", repeat('a', 87)); +SET DEBUG_SYNC="inplace_after_index_build SIGNAL dml_start WAIT_FOR dml_commit"; +ALTER TABLE t1 FORCE; +connection con1; +SET DEBUG_SYNC="now WAIT_FOR dml_start"; +BEGIN; +INSERT INTO t1 SELECT seq, seq, "IDB", "MDB", repeat('a', 87) FROM seq_1_to_127; +INSERT INTO t1 VALUES(128, 128, "IDB", "MDB", repeat('a', 86)); +INSERT INTO t1 VALUES(129, 129, "idb", "mdb", repeat('a', 2)); +COMMIT; +SET DEBUG_SYNC="now SIGNAL dml_commit"; +connection default; +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1; +SET DEBUG_SYNC=RESET; +disconnect con1; +SET GLOBAL innodb_file_per_table = @global_innodb_file_per_table_orig; +SET GLOBAL innodb_monitor_enable = default; +SET GLOBAL innodb_monitor_disable = default; |