diff options
author | unknown <gshchepa/uchum@gleb.loc> | 2007-07-20 04:21:46 +0500 |
---|---|---|
committer | unknown <gshchepa/uchum@gleb.loc> | 2007-07-20 04:21:46 +0500 |
commit | 568eccb513c4c0a1bd0553224ccd6f962f39035e (patch) | |
tree | 941c34ec63e96fde4aaf03e42d8b59e44d9ca70b /sql/sql_insert.cc | |
parent | a71eda722a5755c2d4a9cca7b1ad380a5d0d835a (diff) | |
parent | 615be59d630a84ef769a58e4e0ca0e280dbe2a71 (diff) | |
download | mariadb-git-568eccb513c4c0a1bd0553224ccd6f962f39035e.tar.gz |
Merge gleb.loc:/home/uchum/work/bk/5.1
into gleb.loc:/home/uchum/work/bk/5.1-opt
mysql-test/t/disabled.def:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_insert.cc:
SCCS merged
tests/mysql_client_test.c:
SCCS merged
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 17335f4151d..b14241bbef3 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -661,7 +661,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, /* Fill in the given fields and dump it to the table file */ - info.records= info.deleted= info.copied= info.updated= 0; + bzero((char*) &info,sizeof(info)); info.ignore= ignore; info.handle_duplicates=duplic; info.update_fields= &update_fields; @@ -1421,6 +1421,10 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info) goto before_trg_err; table->file->restore_auto_increment(prev_insert_id); + if (table->next_number_field) + table->file->adjust_next_insert_id_after_explicit_value( + table->next_number_field->val_int()); + info->touched++; if ((table->file->ha_table_flags() & HA_PARTIAL_COLUMN_READ && !bitmap_is_subset(table->write_set, table->read_set)) || compare_record(table)) @@ -1449,9 +1453,6 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info) handled separately by THD::arg_of_last_insert_id_function. */ insert_id_for_cur_row= table->file->insert_id_for_cur_row= 0; - if (table->next_number_field) - table->file->adjust_next_insert_id_after_explicit_value( - table->next_number_field->val_int()); trg_error= (table->triggers && table->triggers->process_triggers(thd, TRG_EVENT_UPDATE, TRG_ACTION_AFTER, TRUE)); |