diff options
author | unknown <thek@adventure.(none)> | 2007-10-16 14:42:42 +0200 |
---|---|---|
committer | unknown <thek@adventure.(none)> | 2007-10-16 14:42:42 +0200 |
commit | 1f8126190b6b77336859ed04a165e1f737d66a80 (patch) | |
tree | 864c1ee3099f0312b727ad1106b91824414486b4 /mysql-test/r/query_cache_notembedded.result | |
parent | ded7fe7fd16d35b0a63a7a417b67fdd31df5033d (diff) | |
download | mariadb-git-1f8126190b6b77336859ed04a165e1f737d66a80.tar.gz |
Bug#30710 query_cache.test fails on embedded - per-column privs test
The embedded version of the server doesn't use column level grants, and
the compile directive NO_EMBEDDED_ACCESS_CHECKS should be checked instead of
the redundant HAVE_QUERY_CACHE (which is always the case) to determine if
column level grants should be compiled or not.
mysql-test/r/query_cache.result:
Updated result file
mysql-test/r/query_cache_notembedded.result:
Updated result file
mysql-test/t/query_cache.test:
Moved test with GRANT to query_cache_notembedded test.
mysql-test/t/query_cache_notembedded.test:
Moved test with GRANT to query_cache_notembedded test.
sql/sql_cache.cc:
Changed the conditional compilation directive to only compile column level grant
checks if NO_EMBEDDED_ACCESS_CHECKS isn't defined.
Diffstat (limited to 'mysql-test/r/query_cache_notembedded.result')
-rw-r--r-- | mysql-test/r/query_cache_notembedded.result | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/mysql-test/r/query_cache_notembedded.result b/mysql-test/r/query_cache_notembedded.result index 05ef28a3180..ec78c2267d2 100644 --- a/mysql-test/r/query_cache_notembedded.result +++ b/mysql-test/r/query_cache_notembedded.result @@ -347,3 +347,36 @@ drop table t1; drop function f1; set GLOBAL query_cache_size=0; SET GLOBAL log_bin_trust_function_creators = 0; +DROP DATABASE IF EXISTS bug30269; +FLUSH STATUS; +CREATE DATABASE bug30269; +USE bug30269; +CREATE TABLE test1 (id int, name varchar(23)); +CREATE VIEW view1 AS SELECT * FROM test1; +INSERT INTO test1 VALUES (5, 'testit'); +GRANT SELECT (id) ON TABLE bug30269.test1 TO 'bug30269'@'localhost'; +GRANT SELECT ON TABLE bug30269.view1 TO 'bug30269'@'localhost'; +set global query_cache_size= 81920; +USE bug30269; +show status like 'Qcache_queries_in_cache'; +Variable_name Value +Qcache_queries_in_cache 0 +# Select statement not stored in query cache because of column privileges. +SELECT id FROM test1 WHERE id>2; +id +5 +show status like 'Qcache_queries_in_cache'; +Variable_name Value +Qcache_queries_in_cache 0 +SELECT id FROM view1 WHERE id>2; +id +5 +show status like 'Qcache_queries_in_cache'; +Variable_name Value +Qcache_queries_in_cache 1 +DROP DATABASE bug30269; +DROP USER 'bug30269'@'localhost'; +set GLOBAL query_cache_type=default; +set GLOBAL query_cache_limit=default; +set GLOBAL query_cache_min_res_unit=default; +set GLOBAL query_cache_size=default; |