polardbxengine/mysql-test/suite/innodb/t/insert_debug.test

77 lines
2.2 KiB
Plaintext

--source include/have_debug.inc
--source include/not_solaris.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;
--echo #
--echo # Bug#28552330 [INNODB] INNODB: ASSERTION FAILURE: BTR0BTR.IC:133:LEVEL <= 50
--echo #
set global innodb_limit_optimistic_insert_debug = 2;
CREATE TABLE t1(c1 INT NOT NULL, primary key(c1));
call mtr.add_suppression("\\[ERROR\\] .*MY-\\d+.* No. of B-tree level created for index PRIMARY has crossed the permissible limit. If debug option innodb_limit_optimistic_insert_debug is being used try tweaking it to include more records in a page.");
--error 1030
INSERT INTO t1 VALUES
(103),(102),(101),
(100),(99),(98),(97),(96),(95),(94),(93),(92),(91),
(90),(89),(88),(87),(86),(85),(84),(83),(82),(81),
(80),(79),(78),(77),(76),(75),(74),(73),(72),(71),
(70),(69),(68),(67),(66),(65),(64),(63),(62),(61),
(60),(59),(58),(57),(56),(55),(54),(53),(52),(51),
(50),(49),(48),(47),(46),(45),(44),(43),(42),(41),
(40),(39),(38),(37),(36),(35),(34),(33),(32),(31),
(30),(29),(28),(27),(26),(25),(24),(23),(22),(21),
(20),(19),(18),(17),(16),(15),(14),(13),(12),(11),
(10),(9),(8),(7),(6),(5),(4),(3),(2),(1);
SELECT COUNT(*) FROM t1;
set global innodb_limit_optimistic_insert_debug = 0;
DROP TABLE t1;