summaryrefslogtreecommitdiff
path: root/mysql-test/r/query_cache.result
diff options
context:
space:
mode:
authorunknown <kostja@bodhi.(none)>2007-07-16 23:31:36 +0400
committerunknown <kostja@bodhi.(none)>2007-07-16 23:31:36 +0400
commit9562c54a5c1172fa536d27bb67e86d7af93183d8 (patch)
tree53d9d30f94c45fc9b3f51662dd10574784b16e0a /mysql-test/r/query_cache.result
parentb6c0fb605d613df14405e1d7c5621d22b35bc4fe (diff)
parent8023d91929247f1b2e2f81ca10daca4dde4ab2e2 (diff)
downloadmariadb-git-9562c54a5c1172fa536d27bb67e86d7af93183d8.tar.gz
Merge bodhi.(none):/opt/local/work/mysql-5.0-runtime
into bodhi.(none):/opt/local/work/mysql-5.1-runtime mysql-test/r/trigger.result: Auto merged mysql-test/t/query_cache.test: Auto merged mysql-test/t/sp.test: Auto merged mysql-test/t/trigger.test: Auto merged sql/item.cc: Auto merged sql/item.h: Auto merged sql/mysql_priv.h: Auto merged sql/sp_head.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_db.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_trigger.h: Auto merged sql/sql_view.cc: Auto merged sql/table.cc: Auto merged storage/myisam/ha_myisam.h: Auto merged mysql-test/include/mix1.inc: Manual merge. mysql-test/r/information_schema.result: Manual merge. mysql-test/r/innodb_mysql.result: Manual merge. mysql-test/r/query_cache.result: Manual merge. mysql-test/r/sp.result: Manual merge. mysql-test/t/information_schema.test: Manual merge. sql/handler.h: Manual merge. sql/sp.cc: Manual merge. sql/sp_head.cc: Manual merge. sql/sql_prepare.cc: Manual merge. sql/sql_trigger.cc: Manual merge. sql/sql_yacc.yy: Manual merge. sql/table.h: Manual merge. storage/myisam/ha_myisam.cc: Manual merge.
Diffstat (limited to 'mysql-test/r/query_cache.result')
-rw-r--r--mysql-test/r/query_cache.result41
1 files changed, 41 insertions, 0 deletions
diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result
index 680577c495e..db513902b2c 100644
--- a/mysql-test/r/query_cache.result
+++ b/mysql-test/r/query_cache.result
@@ -1495,6 +1495,46 @@ insert into t1 values ('c');
a
drop table t1;
set GLOBAL query_cache_size= default;
+Bug#28249 Query Cache returns wrong result with concurrent insert/ certain lock
+set GLOBAL query_cache_type=1;
+set GLOBAL query_cache_limit=10000;
+set GLOBAL query_cache_min_res_unit=0;
+set GLOBAL query_cache_size= 100000;
+flush tables;
+drop table if exists t1, t2;
+create table t1 (a int);
+create table t2 (a int);
+insert into t1 values (1),(2),(3);
+Locking table T2 with a write lock.
+lock table t2 write;
+Select blocked by write lock.
+select *, (select count(*) from t2) from t1;;
+Sleeing is ok, because selecting should be done very fast.
+Inserting into table T1.
+insert into t1 values (4);
+Unlocking the tables.
+unlock tables;
+Collecting result from previously blocked select.
+Next select should contain 4 rows, as the insert is long finished.
+select *, (select count(*) from t2) from t1;
+a (select count(*) from t2)
+1 0
+2 0
+3 0
+4 0
+reset query cache;
+select *, (select count(*) from t2) from t1;
+a (select count(*) from t2)
+1 0
+2 0
+3 0
+4 0
+drop table t1,t2;
+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
drop database if exists db1;
drop database if exists db2;
set GLOBAL query_cache_size=15*1024*1024;
@@ -1543,3 +1583,4 @@ Variable_name Value
Qcache_queries_in_cache 1
drop database db2;
drop database db3;
+End of 5.1 tests