summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Black <daniel@mariadb.org>2022-11-25 17:28:09 +1100
committerDaniel Black <daniel@mariadb.org>2022-11-26 04:05:19 +1100
commit7919b14387179260c5ae0af4bff3f5ee4ae82cb6 (patch)
tree3a319667d87fdc10d8fcf1f6f96b1d115e127f20
parent7141c260948ab48702482b350797638877130fbf (diff)
downloadmariadb-git-7919b14387179260c5ae0af4bff3f5ee4ae82cb6.tar.gz
Query cache: removed unused THD from few functions
A few query cache functions don't use THD pointer so its removed from their interface.
-rw-r--r--sql/sql_cache.cc16
-rw-r--r--sql/sql_cache.h5
2 files changed, 9 insertions, 12 deletions
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index 60ac8274d84..8655a75a455 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -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;
diff --git a/sql/sql_cache.h b/sql/sql_cache.h
index 372d697015e..3c561b3bd15 100644
--- a/sql/sql_cache.h
+++ b/sql/sql_cache.h
@@ -319,7 +319,7 @@ private:
Cache_staus m_cache_status;
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:
/*
@@ -375,8 +375,7 @@ protected:
void invalidate_table(THD *thd, TABLE *table);
void invalidate_table(THD *thd, uchar *key, size_t key_length);
void invalidate_table(THD *thd, Query_cache_block *table_block);
- void invalidate_query_block_list(THD *thd,
- Query_cache_block_table *list_root);
+ void invalidate_query_block_list(Query_cache_block_table *list_root);
TABLE_COUNTER_TYPE
register_tables_from_list(THD *thd, TABLE_LIST *tables_used,