• Daniel Black's avatar
    MDEV-29760: DROP DATABASE hangs when particular query cache is present · 7141c260
    Daniel Black authored
    Fix the regression introduced in
    dfb41fdd.
    
    In the restructure of mysql_rm_table_no_locks the early condition
    of !frm_error that enabled non_tmp_table_deleted, and hence the
    query cache invalidation, was removed.
    
    The query_cache_invalidate1(thd, dbnorm) called after
    mysql_rm_table_no_locks depends on the query cache removal
    (for unexamined reasons).
    
    Under DROP DATABASE, in mysql_rm_table_no_locks, dont_log_query
    is true preventing the late setting of non_tmp_table_deleted
    (which retained one of its purposes as a replication deletion
    of temporary tables, but not query cache invalidation).
    
    The non_temp_tables_count however can still be used to invalidate
    the query cache.
    7141c260
query_cache_notembedded.test 8.6 KB