From 29ed440d4457a3cc2ab8c22674eb5dc8f0ac0ce6 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 22 Jan 2017 17:14:36 +0100 Subject: MDEV-11836 vcol.vcol_keys_myisam fails in buildbot and outside move TABLE::key_read into handler. Because in index merge and DS-MRR there can be many handlers per table, and some of them use key read while others don't. "keyread" is really per handler, not per TABLE property. --- sql/sql_update.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sql/sql_update.cc') diff --git a/sql/sql_update.cc b/sql/sql_update.cc index c46b80f798b..4aa68c51b3e 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -682,7 +682,7 @@ int mysql_update(THD *thd, if (error >= 0) goto err; } - table->set_keyread(false); + table->file->ha_end_keyread(); table->column_bitmaps_set(save_read_set, save_write_set); } @@ -1032,7 +1032,7 @@ err: delete select; delete file_sort; free_underlaid_joins(thd, select_lex); - table->set_keyread(false); + table->file->ha_end_keyread(); thd->abort_on_warning= 0; DBUG_RETURN(1); @@ -2404,7 +2404,8 @@ int multi_update::do_updates() } while ((tbl= check_opt_it++)); if (table->vfield && - table->update_virtual_fields(VCOL_UPDATE_INDEXED_FOR_UPDATE)) + table->update_virtual_fields(table->file, + VCOL_UPDATE_INDEXED_FOR_UPDATE)) goto err2; table->status|= STATUS_UPDATED; @@ -2431,7 +2432,7 @@ int multi_update::do_updates() (error= table->update_default_fields(1, ignore))) goto err2; if (table->vfield && - table->update_virtual_fields(VCOL_UPDATE_FOR_WRITE)) + table->update_virtual_fields(table->file, VCOL_UPDATE_FOR_WRITE)) goto err2; if ((error= cur_table->view_check_option(thd, ignore)) != VIEW_CHECK_OK) -- cgit v1.2.1