From 4e01bc8c963d9513625dd984cd1aca24b8a7b516 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Thu, 20 Dec 2018 09:52:34 +0100 Subject: MDEV-16240: Assertion `0' failed in row_sel_convert_mysql_key_to_innobase Set table in row ID position mode before using this function. --- sql/sql_update.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sql/sql_update.cc') diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 80ecd820046..1da265d7c16 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -211,6 +211,14 @@ static void prepare_record_for_error_message(int error, TABLE *table) bitmap_union(table->read_set, &unique_map); /* Tell the engine about the new set. */ table->file->column_bitmaps_signal(); + + if ((error= table->file->ha_index_or_rnd_end()) || + (error= table->file->ha_rnd_init(0))) + { + table->file->print_error(error, MYF(0)); + DBUG_VOID_RETURN; + } + /* Read record that is identified by table->file->ref. */ (void) table->file->ha_rnd_pos(table->record[1], table->file->ref); /* Copy the newly read columns into the new record. */ -- cgit v1.2.1