summaryrefslogtreecommitdiff
path: root/sql/ha_ndbcluster.cc
diff options
context:
space:
mode:
authorunknown <mskold/marty@mysql.com/linux.site>2006-11-30 17:22:04 +0100
committerunknown <mskold/marty@mysql.com/linux.site>2006-11-30 17:22:04 +0100
commit1cc765b311203c5334da92630e21c0461aaa289a (patch)
treeaa78d520bcc05a4eb8a287fcf3170410ff50a8f6 /sql/ha_ndbcluster.cc
parenteb36371ac3830b651b75d5ab05423f45002e6bf4 (diff)
downloadmariadb-git-1cc765b311203c5334da92630e21c0461aaa289a.tar.gz
bug#18487 UPDATE IGNORE not supported for unique constraint violation of non-primary key: handle INSERT ... ON DUPLICATE KEY UPDATE
Diffstat (limited to 'sql/ha_ndbcluster.cc')
-rw-r--r--sql/ha_ndbcluster.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index b819a1bf5a4..66ee52a54d3 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -2388,9 +2388,10 @@ int ha_ndbcluster::update_row(const byte *old_data, byte *new_data)
DBUG_ENTER("update_row");
/*
- * If IGNORE the ignore constraint violations on primary and unique keys
+ * If IGNORE the ignore constraint violations on primary and unique keys,
+ * but check that it is not part of INSERT ... ON DUPLICATE KEY UPDATE
*/
- if (m_ignore_dup_key)
+ if (m_ignore_dup_key && thd->lex->sql_command != SQLCOM_INSERT)
{
int peek_res= peek_indexed_rows(new_data);