summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/query_cache.result33
-rw-r--r--mysql-test/r/query_cache_notembedded.result33
-rw-r--r--mysql-test/t/query_cache.test39
-rw-r--r--mysql-test/t/query_cache_notembedded.test36
4 files changed, 69 insertions, 72 deletions
diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result
index 5a15a87bd3c..77bc21b8124 100644
--- a/mysql-test/r/query_cache.result
+++ b/mysql-test/r/query_cache.result
@@ -1650,37 +1650,4 @@ a (select count(*) from t2)
3 0
4 0
drop table t1,t2;
-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;
End of 5.0 tests
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;
diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test
index 2cfe1ff4ccc..b3b5d08d23d 100644
--- a/mysql-test/t/query_cache.test
+++ b/mysql-test/t/query_cache.test
@@ -1,10 +1,5 @@
-- source include/have_query_cache.inc
-# Disabled on embedded due to bug #30710, "query_cache.test fails on
-# embedded w/ per-column privs test". Please re-enable when that bug
-# is resolved.
--- source include/not_embedded.inc
-
#
# Tests with query cache
#
@@ -1255,40 +1250,6 @@ disconnect user1;
disconnect user2;
disconnect user3;
-#
-# Bug #30269 Query cache eats memory
-#
---disable_warnings
-DROP DATABASE IF EXISTS bug30269;
---enable_warnings
-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;
-connect (bug30269, localhost, bug30269,,);
-connection bug30269;
-USE bug30269;
-show status like 'Qcache_queries_in_cache';
---echo # Select statement not stored in query cache because of column privileges.
-SELECT id FROM test1 WHERE id>2;
-show status like 'Qcache_queries_in_cache';
-SELECT id FROM view1 WHERE id>2;
-show status like 'Qcache_queries_in_cache';
-
-connection default;
-DROP DATABASE bug30269;
-disconnect 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;
--echo End of 5.0 tests
#
diff --git a/mysql-test/t/query_cache_notembedded.test b/mysql-test/t/query_cache_notembedded.test
index a0085c0ba31..929b93e10d5 100644
--- a/mysql-test/t/query_cache_notembedded.test
+++ b/mysql-test/t/query_cache_notembedded.test
@@ -225,3 +225,39 @@ connection default;
set GLOBAL query_cache_size=0;
SET GLOBAL log_bin_trust_function_creators = 0;
+
+#
+# Bug #30269 Query cache eats memory
+#
+--disable_warnings
+DROP DATABASE IF EXISTS bug30269;
+--enable_warnings
+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;
+connect (bug30269, localhost, bug30269,,);
+connection bug30269;
+USE bug30269;
+show status like 'Qcache_queries_in_cache';
+--echo # Select statement not stored in query cache because of column privileges.
+SELECT id FROM test1 WHERE id>2;
+show status like 'Qcache_queries_in_cache';
+SELECT id FROM view1 WHERE id>2;
+show status like 'Qcache_queries_in_cache';
+
+connection default;
+DROP DATABASE bug30269;
+disconnect 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;
+