diff options
Diffstat (limited to 'sql/handler.cc')
-rw-r--r-- | sql/handler.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index a5832be30e1..9b66801b109 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -6041,7 +6041,13 @@ int handler::update_first_row(uchar *new_data) { int end_error; if (!(error= ha_rnd_next(table->record[1]))) - error= update_row(table->record[1], new_data); + { + /* + We have to do the memcmp as otherwise we may get error 169 from InnoDB + */ + if (memcmp(table->record[0], table->record[1], table->s->reclength)) + error= update_row(table->record[1], new_data); + } end_error= ha_rnd_end(); if (!error) error= end_error; |