1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Bug#27586: Wrong autoinc value assigned by LOAD DATA in the

NO_AUTO_VALUE_ON_ZERO mode.

The table->auto_increment_field_not_null variable wasn't reset after
reading a row which may lead to inserting a wrong value to the auto-increment
field to the following row.

The table->auto_increment_field_not_null variable is reset now right after a
row is being written in the read_fixed_length() and the read_sep_field()
functions.
Removed wrong setting of the table->auto_increment_field_not_null variable in
the read_sep_field() function.
This commit is contained in:
evgen@moonbone.local
2007-04-07 00:13:27 +04:00
parent 54bc9c3d77
commit 93c29c10b1
3 changed files with 33 additions and 7 deletions

View File

@@ -156,3 +156,12 @@ select load_file("MYSQL_TEST_DIR/t/loaddata.test");
load_file("MYSQL_TEST_DIR/t/loaddata.test")
NULL
drop table t1, t2;
create table t1(f1 int);
insert into t1 values(1),(null);
create table t2(f2 int auto_increment primary key);
select * from t2;
f2
1
2
SET @@SQL_MODE=@OLD_SQL_MODE;
drop table t1,t2;