summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/innodb/t/insert_debug.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
commit3f619478f796eddbba6e39502fe941b285dd97b1 (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/innodb/t/insert_debug.test
parentInitial commit. (diff)
downloadmariadb-upstream.tar.xz
mariadb-upstream.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/innodb/t/insert_debug.test')
-rw-r--r--mysql-test/suite/innodb/t/insert_debug.test49
1 files changed, 49 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/t/insert_debug.test b/mysql-test/suite/innodb/t/insert_debug.test
new file mode 100644
index 00000000..c370c402
--- /dev/null
+++ b/mysql-test/suite/innodb/t/insert_debug.test
@@ -0,0 +1,49 @@
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_partition.inc
+
+--echo #
+--echo # Bug#19904003 INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG=1
+--echo # CAUSES INFINITE PAGE SPLIT
+--echo #
+
+SET GLOBAL innodb_change_buffering_debug=1;
+SET GLOBAL innodb_limit_optimistic_insert_debug=1;
+CREATE TABLE t1(c1 INT PRIMARY KEY) ENGINE=InnoDB
+PARTITION BY HASH (c1) PARTITIONS 15;
+DROP TABLE t1;
+
+SET GLOBAL innodb_change_buffering_debug=0;
+SET GLOBAL innodb_limit_optimistic_insert_debug=0;
+
+--echo #
+--echo # Bug#25082593 FOREIGN KEY VALIDATION DOESN'T NEED
+--echo # TO ACQUIRE GAP LOCK IN READ COMMITTED
+--echo #
+
+SET GLOBAL innodb_limit_optimistic_insert_debug=2;
+
+CREATE TABLE t1(col1 INT PRIMARY KEY) ENGINE=INNODB;
+
+CREATE TABLE t2(col1 INT PRIMARY KEY, col2 INT NOT NULL,
+FOREIGN KEY(col2) REFERENCES t1(col1)) ENGINE=INNODB;
+
+INSERT INTO t1 VALUES(1), (3), (4);
+
+connect (con1,localhost,root);
+
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+START TRANSACTION;
+INSERT INTO t2 VALUES(1, 3);
+
+connection default;
+START TRANSACTION;
+
+INSERT INTO t1 VALUES(2);
+
+disconnect con1;
+
+SET GLOBAL innodb_limit_optimistic_insert_debug=0;
+
+DROP TABLE t2;
+DROP TABLE t1;