1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-17333 Assertion in update_auto_increment() upon exotic LOAD

While `handler::next_insert_id` is restored on duplicate key errors
`part_share->next_auto_inc_val` is not restored which causes
discrepancy.
This commit is contained in:
Aleksey Midenkov
2018-10-08 20:38:58 +03:00
parent a92f3146d2
commit c9cba59749
6 changed files with 76 additions and 5 deletions

View File

@ -264,6 +264,17 @@ delete from t1 where a=32767;
insert into t1 values(NULL);
ERROR 22003: Out of range value for column 'a' at row 1
drop table t1;
#
# MDEV-17333 Assertion in update_auto_increment() upon exotic LOAD
#
create or replace table t1 (pk int auto_increment, x int, primary key(pk), unique key(x))
with system versioning partition by system_time interval 2 day
(partition p1 history, partition pn current);
load data infile 'load.data' ignore into table t1;
Warnings:
Warning 1062 Duplicate entry '1' for key 'x'
Warning 1062 Duplicate entry '1' for key 'x'
drop table t1;
create table t1 (pk int auto_increment primary key, f varchar(20));
insert t1 (f) values ('a'), ('b'), ('c'), ('d');
select null, f into outfile 'load.data' from t1 limit 1;