summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <antony@ltantony.mysql.com>2005-05-07 13:31:37 +0100
committerunknown <antony@ltantony.mysql.com>2005-05-07 13:31:37 +0100
commitbb42494438aa33eba06506724fea1a1485979b1f (patch)
tree74e4baf3febad432c2835bfd2ef999eb4473bd17 /sql
parentcae0d72898effe5e2e9d620562f01335fe1959ea (diff)
downloadmariadb-git-bb42494438aa33eba06506724fea1a1485979b1f.tar.gz
Bug#9725 - "disapearing query/hang" and "unknown error" with "on duplicate key update"
INSERT IGNORE...UPDATE causes break in protocol or unknown error message. Fix so that protocol doesn't break by properly ignoring dups. mysql-test/r/insert_update.result: Test for Bug#9725 mysql-test/t/insert_update.test: Test for Bug#9725 sql/sql_insert.cc: Ignore the failure in update_row when IGNORE is set. BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_insert.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 3ced5921076..a3a42ce385d 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -632,7 +632,11 @@ int write_record(TABLE *table,COPY_INFO *info)
if (fill_record(*info->update_fields, *info->update_values, 0))
goto err;
if ((error=table->file->update_row(table->record[1],table->record[0])))
+ {
+ if ((error == HA_ERR_FOUND_DUPP_KEY) && info->ignore)
+ break;
goto err;
+ }
info->updated++;
break;
}