mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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.
This commit is contained in:
@ -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]);
|
||||
|
Reference in New Issue
Block a user