summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/t/insert_into_empty.test
diff options
context:
space:
mode:
authorThirunarayanan Balathandayuthapani <thiru@mariadb.com>2021-02-02 19:24:05 +0530
committerThirunarayanan Balathandayuthapani <thiru@mariadb.com>2021-02-02 19:24:05 +0530
commit43ca6059cae8225e72fbd9495d20a6ce1c0f31b8 (patch)
tree379a5ab426fac4bfb52459eb6c528e3f03224b15 /mysql-test/suite/innodb/t/insert_into_empty.test
parent1110beccd4505dd563c134623b43afcf3f205f54 (diff)
downloadmariadb-git-43ca6059cae8225e72fbd9495d20a6ce1c0f31b8.tar.gz
MDEV-24720 AHI removal during rollback of bulk insert
InnoDB fails to remove the ahi entries during rollback of bulk insert operation. InnoDB throws the error when validates the ahi hash tables. InnoDB should remove the ahi entries while freeing the segment only during bulk index rollback operation. Reviewed-by: Marko Mäkelä
Diffstat (limited to 'mysql-test/suite/innodb/t/insert_into_empty.test')
-rw-r--r--mysql-test/suite/innodb/t/insert_into_empty.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/t/insert_into_empty.test b/mysql-test/suite/innodb/t/insert_into_empty.test
index 945f0dbd627..af067cbd02d 100644
--- a/mysql-test/suite/innodb/t/insert_into_empty.test
+++ b/mysql-test/suite/innodb/t/insert_into_empty.test
@@ -1,4 +1,5 @@
--source include/have_innodb.inc
+--source include/have_sequence.inc
--echo #
--echo # MDEV-24715 Assertion !node->table->skip_alter_undo
@@ -12,3 +13,16 @@ CREATE TEMPORARY TABLE t (a INT UNIQUE) ENGINE=InnoDB
REPLACE SELECT 1 AS a, 2 AS b UNION SELECT 1 AS a, 3 AS c;
SELECT * FROM t;
DROP TEMPORARY TABLE t;
+
+--echo #
+--echo # MDEV-24720 AHI removal during bulk index rollback
+--echo #
+SET @save_ahi = @@global.innodb_adaptive_hash_index;
+SET GLOBAL innodb_adaptive_hash_index = 1;
+CREATE TABLE t1(f1 INT NOT NULL)ENGINE=InnoDB;
+BEGIN;
+INSERT INTO t1 SELECT * FROM seq_1_to_65536;
+ROLLBACK;
+CHECK TABLE t1;
+DROP TABLE t1;
+SET GLOBAL innodb_adaptive_hash_index = @save_ahi;