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.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index f82cad27207..1748a737b07 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -1548,10 +1548,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);
}
}