From 92b2a911e516ded986945d5d3dc6326f5575a21a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 11 Mar 2021 18:36:09 +0200 Subject: MDEV-24818 Concurrent use of InnoDB table is impossible until the first transaction is finished In MDEV-515, we enabled an optimization where an insert into an empty table will use table-level locking and undo logging. This may break applications that expect row-level locking. The SQL statements created by the mysqldump utility will include the following: SET unique_checks=0, foreign_key_checks=0; We will use these flags to enable the table-level locked and logged insert. Unless the parameters are set, INSERT will be executed in the old way, with row-level undo logging and implicit record locks. --- mysql-test/suite/innodb_fts/r/innodb_fts_plugin.result | 1 + mysql-test/suite/innodb_fts/t/innodb_fts_plugin.test | 2 ++ 2 files changed, 3 insertions(+) (limited to 'mysql-test/suite/innodb_fts') diff --git a/mysql-test/suite/innodb_fts/r/innodb_fts_plugin.result b/mysql-test/suite/innodb_fts/r/innodb_fts_plugin.result index b1426ece222..85271aebcf4 100644 --- a/mysql-test/suite/innodb_fts/r/innodb_fts_plugin.result +++ b/mysql-test/suite/innodb_fts/r/innodb_fts_plugin.result @@ -115,6 +115,7 @@ title VARCHAR(200), body TEXT, FULLTEXT (title, body) WITH PARSER simple_parser ) ENGINE=InnoDB; +SET unique_checks=0, foreign_key_checks=0; BEGIN; INSERT INTO articles (title, body) VALUES ('MySQL Tutorial','DBMS stands for MySQL DataBase ...'), diff --git a/mysql-test/suite/innodb_fts/t/innodb_fts_plugin.test b/mysql-test/suite/innodb_fts/t/innodb_fts_plugin.test index cd31500b23f..643e4a08b0e 100644 --- a/mysql-test/suite/innodb_fts/t/innodb_fts_plugin.test +++ b/mysql-test/suite/innodb_fts/t/innodb_fts_plugin.test @@ -125,6 +125,8 @@ CREATE TABLE articles ( FULLTEXT (title, body) WITH PARSER simple_parser ) ENGINE=InnoDB; +# Enable MDEV-515 table-level undo logging when inserting into empty table +SET unique_checks=0, foreign_key_checks=0; BEGIN; INSERT INTO articles (title, body) VALUES ('MySQL Tutorial','DBMS stands for MySQL DataBase ...'), -- cgit v1.2.1