diff options
author | unknown <evgen@moonbone.local> | 2007-04-07 23:09:09 +0400 |
---|---|---|
committer | unknown <evgen@moonbone.local> | 2007-04-07 23:09:09 +0400 |
commit | 1f8dbdaf3a2bd06a87ed9fba93acb742c86fa83b (patch) | |
tree | 1292521ec36166f03dd5e7d7e696e4b38cbac0ae /sql/sql_load.cc | |
parent | a978d84cbc24178b804a0adea51be08cc7c660d9 (diff) | |
parent | b5cf43c9027b9057b38ffe908a7c1815a0f809d1 (diff) | |
download | mariadb-git-1f8dbdaf3a2bd06a87ed9fba93acb742c86fa83b.tar.gz |
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into moonbone.local:/mnt/gentoo64/work/27586-bug-5.0-opt-mysql
sql/sql_load.cc:
Auto merged
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r-- | sql/sql_load.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc index 6984da6a0b0..a9847e39518 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -532,7 +532,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; @@ -624,7 +624,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; @@ -669,7 +671,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(); @@ -716,8 +718,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() == FIELD_TYPE_TIMESTAMP) @@ -803,8 +803,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); /* If auto_increment values are used, save the first one for |