From 1cc765b311203c5334da92630e21c0461aaa289a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 30 Nov 2006 17:22:04 +0100 Subject: [PATCH] bug#18487 UPDATE IGNORE not supported for unique constraint violation of non-primary key: handle INSERT ... ON DUPLICATE KEY UPDATE --- sql/ha_ndbcluster.cc | 5 +++-- 1 file 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);