mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-29742 heap number overflow
A previous fix in commit efd8af535a
failed to cover ALTER TABLE.
PageBulk::isSpaceAvailable(): Check for record heap number overflow.
This commit is contained in:
@@ -1081,9 +1081,11 @@ COMMIT;
|
|||||||
drop table t2;
|
drop table t2;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
# MDEV-19526 heap number overflow
|
# MDEV-19526/MDEV-29742 heap number overflow
|
||||||
#
|
#
|
||||||
CREATE TABLE t1(a SMALLINT NOT NULL UNIQUE AUTO_INCREMENT, KEY(a))
|
CREATE TABLE t1(a SMALLINT NOT NULL UNIQUE AUTO_INCREMENT, KEY(a))
|
||||||
ENGINE=InnoDB;
|
ENGINE=InnoDB;
|
||||||
INSERT INTO t1 (a) SELECT seq FROM seq_1_to_8191;
|
INSERT INTO t1 (a) SELECT seq FROM seq_1_to_8191;
|
||||||
|
ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
# End of 10.3 tests
|
||||||
|
@@ -641,9 +641,12 @@ drop table t2;
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # MDEV-19526 heap number overflow
|
--echo # MDEV-19526/MDEV-29742 heap number overflow
|
||||||
--echo #
|
--echo #
|
||||||
CREATE TABLE t1(a SMALLINT NOT NULL UNIQUE AUTO_INCREMENT, KEY(a))
|
CREATE TABLE t1(a SMALLINT NOT NULL UNIQUE AUTO_INCREMENT, KEY(a))
|
||||||
ENGINE=InnoDB;
|
ENGINE=InnoDB;
|
||||||
INSERT INTO t1 (a) SELECT seq FROM seq_1_to_8191;
|
INSERT INTO t1 (a) SELECT seq FROM seq_1_to_8191;
|
||||||
|
ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo # End of 10.3 tests
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
Copyright (c) 2014, 2019, Oracle and/or its affiliates. All Rights Reserved.
|
Copyright (c) 2014, 2019, Oracle and/or its affiliates. All Rights Reserved.
|
||||||
Copyright (c) 2017, 2021, MariaDB Corporation.
|
Copyright (c) 2017, 2022, MariaDB Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it under
|
This program is free software; you can redistribute it and/or modify it under
|
||||||
the terms of the GNU General Public License as published by the Free Software
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
@@ -597,6 +597,11 @@ bool
|
|||||||
PageBulk::isSpaceAvailable(
|
PageBulk::isSpaceAvailable(
|
||||||
ulint rec_size)
|
ulint rec_size)
|
||||||
{
|
{
|
||||||
|
if (m_rec_no >= 8190) {
|
||||||
|
ut_ad(srv_page_size == 65536);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
ulint slot_size;
|
ulint slot_size;
|
||||||
ulint required_space;
|
ulint required_space;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user