diff options
author | unknown <bell@sanja.is.com.ua> | 2005-01-05 16:48:23 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2005-01-05 16:48:23 +0200 |
commit | 47dc78e6a3bb6554504da0869705c2155d7b772d (patch) | |
tree | 2d4c17ce2b2688d209f1864bea4459a6021d896a /mysql-test/t/view_query_cache.test | |
parent | 4fd1524c0a0e3fed746a8f2af743cafbb12abfd4 (diff) | |
download | mariadb-git-47dc78e6a3bb6554504da0869705c2155d7b772d.tar.gz |
fixed views with PS protocol
mysql-test/r/view.result:
query cache part moved to separate test
mysql-test/t/view.test:
query cache part moved to separate test
sql/item_func.cc:
fixed for safety
sql/sql_base.cc:
do not use real table call with view
fixed wrapping * substitured items
fixed fix_fields call parameter (refference)
sql/sql_yacc.yy:
added initialisation of SELECT in commands which can use subqueries
sql/table.cc:
fised fix_fields call parameter
sql/table.h:
new view specific method
Diffstat (limited to 'mysql-test/t/view_query_cache.test')
-rw-r--r-- | mysql-test/t/view_query_cache.test | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/mysql-test/t/view_query_cache.test b/mysql-test/t/view_query_cache.test new file mode 100644 index 00000000000..dd9c8006915 --- /dev/null +++ b/mysql-test/t/view_query_cache.test @@ -0,0 +1,58 @@ +-- source include/have_query_cache.inc +# +# QUERY CACHE options for VIEWs +# +set GLOBAL query_cache_size=1355776; +flush status; +create table t1 (a int, b int); + +# queries with following views should not be in query cache +create view v1 (c,d) as select sql_no_cache a,b from t1; +create view v2 (c,d) as select a+rand(),b from t1; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +select * from v1; +select * from v2; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +select * from v1; +select * from v2; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; + +drop view v1,v2; + +# SQL_CACHE option +set query_cache_type=demand; +flush status; +# query with view will be cached, but direct acess to table will not +create view v1 (c,d) as select sql_cache a,b from t1; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +select * from v1; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +select * from t1; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +select * from v1; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +select * from t1; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +drop view v1; +set query_cache_type=default; + +drop table t1; +set GLOBAL query_cache_size=default; + + |