diff options
author | unknown <mskold/marty@mysql.com/linux.site> | 2006-11-30 17:22:04 +0100 |
---|---|---|
committer | unknown <mskold/marty@mysql.com/linux.site> | 2006-11-30 17:22:04 +0100 |
commit | 1cc765b311203c5334da92630e21c0461aaa289a (patch) | |
tree | aa78d520bcc05a4eb8a287fcf3170410ff50a8f6 /sql/ha_ndbcluster.cc | |
parent | eb36371ac3830b651b75d5ab05423f45002e6bf4 (diff) | |
download | mariadb-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.cc | 5 |
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); |