logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

bk commit into 4.0 tree (1.1544): msg#00447

Subject: bk commit into 4.0 tree (1.1544)
Below is the list of changes that have just been committed into a local
4.0 repository of heikki. When heikki does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://www.mysql.com/doc/I/n/Installing_source_tree.html

ChangeSet
  1.1544 03/01/29 02:19:00 heikki@xxxxxxxxxxxxxxx +1 -0
  ha_innodb.cc:
    Cleanup of the previous bug fix: replace code is either SQLCOM_REPLACE or 
SQLCOM_REPLACE_SELECT

  sql/ha_innodb.cc
    1.148 03/01/29 02:18:31 heikki@xxxxxxxxxxxxxxx +4 -9
    Cleanup of the previous bug fix: replace code is either SQLCOM_REPLACE or 
SQLCOM_REPLACE_SELECT

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: heikki
# Host: hundin.mysql.fi
# Root: /home/heikki/mysql-4.0

--- 1.147/sql/ha_innodb.cc      Wed Jan 29 00:31:45 2003
+++ 1.148/sql/ha_innodb.cc      Wed Jan 29 02:18:31 2003
@@ -1733,7 +1733,6 @@
        ibool           incremented_auto_inc_for_stat = FALSE;
        ibool           incremented_auto_inc_counter = FALSE;
        ibool           skip_auto_inc_decr;
-       ibool           success;
 
        DBUG_ENTER("ha_innobase::write_row");
 
@@ -1910,14 +1909,10 @@
 
                skip_auto_inc_decr = FALSE;
 
-               /* Note that MySQL classifies in lex.sql_command a query
-               of type REPLACE INTO ... SELECT as simply SQLCOM_QUERY.
-               We have to scan the query string if the query is actually
-               a REPLACE. */
-
-               dict_accept(user_thd->query, "REPLACE", &success);
-
-               if (error == DB_DUPLICATE_KEY && success) {
+               if (error == DB_DUPLICATE_KEY
+                   && (user_thd->lex.sql_command == SQLCOM_REPLACE
+                       || user_thd->lex.sql_command
+                                        == SQLCOM_REPLACE_SELECT)) {
 
                        skip_auto_inc_decr= TRUE;
                }

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail internals-thread6728@xxxxxxxxxxxxxxx
To unsubscribe, e-mail <internals-unsubscribe@xxxxxxxxxxxxxxx>




<Prev in Thread] Current Thread [Next in Thread>