List:Commits« Previous MessageNext Message »
From:Martin Skold Date:November 29 2006 3:33pm
Subject:bk commit into 5.1 tree (mskold:1.2328) BUG#24303
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of marty. When marty 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://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-11-29 15:33:11+01:00, mskold@stripped +1 -0
  bug#24303  Wrong result for UPDATE IGNORE for NDB table: Refinement, only read all
fields for UPDATE IGNORE with pk (check if UPDATE command and pk in write_set)

  sql/ha_ndbcluster.cc@stripped, 2006-11-29 15:32:46+01:00, mskold@stripped +5 -2
    bug#24303  Wrong result for UPDATE IGNORE for NDB table: Refinement, only read all
fields for UPDATE IGNORE with pk (check if UPDATE command and pk in write_set)

# 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:	mskold
# Host:	linux.site
# Root:	/windows/Linux_space/MySQL/mysql-5.1-new-ndb

--- 1.363/sql/ha_ndbcluster.cc	2006-11-29 15:33:21 +01:00
+++ 1.364/sql/ha_ndbcluster.cc	2006-11-29 15:33:21 +01:00
@@ -3835,10 +3835,13 @@ int ha_ndbcluster::extra(enum ha_extra_f
     DBUG_PRINT("info", ("HA_EXTRA_IGNORE_DUP_KEY"));
     DBUG_PRINT("info", ("Ignoring duplicate key"));
     m_ignore_dup_key= TRUE;
-    if (table_share->primary_key != MAX_KEY)
+    if (current_thd->lex->sql_command == SQLCOM_UPDATE &&
+	table_share->primary_key != MAX_KEY &&
+	bitmap_is_set(table->write_set, table_share->primary_key))
     {
       /*
-	Table has a primary key
+	An UPDATE and table has a primary key that is 
+	about to be updated
 	We need to read all fields for UPDATE IGNORE of pk
 	since this is implemented as delete+insert
       */
Thread
bk commit into 5.1 tree (mskold:1.2328) BUG#24303Martin Skold29 Nov