diff options
author | evgen@moonbone.local <> | 2007-02-07 00:46:03 +0300 |
---|---|---|
committer | evgen@moonbone.local <> | 2007-02-07 00:46:03 +0300 |
commit | 968369906efe7fa628caeb0e15731770161e7e7c (patch) | |
tree | 56c0e739bcc59645b6b36a4c468a1034d31858df /sql/sql_update.cc | |
parent | 5092f7ab269c75273c791201eb0cc803a2f456ee (diff) | |
download | mariadb-git-968369906efe7fa628caeb0e15731770161e7e7c.tar.gz |
Bug#19978: INSERT .. ON DUPLICATE erroneously reports some records were
updated.
INSERT ... ON DUPLICATE KEY UPDATE reports that a record was updated when
the duplicate key occurs even if the record wasn't actually changed
because the update values are the same as those in the record.
Now the compare_record() function is used to check whether the record was
changed and the update of a record reported only if the record differs
from the original one.
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r-- | sql/sql_update.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc index b85c617b12d..04d341b5f67 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -26,7 +26,7 @@ /* Return 0 if row hasn't changed */ -static bool compare_record(TABLE *table, query_id_t query_id) +bool compare_record(TABLE *table, query_id_t query_id) { if (table->s->blob_fields + table->s->varchar_fields == 0) return cmp_record(table,record[1]); |