summaryrefslogtreecommitdiff
path: root/sql/ha_ndbcluster.cc
diff options
context:
space:
mode:
authorunknown <mskold/marty@mysql.com/linux.site>2006-11-29 13:23:19 +0100
committerunknown <mskold/marty@mysql.com/linux.site>2006-11-29 13:23:19 +0100
commita25410c38181ebde59d300e110a417d26a2b356e (patch)
treead6029ef0cf6d4db9b7ee58f2c5999dcd3e1e465 /sql/ha_ndbcluster.cc
parent3d2c0d14f18fce16560492fa1f3aea90ec52fd40 (diff)
downloadmariadb-git-a25410c38181ebde59d300e110a417d26a2b356e.tar.gz
bug#24303 Wrong result for UPDATE IGNORE for NDB table: Read all fields for UPDATE IGNORE with pk
Diffstat (limited to 'sql/ha_ndbcluster.cc')
-rw-r--r--sql/ha_ndbcluster.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index cd2e8c28f52..558837c5b73 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -3835,6 +3835,15 @@ int ha_ndbcluster::extra(enum ha_extra_function operation)
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"));