mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 02:51:44 +01:00
44a27a26e9
ha_innobase::get_auto_increment(): In the overflow check, account for 64-bit unsigned integer wrap-around. Based on mysql/mysql-server@25ecfe7f49
24 lines
599 B
Text
24 lines
599 B
Text
--source include/have_partition.inc
|
|
--source include/have_innodb.inc
|
|
|
|
--echo #
|
|
--echo # MDEV-28416 Incorrect AUTO_INCREMENT may be issued
|
|
--echo #
|
|
|
|
SET @aii=@@auto_increment_increment;
|
|
SET auto_increment_increment=300;
|
|
|
|
CREATE TABLE t1 (a SERIAL) ENGINE=innodb
|
|
PARTITION BY RANGE (a) (
|
|
PARTITION p0 VALUES LESS THAN (6),
|
|
PARTITION p1 VALUES LESS THAN MAXVALUE
|
|
);
|
|
INSERT INTO t1 VALUES (18446744073709551613);
|
|
SHOW CREATE TABLE t1;
|
|
--error HA_ERR_AUTOINC_ERANGE
|
|
INSERT INTO t1 VALUES (NULL);
|
|
SHOW CREATE TABLE t1;
|
|
DROP TABLE t1;
|
|
SET auto_increment_increment=@aii;
|
|
|
|
--echo # End of 10.2 tests
|