summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/t/innodb-64k.test
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-08-12 18:21:53 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-08-12 18:21:53 +0300
commitefd8af535a4fa4aa3dd89a325340b6eb648e1bc8 (patch)
tree10958f931cf8428ec2a59d8cff359fe3b20f548b /mysql-test/suite/innodb/t/innodb-64k.test
parent7ad4709a3b621c6fe56d653a2bb5018bf4234875 (diff)
downloadmariadb-git-efd8af535a4fa4aa3dd89a325340b6eb648e1bc8.tar.gz
MDEV-19526 heap number overflow on innodb_page_size=64k
InnoDB only reserves 13 bits for the heap number in the record header, limiting the heap number to be at most 8191. But, when using innodb_page_size=64k and secondary index records of 7 bytes each, it is possible to exceed the maximum heap number. btr_cur_optimistic_insert(): Let the operation fail if the maximum number of records would be exceeded. page_mem_alloc_heap(): Move to the same compilation unit with the only caller, and let the operation fail if the maximum heap number has been allocated already.
Diffstat (limited to 'mysql-test/suite/innodb/t/innodb-64k.test')
-rw-r--r--mysql-test/suite/innodb/t/innodb-64k.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/t/innodb-64k.test b/mysql-test/suite/innodb/t/innodb-64k.test
index 0498544279b..50dc1535aa6 100644
--- a/mysql-test/suite/innodb/t/innodb-64k.test
+++ b/mysql-test/suite/innodb/t/innodb-64k.test
@@ -2,6 +2,7 @@
# Tests for setting innodb-page-size=64k;
--source include/have_innodb.inc
--source include/have_innodb_64k.inc
+--source include/have_sequence.inc
call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value *");
call mtr.add_suppression("InnoDB: Resizing redo log from *");
@@ -650,6 +651,15 @@ COMMIT;
drop table t2;
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-19526 heap number overflow
+--echo #
+CREATE TABLE t1(a SMALLINT NOT NULL UNIQUE AUTO_INCREMENT, KEY(a))
+ENGINE=InnoDB;
+INSERT INTO t1 (a) SELECT seq FROM seq_1_to_8191;
+DROP TABLE t1;
+
#
# restore environment to the state it was before this test execution
#