diff options
Diffstat (limited to 'sql/sql_cache.cc')
-rw-r--r-- | sql/sql_cache.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index d56e246edae..c03f10c6583 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -1530,6 +1530,7 @@ def_week_frmt: %lu, in_trans: %d, autocommit: %d", thd->limit_found_rows = query->found_rows(); thd->status_var.last_query_cost= 0.0; + thd->query_plan_flags= (thd->query_plan_flags & ~QPLAN_QC_NO) | QPLAN_QC; thd->main_da.disable_status(); BLOCK_UNLOCK_RD(query_block); @@ -1538,6 +1539,10 @@ def_week_frmt: %lu, in_trans: %d, autocommit: %d", err_unlock: STRUCT_UNLOCK(&structure_guard_mutex); err: + /* + query_plan_flags doesn't have to be changed here as it contains + QPLAN_QC_NO by default + */ DBUG_RETURN(0); // Query was not cached } |