summaryrefslogtreecommitdiff
path: root/mysql-test/t/query_cache.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/query_cache.test')
-rw-r--r--mysql-test/t/query_cache.test26
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test
new file mode 100644
index 00000000000..3d1aa70d8b2
--- /dev/null
+++ b/mysql-test/t/query_cache.test
@@ -0,0 +1,26 @@
+#
+# Tests with query cache
+#
+
+# Reset query cache variables.
+
+reset query cache;
+flush status;
+drop table if exists t1;
+create table t1 (a int not null);
+insert into t1 values (1),(2),(3);
+select * from t1;
+select * from t1;
+select sql_no_cache * from t1;
+select length(now()) from t1;
+
+# Only check the variables that are independent of the machine and startup
+# options
+
+show status like "Qcache_queries_in_cache";
+show status like "Qcache_inserts";
+show status like "Qcache_hits";
+
+drop table t1;
+
+show status like "Qcache_queries_in_cache";