mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge mysql.com:/d2/hf/mrg/mysql-5.0-opt
into mysql.com:/d2/hf/mrg/mysql-5.1-opt mysql-test/t/loaddata.test: Auto merged sql/sql_load.cc: Auto merged mysql-test/r/loaddata.result: SCCS merged
This commit is contained in:
@ -552,7 +552,7 @@ read_fixed_length(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
|
||||
Item_field *sql_field;
|
||||
TABLE *table= table_list->table;
|
||||
ulonglong id;
|
||||
bool no_trans_update;
|
||||
bool no_trans_update, err;
|
||||
DBUG_ENTER("read_fixed_length");
|
||||
|
||||
id= 0;
|
||||
@ -644,7 +644,9 @@ read_fixed_length(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
|
||||
DBUG_RETURN(-1);
|
||||
}
|
||||
|
||||
if (write_record(thd, table, &info))
|
||||
err= write_record(thd, table, &info);
|
||||
table->auto_increment_field_not_null= FALSE;
|
||||
if (err)
|
||||
DBUG_RETURN(1);
|
||||
thd->no_trans_update= no_trans_update;
|
||||
|
||||
@ -681,7 +683,7 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
|
||||
TABLE *table= table_list->table;
|
||||
uint enclosed_length;
|
||||
ulonglong id;
|
||||
bool no_trans_update;
|
||||
bool no_trans_update, err;
|
||||
DBUG_ENTER("read_sep_field");
|
||||
|
||||
enclosed_length=enclosed.length();
|
||||
@ -728,8 +730,6 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
field->set_null();
|
||||
if (field == table->next_number_field)
|
||||
table->auto_increment_field_not_null= TRUE;
|
||||
if (!field->maybe_null())
|
||||
{
|
||||
if (field->type() == MYSQL_TYPE_TIMESTAMP)
|
||||
@ -815,8 +815,9 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
|
||||
DBUG_RETURN(-1);
|
||||
}
|
||||
|
||||
|
||||
if (write_record(thd, table, &info))
|
||||
err= write_record(thd, table, &info);
|
||||
table->auto_increment_field_not_null= FALSE;
|
||||
if (err)
|
||||
DBUG_RETURN(1);
|
||||
/*
|
||||
We don't need to reset auto-increment field since we are restoring
|
||||
|
Reference in New Issue
Block a user