summaryrefslogtreecommitdiff
path: root/sql/sql_cache.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_cache.cc')
-rw-r--r--sql/sql_cache.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index 302d5e95a28..fb3d201e222 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -740,7 +740,7 @@ inline void Query_cache_query::lock_writing()
remove it.
*/
-my_bool Query_cache_query::try_lock_writing()
+bool Query_cache_query::try_lock_writing()
{
DBUG_ENTER("Query_cache_block::try_lock_writing");
if (rw_trywrlock(&lock)!=0)
@@ -1679,7 +1679,8 @@ 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();
+ if (!thd->main_da.is_set())
+ thd->main_da.disable_status();
BLOCK_UNLOCK_RD(query_block);
DBUG_RETURN(1); // Result sent to client