summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
authorunknown <antony@ltantony.rdg.cyberkinetica.homeunix.net>2004-09-17 12:07:59 +0100
committerunknown <antony@ltantony.rdg.cyberkinetica.homeunix.net>2004-09-17 12:07:59 +0100
commite84eb55a0778ca62490c79136b9a09379b02773a (patch)
tree12878461e1b99764efc13a661bdf0671ab73b620 /sql/sql_update.cc
parenta2d94d92f5b462d64aa33cdef8e0a0c0ae2297ae (diff)
downloadmariadb-git-e84eb55a0778ca62490c79136b9a09379b02773a.tar.gz
Bug#5553 - Multi table UPDATE IGNORE fails on dup key
We don't want the update to abort when IGNORE is specified mysql-test/r/update.result: Bug#5553 - UPDATE IGNORE fails on dup key New test mysql-test/t/update.test: Bug#5553 - UPDATE IGNORE fails on dup key New test BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r--sql/sql_update.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 02d2fe2c442..d51c81ee127 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -792,9 +792,13 @@ bool multi_update::send_data(List<Item> &not_used_values)
if ((error=table->file->update_row(table->record[1],
table->record[0])))
{
- table->file->print_error(error,MYF(0));
updated--;
- DBUG_RETURN(1);
+ if (handle_duplicates != DUP_IGNORE ||
+ error != HA_ERR_FOUND_DUPP_KEY)
+ {
+ table->file->print_error(error,MYF(0));
+ DBUG_RETURN(1);
+ }
}
}
}