diff options
author | unknown <holyfoot/hf@hfmain.(none)> | 2007-04-09 11:46:58 +0500 |
---|---|---|
committer | unknown <holyfoot/hf@hfmain.(none)> | 2007-04-09 11:46:58 +0500 |
commit | 37feda2596128fec33ac0e4fe8ff0cd35efd1dec (patch) | |
tree | 9f49733e328a5be3338fddb8a75cab6800d84591 /sql | |
parent | 7f993fa6789d92b7927e76ba00d356a6409e4ce0 (diff) | |
parent | d2667d1a6ebe7feeb8b80fcc5cfefac80ed729b0 (diff) | |
download | mariadb-git-37feda2596128fec33ac0e4fe8ff0cd35efd1dec.tar.gz |
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
Diffstat (limited to 'sql')
-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 4838474b115..41de2c86740 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -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 |