mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-18244 Server crashes in ha_innobase::update_thd / ... / ha_partition::update_next_auto_inc_val.
Partition table with the AUTO_INCREMENT column we ahve to check if the max value is properly loaded. So we need to open all tables in INSERT PARTITION statement if necessary. Also we need to check if some tables are pruned away and not count the max autoincrement in this case.
This commit is contained in:
@ -1028,5 +1028,29 @@ COUNT(*)
|
||||
2
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-18244 Server crashes in ha_innobase::update_thd / ... / ha_partition::update_next_auto_inc_val
|
||||
#
|
||||
CREATE TABLE t1 (a INT)
|
||||
ENGINE=InnoDB
|
||||
PARTITION BY RANGE (a) (
|
||||
PARTITION p0 VALUES LESS THAN (6),
|
||||
PARTITION pn VALUES LESS THAN MAXVALUE
|
||||
);
|
||||
INSERT INTO t1 VALUES (4),(5),(6);
|
||||
ALTER TABLE t1 MODIFY a INT AUTO_INCREMENT PRIMARY KEY;
|
||||
UPDATE t1 PARTITION (p0) SET a = 3 WHERE a = 5;
|
||||
INSERT INTO t1 PARTITION(p0) VALUES ();
|
||||
ERROR HY000: Found a row not matching the given partition set
|
||||
INSERT INTO t1 PARTITION(p0) VALUES (-1);
|
||||
INSERT INTO t1 VALUES ();
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
-1
|
||||
1
|
||||
3
|
||||
4
|
||||
6
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 10.3 tests
|
||||
#
|
||||
|
Reference in New Issue
Block a user