From: Date: November 29 2006 1:23pm Subject: bk commit into 5.1 tree (mskold:1.2327) BUG#24303 List-Archive: http://lists.mysql.com/commits/16101 X-Bug: 24303 Message-Id: <20061129122332.4E3E82014CE@linux.site> 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 13:23:19+01:00, mskold@stripped +2 -0 bug#24303 Wrong result for UPDATE IGNORE for NDB table: Read all fields for UPDATE IGNORE with pk mysql-test/r/ndb_update.result@stripped, 2006-11-29 13:22:52+01:00, mskold@stripped +1 -1 bug#24303 Wrong result for UPDATE IGNORE for NDB table: Read all fields for UPDATE IGNORE with pk sql/ha_ndbcluster.cc@stripped, 2006-11-29 13:22:52+01:00, mskold@stripped +9 -0 bug#24303 Wrong result for UPDATE IGNORE for NDB table: Read all fields for UPDATE IGNORE with pk # 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.362/sql/ha_ndbcluster.cc 2006-11-29 13:23:32 +01:00 +++ 1.363/sql/ha_ndbcluster.cc 2006-11-29 13:23:32 +01:00 @@ -3835,6 +3835,15 @@ 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) + { + /* + Table has a primary key + We need to read all fields for UPDATE IGNORE of pk + since this is implemented as delete+insert + */ + bitmap_set_all(table->read_set); + } break; case HA_EXTRA_NO_IGNORE_DUP_KEY: DBUG_PRINT("info", ("HA_EXTRA_NO_IGNORE_DUP_KEY")); --- 1.15/mysql-test/r/ndb_update.result 2006-11-29 13:23:32 +01:00 +++ 1.16/mysql-test/r/ndb_update.result 2006-11-29 13:23:32 +01:00 @@ -18,7 +18,7 @@ pk1 b c 2 2 2 4 1 1 UPDATE t1 set pk1 = 4 where pk1 = 2; -ERROR 23000: Duplicate entry '4' for key 1 +ERROR 23000: Duplicate entry '4' for key 'PRIMARY' UPDATE IGNORE t1 set pk1 = 4 where pk1 = 2; select * from t1 order by pk1; pk1 b c