summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <thek@adventure.(none)>2007-08-21 14:54:09 +0200
committerunknown <thek@adventure.(none)>2007-08-21 14:54:09 +0200
commit7dd4e789586bef5141e1a1d4da4b7efc271708aa (patch)
treed32434c8034057081770a1fac2c64617c0b8d0b3 /mysql-test
parent5f40dafcd335fff4b4392cc6192a6eb074d491bd (diff)
parent863eb5d5098787656b740b222f1741a9363007ad (diff)
downloadmariadb-git-7dd4e789586bef5141e1a1d4da4b7efc271708aa.tar.gz
Merge kpettersson@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into adventure.(none):/home/thek/Development/cpp/mysql-5.1-runtime mysql-test/r/query_cache.result: Auto merged mysql-test/t/query_cache.test: Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/query_cache.result9
-rw-r--r--mysql-test/r/query_cache_with_views.result (renamed from mysql-test/r/view_query_cache.result)0
-rw-r--r--mysql-test/t/query_cache.test5
-rw-r--r--mysql-test/t/query_cache_with_views.test (renamed from mysql-test/t/view_query_cache.test)0
4 files changed, 11 insertions, 3 deletions
diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result
index 4c76f5f83f4..321b08628ee 100644
--- a/mysql-test/r/query_cache.result
+++ b/mysql-test/r/query_cache.result
@@ -1651,10 +1651,11 @@ a (select count(*) from t2)
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 id FROM test1;
+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';
@@ -1663,15 +1664,19 @@ 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 0
+Qcache_queries_in_cache 1
DROP DATABASE bug30269;
DROP USER 'bug30269'@'localhost';
set GLOBAL query_cache_type=default;
diff --git a/mysql-test/r/view_query_cache.result b/mysql-test/r/query_cache_with_views.result
index 03430bd504b..03430bd504b 100644
--- a/mysql-test/r/view_query_cache.result
+++ b/mysql-test/r/query_cache_with_views.result
diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test
index 9e33004ae02..e10428bdbb5 100644
--- a/mysql-test/t/query_cache.test
+++ b/mysql-test/t/query_cache.test
@@ -1256,10 +1256,11 @@ disconnect user3;
--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 id FROM test1;
+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';
@@ -1268,7 +1269,9 @@ 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';
diff --git a/mysql-test/t/view_query_cache.test b/mysql-test/t/query_cache_with_views.test
index d4ebe45b7ac..d4ebe45b7ac 100644
--- a/mysql-test/t/view_query_cache.test
+++ b/mysql-test/t/query_cache_with_views.test