Commit c32f7ed2 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-17377 invalid gap in auto-increment values after LOAD DATA

reset lex->many_values for LOAD DATA, as it's used for
auto-inc range size estimation.
parent 9ff9d230
......@@ -264,3 +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;
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;
load data infile 'load.data' into table t1;
insert t1 (f) values ('<===');
select * from t1;
pk f
1 a
2 b
3 c
4 d
5 a
6 <===
drop table t1;
......@@ -5,3 +5,14 @@
--source include/have_innodb.inc
set default_storage_engine=innodb;
--source auto_increment_ranges.inc
#
# MDEV-17377 invalid gap in auto-increment values after LOAD DATA
#
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;
load data infile 'load.data' into table t1;
insert t1 (f) values ('<===');
select * from t1;
drop table t1;
......@@ -12073,6 +12073,7 @@ load:
lex->field_list.empty();
lex->update_list.empty();
lex->value_list.empty();
lex->many_values.empty();
}
opt_load_data_charset
{ Lex->exchange->cs= $14; }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment