summaryrefslogtreecommitdiff
path: root/sql/sql_cache.h
diff options
context:
space:
mode:
authorthek@adventure.(none) <>2007-08-17 16:55:20 +0200
committerthek@adventure.(none) <>2007-08-17 16:55:20 +0200
commita4248c2dd370fd7c64b4fa48085f55fd4fe41272 (patch)
treebd6aa41892045dd6b60e4f78c7d3215fb8d20bbb /sql/sql_cache.h
parent889b4ebcee0cbbc01cc1d87d04a9c2524dc49408 (diff)
downloadmariadb-git-a4248c2dd370fd7c64b4fa48085f55fd4fe41272.tar.gz
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.
Diffstat (limited to 'sql/sql_cache.h')
-rw-r--r--sql/sql_cache.h8
1 files changed, 5 insertions, 3 deletions
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: