From a4248c2dd370fd7c64b4fa48085f55fd4fe41272 Mon Sep 17 00:00:00 2001 From: "thek@adventure.(none)" <> Date: Fri, 17 Aug 2007 16:55:20 +0200 Subject: Bug #30269 Query cache eats memory Although the query cache doesn't support retrieval of statements containing column level access control, it was still possible to cache such statements thus wasting memory. This patch extends the access control check on the target tables to avoid caching a statement with column level restrictions. --- sql/sql_cache.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sql/sql_cache.h') diff --git a/sql/sql_cache.h b/sql/sql_cache.h index bc00f7ea629..34fc3a5c8d5 100644 --- a/sql/sql_cache.h +++ b/sql/sql_cache.h @@ -368,10 +368,12 @@ protected: If query is cacheable return number tables in query (query without tables not cached) */ - static TABLE_COUNTER_TYPE is_cacheable(THD *thd, uint32 query_len, char *query, - LEX *lex, TABLE_LIST *tables_used, - uint8 *tables_type); + LEX *lex, TABLE_LIST *tables_used, + uint8 *tables_type); + TABLE_COUNTER_TYPE process_and_count_tables(THD *thd, + TABLE_LIST *tables_used, + uint8 *tables_type); static my_bool ask_handler_allowance(THD *thd, TABLE_LIST *tables_used); public: -- cgit v1.2.1