mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-24610 MEMORY SE: check overflow in info calls with HA_STATUS_AUTO
This commit is contained in:
24
mysql-test/suite/parts/r/mdev_24610.result
Normal file
24
mysql-test/suite/parts/r/mdev_24610.result
Normal file
@@ -0,0 +1,24 @@
|
||||
CREATE TABLE t (c BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY) ENGINE=MEMORY PARTITION BY KEY();
|
||||
INSERT INTO t VALUES (18446744073709551615);
|
||||
select * from t;
|
||||
c
|
||||
18446744073709551615
|
||||
drop table t;
|
||||
CREATE TABLE t (c BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY) ENGINE=MEMORY;
|
||||
INSERT INTO t VALUES (18446744073709551615);
|
||||
ALTER TABLE t PARTITION BY KEY();
|
||||
INSERT INTO t VALUES (1);
|
||||
select * from t;
|
||||
c
|
||||
18446744073709551615
|
||||
1
|
||||
drop table t;
|
||||
CREATE TABLE t (c BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY) ENGINE=MEMORY;
|
||||
INSERT INTO t VALUES (18446744073709551615);
|
||||
ALTER TABLE t PARTITION BY KEY();
|
||||
INSERT INTO t VALUES (NULL);
|
||||
ERROR HY000: Failed to read auto-increment value from storage engine
|
||||
select * from t;
|
||||
c
|
||||
18446744073709551615
|
||||
drop table t;
|
22
mysql-test/suite/parts/t/mdev_24610.test
Normal file
22
mysql-test/suite/parts/t/mdev_24610.test
Normal file
@@ -0,0 +1,22 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_partition.inc
|
||||
|
||||
CREATE TABLE t (c BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY) ENGINE=MEMORY PARTITION BY KEY();
|
||||
INSERT INTO t VALUES (18446744073709551615);
|
||||
select * from t;
|
||||
drop table t;
|
||||
|
||||
CREATE TABLE t (c BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY) ENGINE=MEMORY;
|
||||
INSERT INTO t VALUES (18446744073709551615);
|
||||
ALTER TABLE t PARTITION BY KEY();
|
||||
INSERT INTO t VALUES (1);
|
||||
select * from t;
|
||||
drop table t;
|
||||
|
||||
CREATE TABLE t (c BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY) ENGINE=MEMORY;
|
||||
INSERT INTO t VALUES (18446744073709551615);
|
||||
ALTER TABLE t PARTITION BY KEY();
|
||||
--error ER_AUTOINC_READ_FAILED
|
||||
INSERT INTO t VALUES (NULL);
|
||||
select * from t;
|
||||
drop table t;
|
Reference in New Issue
Block a user