diff options
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r-- | sql/sql_update.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 775a77c82d2..cf1b5ac3892 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -403,6 +403,8 @@ int mysql_update(THD *thd, if (lock_tables(thd, table_list, table_count, 0)) DBUG_RETURN(1); + (void) read_statistics_for_tables_if_needed(thd, table_list); + THD_STAGE_INFO(thd, stage_init_update); if (table_list->handle_derived(thd->lex, DT_MERGE_FOR_INSERT)) DBUG_RETURN(1); @@ -1807,6 +1809,7 @@ int mysql_multi_update_prepare(THD *thd) { DBUG_RETURN(TRUE); } + (void) read_statistics_for_tables_if_needed(thd, table_list); /* @todo: downgrade the metadata locks here. */ /* |