mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
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.
This commit is contained in:
@@ -1084,3 +1084,10 @@ update t2 set col145=@b;
|
||||
COMMIT;
|
||||
drop table t2;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-19526 heap number overflow
|
||||
#
|
||||
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;
|
||||
|
Reference in New Issue
Block a user