Commit f6d73e5c authored by unknown's avatar unknown
Browse files

BUG#23655 deadlock in query cache ndb_cache tests with --debug

Deadlock when running ndb_cache tests with --debug. Query cache locks on trying
to acquire lock.


sql/sql_cache.cc:
  in query_cache_end_of_result, unlock in reverse order of locking.
  
  also make it possible to run with --debug without hanging.
parent 98713853
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -747,11 +747,10 @@ void query_cache_end_of_result(THD *thd)
    header->result()->type= Query_cache_block::RESULT;
    header->writer(0);
    thd->net.query_cache_query= 0;
    DBUG_EXECUTE("check_querycache",query_cache.check_integrity(1););

    STRUCT_UNLOCK(&query_cache.structure_guard_mutex);

    BLOCK_UNLOCK_WR(query_block);
    DBUG_EXECUTE("check_querycache",query_cache.check_integrity(1););
    STRUCT_UNLOCK(&query_cache.structure_guard_mutex);
  }
  else
  {