mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Query cache: removed unused THD from few functions
A few query cache functions don't use THD pointer so its removed from their interface.
This commit is contained in:
@ -2131,8 +2131,7 @@ lookup:
|
||||
("Handler require invalidation queries of %.*s %llu-%llu",
|
||||
(int)qcache_se_key_len, qcache_se_key_name,
|
||||
engine_data, table->engine_data()));
|
||||
invalidate_table_internal(thd,
|
||||
(uchar *) table->db(),
|
||||
invalidate_table_internal((uchar *) table->db(),
|
||||
table->key_length());
|
||||
}
|
||||
else
|
||||
@ -2381,7 +2380,7 @@ void Query_cache::invalidate(THD *thd, const char *db)
|
||||
if (strcmp(table->db(),db) == 0)
|
||||
{
|
||||
Query_cache_block_table *list_root= table_block->table(0);
|
||||
invalidate_query_block_list(thd,list_root);
|
||||
invalidate_query_block_list(list_root);
|
||||
}
|
||||
|
||||
table_block= next;
|
||||
@ -3320,7 +3319,7 @@ void Query_cache::invalidate_table(THD *thd, uchar * key, size_t key_length)
|
||||
DEBUG_SYNC(thd, "wait_in_query_cache_invalidate2");
|
||||
|
||||
if (query_cache_size > 0)
|
||||
invalidate_table_internal(thd, key, key_length);
|
||||
invalidate_table_internal(key, key_length);
|
||||
|
||||
unlock();
|
||||
}
|
||||
@ -3335,14 +3334,14 @@ void Query_cache::invalidate_table(THD *thd, uchar * key, size_t key_length)
|
||||
*/
|
||||
|
||||
void
|
||||
Query_cache::invalidate_table_internal(THD *thd, uchar *key, size_t key_length)
|
||||
Query_cache::invalidate_table_internal(uchar *key, size_t key_length)
|
||||
{
|
||||
Query_cache_block *table_block=
|
||||
(Query_cache_block*)my_hash_search(&tables, key, key_length);
|
||||
if (table_block)
|
||||
{
|
||||
Query_cache_block_table *list_root= table_block->table(0);
|
||||
invalidate_query_block_list(thd, list_root);
|
||||
invalidate_query_block_list(list_root);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3359,8 +3358,7 @@ Query_cache::invalidate_table_internal(THD *thd, uchar *key, size_t key_length)
|
||||
*/
|
||||
|
||||
void
|
||||
Query_cache::invalidate_query_block_list(THD *thd,
|
||||
Query_cache_block_table *list_root)
|
||||
Query_cache::invalidate_query_block_list(Query_cache_block_table *list_root)
|
||||
{
|
||||
while (list_root->next != list_root)
|
||||
{
|
||||
@ -3543,7 +3541,7 @@ Query_cache::insert_table(THD *thd, size_t key_len, const char *key,
|
||||
*/
|
||||
{
|
||||
Query_cache_block_table *list_root= table_block->table(0);
|
||||
invalidate_query_block_list(thd, list_root);
|
||||
invalidate_query_block_list(list_root);
|
||||
}
|
||||
|
||||
table_block= 0;
|
||||
|
Reference in New Issue
Block a user