Commit 6816cf6a authored by Davi Arnaut's avatar Davi Arnaut

Bug#34306: Can't make copy of log tables when server binary log is enabled

Post-merge bug fix: lock_type is a enumeration type and not a bit mask.

sql/sql_cache.cc:
  Check for lock type explicitly. Also err on the safe side and
  invalidate the query cache for any write lock.
parent 2714b57b
......@@ -1542,10 +1542,9 @@ void Query_cache::invalidate_locked_for_write(TABLE_LIST *tables_used)
for (; tables_used; tables_used= tables_used->next_local)
{
thd_proc_info(thd, "invalidating query cache entries (table)");
if (tables_used->lock_type & (TL_WRITE_LOW_PRIORITY | TL_WRITE) &&
if (tables_used->lock_type >= TL_WRITE_ALLOW_WRITE &&
tables_used->table)
{
THD *thd= current_thd;
invalidate_table(thd, tables_used->table);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment