Commit 6dc436fa authored by unknown's avatar unknown

ha_innodb.cc:

  Cleanup of the previous bug fix: replace code is either SQLCOM_REPLACE or SQLCOM_REPLACE_SELECT


sql/ha_innodb.cc:
  Cleanup of the previous bug fix: replace code is either SQLCOM_REPLACE or SQLCOM_REPLACE_SELECT
parent 25aa3098
...@@ -1733,7 +1733,6 @@ ha_innobase::write_row( ...@@ -1733,7 +1733,6 @@ ha_innobase::write_row(
ibool incremented_auto_inc_for_stat = FALSE; ibool incremented_auto_inc_for_stat = FALSE;
ibool incremented_auto_inc_counter = FALSE; ibool incremented_auto_inc_counter = FALSE;
ibool skip_auto_inc_decr; ibool skip_auto_inc_decr;
ibool success;
DBUG_ENTER("ha_innobase::write_row"); DBUG_ENTER("ha_innobase::write_row");
...@@ -1910,14 +1909,10 @@ ha_innobase::write_row( ...@@ -1910,14 +1909,10 @@ ha_innobase::write_row(
skip_auto_inc_decr = FALSE; skip_auto_inc_decr = FALSE;
/* Note that MySQL classifies in lex.sql_command a query if (error == DB_DUPLICATE_KEY
of type REPLACE INTO ... SELECT as simply SQLCOM_QUERY. && (user_thd->lex.sql_command == SQLCOM_REPLACE
We have to scan the query string if the query is actually || user_thd->lex.sql_command
a REPLACE. */ == SQLCOM_REPLACE_SELECT)) {
dict_accept(user_thd->query, "REPLACE", &success);
if (error == DB_DUPLICATE_KEY && success) {
skip_auto_inc_decr= TRUE; skip_auto_inc_decr= TRUE;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment