diff options
author | unknown <gshchepa@bk-internal.mysql.com> | 2007-08-23 21:28:33 +0200 |
---|---|---|
committer | unknown <gshchepa@bk-internal.mysql.com> | 2007-08-23 21:28:33 +0200 |
commit | 294a43ec5e8644e197620a18371ca3c920f6bb5b (patch) | |
tree | abc8901289061f42cf2d35c4b5174604c1ff64c8 /mysql-test | |
parent | 10329092445029acf2a9efb8c362b9386db5c731 (diff) | |
parent | abc02d7e47b535504867aad3a921b235b68d40e7 (diff) | |
download | mariadb-git-294a43ec5e8644e197620a18371ca3c920f6bb5b.tar.gz |
Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into bk-internal.mysql.com:/users/gshchepa/mysql-5.0-opt
sql/sql_base.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/handler.result | 7 | ||||
-rw-r--r-- | mysql-test/r/query_cache.result | 29 | ||||
-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/handler.test | 14 | ||||
-rw-r--r-- | mysql-test/t/query_cache.test | 33 | ||||
-rw-r--r-- | mysql-test/t/query_cache_with_views.test (renamed from mysql-test/t/view_query_cache.test) | 0 |
6 files changed, 82 insertions, 1 deletions
diff --git a/mysql-test/r/handler.result b/mysql-test/r/handler.result index 85cf47b5806..5e123df9103 100644 --- a/mysql-test/r/handler.result +++ b/mysql-test/r/handler.result @@ -482,3 +482,10 @@ ERROR 42S02: Table 'test.t1' doesn't exist drop table if exists t1; Warnings: Note 1051 Unknown table 't1' +drop table if exists t1; +create table t1 (a int) ENGINE=MEMORY; +--> client 2 +handler t1 open; +ERROR HY000: Table storage engine for 't1' doesn't have this option +--> client 1 +drop table t1; diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index 25c6d58dee2..68f18d1b0b2 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -1621,6 +1621,35 @@ 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; 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/handler.test b/mysql-test/t/handler.test index bf18b8da941..4edd5b5ec32 100644 --- a/mysql-test/t/handler.test +++ b/mysql-test/t/handler.test @@ -427,3 +427,17 @@ select * from t1; # Just to be sure and not confuse the next test case writer. drop table if exists t1; +# +# Bug#25856 - HANDLER table OPEN in one connection lock DROP TABLE in another one +# +--disable_warnings +drop table if exists t1; +--enable_warnings +create table t1 (a int) ENGINE=MEMORY; +--echo --> client 2 +connection con2; +--error 1031 +handler t1 open; +--echo --> client 1 +connection default; +drop table t1; diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test index 3091284d061..44b63df9739 100644 --- a/mysql-test/t/query_cache.test +++ b/mysql-test/t/query_cache.test @@ -1220,9 +1220,40 @@ connection default; 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; -# End of 5.0 tests +# End of 5.0 tests 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 |