diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2022-04-26 16:18:45 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2022-04-26 16:22:56 +0530 |
commit | 7c0b9c6020101f7655c494327babb274d3af6dc3 (patch) | |
tree | c0fe441a0b26241c9360ed71defb21b7b84ef73a /mysql-test | |
parent | cad792c6862546a13b83f05209e7842a95bdc5fa (diff) | |
download | mariadb-git-7c0b9c6020101f7655c494327babb274d3af6dc3.tar.gz |
MDEV-15250 UPSERT during ALTER TABLE results in 'Duplicate entry' error for alter
- InnoDB should avoid bulk insert operation when table has active
DDL. Because bulk insert writes only one undo log as TRX_UNDO_EMPTY
and logging of concurrent DML happens at commit time uses undo log
record to parse and get the value and operation.
- Removed ROW_T_EMPTY, ROW_OP_EMPTY and their associated functions
and also the test case which tries to log the ROW_OP_EMPTY
when table has active DDL.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/suite/innodb/r/insert_into_empty_debug.result | 29 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/insert_into_empty_debug.test | 27 |
2 files changed, 0 insertions, 56 deletions
diff --git a/mysql-test/suite/innodb/r/insert_into_empty_debug.result b/mysql-test/suite/innodb/r/insert_into_empty_debug.result index 0f5d6a63a17..6ee445eb218 100644 --- a/mysql-test/suite/innodb/r/insert_into_empty_debug.result +++ b/mysql-test/suite/innodb/r/insert_into_empty_debug.result @@ -27,35 +27,6 @@ t1 CREATE TABLE `t1` ( `f2` int(11) NOT NULL, PRIMARY KEY (`f1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 -INSERT INTO t1 VALUES(1, 1); -connection con1; -START TRANSACTION WITH CONSISTENT SNAPSHOT; -connect con2,localhost,root,,,; -DELETE FROM t1; -connection default; -SET DEBUG_SYNC="innodb_inplace_alter_table_enter SIGNAL purge_resume WAIT_FOR dml_commit"; -ALTER TABLE t1 ADD INDEX(f2, f1); -connection con1; -COMMIT; -connection con2; -SET GLOBAL innodb_purge_rseg_truncate_frequency=1; -InnoDB 1 transactions not purged -SET unique_checks=0, foreign_key_checks=0; -BEGIN; -INSERT INTO t1 VALUES(2, 2); -ROLLBACK; -SET DEBUG_SYNC="now SIGNAL dml_commit"; -connection default; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f1` int(11) NOT NULL, - `f2` int(11) NOT NULL, - PRIMARY KEY (`f1`), - KEY `f2` (`f2`,`f1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 disconnect con1; -disconnect con2; DROP TABLE t1; SET DEBUG_SYNC=RESET; -SET GLOBAL innodb_purge_rseg_truncate_frequency=default; diff --git a/mysql-test/suite/innodb/t/insert_into_empty_debug.test b/mysql-test/suite/innodb/t/insert_into_empty_debug.test index 3058883a5d0..4d2b99bd554 100644 --- a/mysql-test/suite/innodb/t/insert_into_empty_debug.test +++ b/mysql-test/suite/innodb/t/insert_into_empty_debug.test @@ -31,33 +31,6 @@ ROLLBACK; connection default; SELECT * FROM t1; SHOW CREATE TABLE t1; - -# Online alter logs ROW_LOG_EMPTY when table does bulk insert -INSERT INTO t1 VALUES(1, 1); -connection con1; -START TRANSACTION WITH CONSISTENT SNAPSHOT; -connect(con2,localhost,root,,,); -DELETE FROM t1; -connection default; -SET DEBUG_SYNC="innodb_inplace_alter_table_enter SIGNAL purge_resume WAIT_FOR dml_commit"; -send ALTER TABLE t1 ADD INDEX(f2, f1); -connection con1; -COMMIT; -connection con2; -let $wait_all_purged=1; -SET GLOBAL innodb_purge_rseg_truncate_frequency=1; ---source include/wait_all_purged.inc -SET unique_checks=0, foreign_key_checks=0; -BEGIN; -INSERT INTO t1 VALUES(2, 2); -ROLLBACK; -SET DEBUG_SYNC="now SIGNAL dml_commit"; - -connection default; -reap; -SHOW CREATE TABLE t1; disconnect con1; -disconnect con2; DROP TABLE t1; SET DEBUG_SYNC=RESET; -SET GLOBAL innodb_purge_rseg_truncate_frequency=default; |