* kpettersson@stripped <kpettersson@stripped> [07/08/17 16:55]:
> ChangeSet@stripped, 2007-08-17 14:31:35+02:00, thek@adventure.(none) +4 -0
> 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.
> +#
> +# Bug #30269 Query cache eats memory
> +#
> +--disable_warnings
> +DROP DATABASE IF EXISTS bug30269;
> +--enable_warnings
> +CREATE DATABASE bug30269;
> +USE bug30269;
> +CREATE TABLE test1 (id int, name varchar(23));
> +CREATE VIEW view1 AS SELECT id FROM test1;
> +INSERT INTO test1 VALUES (5, 'testit');
> +GRANT SELECT (id) ON TABLE bug30269.test1 TO 'bug30269'@'localhost';
> +GRANT SELECT (id) ON TABLE bug30269.view1 TO 'bug30269'@'localhost';
I think you should grant SELECT on table <view>, that is, on all
columns from the table, because otherwise you're not testing the
case when added tables have column-level grants, since the very
first table in the table list already has column-level grants.
The patch is OK to push with the adjusted test case.
--
-- Konstantin Osipov Software Developer, Moscow, Russia
-- MySQL AB, www.mysql.com The best DATABASE COMPANY in the GALAXY