Commit 3d1af939 authored by Konstantin Osipov's avatar Konstantin Osipov

Fix a Windows failure of main.merge test introduced by

the precursor patch for Bug#52044.
When passing the TABLE instance for invalidation to the
query cache, we didn't always have a valid share
(in case of error).
Make sure we invalidate the table using TABLE_LIST, not
TABLE, object.
parent 0b217d90
...@@ -5144,7 +5144,8 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables, ...@@ -5144,7 +5144,8 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
May be something modified. Consequently, we have to May be something modified. Consequently, we have to
invalidate the query cache. invalidate the query cache.
*/ */
query_cache_invalidate3(thd, table->table, 0); table->table= 0; // For query cache
query_cache_invalidate3(thd, table, 0);
} }
} }
/* Error path, a admin command failed. */ /* Error path, a admin command failed. */
...@@ -5152,7 +5153,6 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables, ...@@ -5152,7 +5153,6 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
trans_commit_implicit(thd); trans_commit_implicit(thd);
close_thread_tables(thd); close_thread_tables(thd);
thd->mdl_context.release_transactional_locks(); thd->mdl_context.release_transactional_locks();
table->table=0; // For query cache
/* /*
If it is CHECK TABLE v1, v2, v3, and v1, v2, v3 are views, we will run If it is CHECK TABLE v1, v2, v3, and v1, v2, v3 are views, we will run
......
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