mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +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:
@ -1105,6 +1105,26 @@ INSERT INTO t1 VALUES (1, 7, 8, 9), (2, NULL, NULL, NULL), (3, NULL, NULL, NULL)
|
||||
SELECT COUNT(*) FROM t1 WHERE x IS NULL AND y IS NULL AND z IS NULL;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-18244 Server crashes in ha_innobase::update_thd / ... / ha_partition::update_next_auto_inc_val
|
||||
--echo #
|
||||
|
||||
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;
|
||||
--error ER_ROW_DOES_NOT_MATCH_GIVEN_PARTITION_SET
|
||||
INSERT INTO t1 PARTITION(p0) VALUES ();
|
||||
INSERT INTO t1 PARTITION(p0) VALUES (-1);
|
||||
INSERT INTO t1 VALUES ();
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.3 tests
|
||||
--echo #
|
||||
|
Reference in New Issue
Block a user