diff options
author | unknown <holyfoot/hf@hfmain.(none)> | 2007-04-29 13:19:32 +0500 |
---|---|---|
committer | unknown <holyfoot/hf@hfmain.(none)> | 2007-04-29 13:19:32 +0500 |
commit | 2031f55751dad44950252ab711cde893b3bce674 (patch) | |
tree | edfad9e83a97b7f6eef66878ef43a7c0cf00d858 /storage | |
parent | 8f374c8f34221467061feca44fd67898dbb21701 (diff) | |
parent | 7eb77da33a7da7c56053164793012f1091048350 (diff) | |
download | mariadb-git-2031f55751dad44950252ab711cde893b3bce674.tar.gz |
Merge mysql.com:/d2/hf/mrg/mysql-5.0-opt
into mysql.com:/d2/hf/mrg/mysql-5.1-opt
mysql-test/r/alter_table.result:
Auto merged
mysql-test/r/distinct.result:
Auto merged
mysql-test/r/heap.result:
Auto merged
mysql-test/r/ps_2myisam.result:
Auto merged
mysql-test/r/ps_3innodb.result:
Auto merged
mysql-test/r/ps_4heap.result:
Auto merged
mysql-test/r/ps_5merge.result:
Auto merged
mysql-test/r/ps_7ndb.result:
Auto merged
mysql-test/r/query_cache.result:
Auto merged
BitKeeper/deleted/.del-CMakeLists.txt~1:
Auto merged
BitKeeper/deleted/.del-ps_6bdb.result:
Auto merged
mysql-test/t/alter_table.test:
Auto merged
mysys/my_error.c:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_sum.cc:
Auto merged
sql/key.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/table.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
mysql-test/include/mix1.inc:
merging
mysql-test/r/group_by.result:
SCCS merged
mysql-test/r/innodb_mysql.result:
merging
mysql-test/r/join.result:
merging
mysql-test/r/subselect.result:
merging
mysql-test/r/type_datetime.result:
SCCS merged
mysql-test/r/windows.result:
SCCS merged
mysql-test/t/group_by.test:
SCCS merged
mysql-test/t/join.test:
merging
mysql-test/t/subselect.test:
merging
mysql-test/t/type_datetime.test:
merging
mysql-test/t/windows.test:
SCCS merged
sql/item_timefunc.cc:
merging
sql/sql_base.cc:
SCCS merged
storage/innobase/handler/ha_innodb.cc:
merging
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 1932f775a3d..035d70bfb3c 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -3520,26 +3520,28 @@ no_commit: /* This call will update the counter according to the value that was inserted in the table */ - dict_table_autoinc_update(prebuilt->table, auto_inc); - } - } - - /* A REPLACE command and LOAD DATA INFILE REPLACE handle a duplicate - key error themselves, and we must update the autoinc counter if we are - performing those statements. */ - - if (error == DB_DUPLICATE_KEY && auto_inc_used - && (user_thd->lex->sql_command == SQLCOM_REPLACE - || user_thd->lex->sql_command == SQLCOM_REPLACE_SELECT - || (user_thd->lex->sql_command == SQLCOM_LOAD - && user_thd->lex->duplicates == DUP_REPLACE))) { - - auto_inc = table->next_number_field->val_int(); - - if (auto_inc != 0) { - dict_table_autoinc_update(prebuilt->table, auto_inc); - } - } + dict_table_autoinc_update(prebuilt->table, auto_inc); + } + } + + /* A REPLACE command and LOAD DATA INFILE REPLACE handle a duplicate + key error themselves, and we must update the autoinc counter if we are + performing those statements. */ + + if (error == DB_DUPLICATE_KEY && auto_inc_used + && (user_thd->lex->sql_command == SQLCOM_REPLACE + || user_thd->lex->sql_command == SQLCOM_REPLACE_SELECT + || (user_thd->lex->sql_command == SQLCOM_INSERT + && user_thd->lex->duplicates == DUP_UPDATE) + || (user_thd->lex->sql_command == SQLCOM_LOAD + && user_thd->lex->duplicates == DUP_REPLACE))) { + + auto_inc = table->next_number_field->val_int(); + + if (auto_inc != 0) { + dict_table_autoinc_update(prebuilt->table, auto_inc); + } + } innodb_srv_conc_exit_innodb(prebuilt->trx); |