Commit 7919b143 authored by Daniel Black's avatar Daniel Black

Query cache: removed unused THD from few functions

A few query cache functions don't use THD pointer
so its removed from their interface.
parent 7141c260
...@@ -2131,8 +2131,7 @@ def_week_frmt: %zu, in_trans: %d, autocommit: %d", ...@@ -2131,8 +2131,7 @@ def_week_frmt: %zu, in_trans: %d, autocommit: %d",
("Handler require invalidation queries of %.*s %llu-%llu", ("Handler require invalidation queries of %.*s %llu-%llu",
(int)qcache_se_key_len, qcache_se_key_name, (int)qcache_se_key_len, qcache_se_key_name,
engine_data, table->engine_data())); engine_data, table->engine_data()));
invalidate_table_internal(thd, invalidate_table_internal((uchar *) table->db(),
(uchar *) table->db(),
table->key_length()); table->key_length());
} }
else else
...@@ -2381,7 +2380,7 @@ void Query_cache::invalidate(THD *thd, const char *db) ...@@ -2381,7 +2380,7 @@ void Query_cache::invalidate(THD *thd, const char *db)
if (strcmp(table->db(),db) == 0) if (strcmp(table->db(),db) == 0)
{ {
Query_cache_block_table *list_root= table_block->table(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; table_block= next;
...@@ -3320,7 +3319,7 @@ void Query_cache::invalidate_table(THD *thd, uchar * key, size_t key_length) ...@@ -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"); DEBUG_SYNC(thd, "wait_in_query_cache_invalidate2");
if (query_cache_size > 0) if (query_cache_size > 0)
invalidate_table_internal(thd, key, key_length); invalidate_table_internal(key, key_length);
unlock(); unlock();
} }
...@@ -3335,14 +3334,14 @@ void Query_cache::invalidate_table(THD *thd, uchar * key, size_t key_length) ...@@ -3335,14 +3334,14 @@ void Query_cache::invalidate_table(THD *thd, uchar * key, size_t key_length)
*/ */
void 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 *table_block=
(Query_cache_block*)my_hash_search(&tables, key, key_length); (Query_cache_block*)my_hash_search(&tables, key, key_length);
if (table_block) if (table_block)
{ {
Query_cache_block_table *list_root= table_block->table(0); 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) ...@@ -3359,8 +3358,7 @@ Query_cache::invalidate_table_internal(THD *thd, uchar *key, size_t key_length)
*/ */
void void
Query_cache::invalidate_query_block_list(THD *thd, Query_cache::invalidate_query_block_list(Query_cache_block_table *list_root)
Query_cache_block_table *list_root)
{ {
while (list_root->next != 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, ...@@ -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); 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; table_block= 0;
......
...@@ -319,7 +319,7 @@ class Query_cache ...@@ -319,7 +319,7 @@ class Query_cache
Cache_staus m_cache_status; Cache_staus m_cache_status;
void free_query_internal(Query_cache_block *point); void free_query_internal(Query_cache_block *point);
void invalidate_table_internal(THD *thd, uchar *key, size_t key_length); void invalidate_table_internal(uchar *key, size_t key_length);
protected: protected:
/* /*
...@@ -375,8 +375,7 @@ class Query_cache ...@@ -375,8 +375,7 @@ class Query_cache
void invalidate_table(THD *thd, TABLE *table); void invalidate_table(THD *thd, TABLE *table);
void invalidate_table(THD *thd, uchar *key, size_t key_length); void invalidate_table(THD *thd, uchar *key, size_t key_length);
void invalidate_table(THD *thd, Query_cache_block *table_block); void invalidate_table(THD *thd, Query_cache_block *table_block);
void invalidate_query_block_list(THD *thd, void invalidate_query_block_list(Query_cache_block_table *list_root);
Query_cache_block_table *list_root);
TABLE_COUNTER_TYPE TABLE_COUNTER_TYPE
register_tables_from_list(THD *thd, TABLE_LIST *tables_used, register_tables_from_list(THD *thd, TABLE_LIST *tables_used,
......
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