summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorevgen@moonbone.local <>2006-11-14 19:50:44 +0300
committerevgen@moonbone.local <>2006-11-14 19:50:44 +0300
commit5198354584e56682e5d5b87ee680582aac44ea61 (patch)
treed10a53e376fd473c3ab10173af53e5dab66d8e5c /mysql-test/r
parentcd7613b2658e917f959e8c344dd0eaf6060ed0f8 (diff)
downloadmariadb-git-5198354584e56682e5d5b87ee680582aac44ea61.tar.gz
Bug#20045: Server crash on INSERT ... SELECT ... FROM non-mergeable view
The regression is caused by the fix for bug 14767. When INSERT ... SELECT used a view in the SELECT list that was not inlined, and there was an active transaction, the server could crash in Query_cache::invalidate. On INSERT ... SELECT only the table being inserted into is invalidated. Thus views that can't be inlined are skipped from invalidation. The bug manifests itself in two ways so there is 2 test cases. One checks that the only the table being inserted into is invalidated. And the second one checks that there is no crash on INSERT ... SELECT.
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/query_cache.result48
1 files changed, 48 insertions, 0 deletions
diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result
index 5224280e134..7645ad488cc 100644
--- a/mysql-test/r/query_cache.result
+++ b/mysql-test/r/query_cache.result
@@ -1274,3 +1274,51 @@ Variable_name Value
Last_query_cost 0.000000
drop table t1;
SET GLOBAL query_cache_size=0;
+set global query_cache_size=1024*1024;
+flush status;
+create table t1 (a int);
+insert into t1 (a) values (1), (2), (3);
+select * from t1;
+a
+1
+2
+3
+show status like 'Qcache_hits';
+Variable_name Value
+Qcache_hits 0
+select * from t1;
+a
+1
+2
+3
+show status like 'Qcache_hits';
+Variable_name Value
+Qcache_hits 1
+create table t2 like t1;
+select * from t1;
+a
+1
+2
+3
+show status like 'Qcache_hits';
+Variable_name Value
+Qcache_hits 2
+insert into t2 select * from t1;
+select * from t1;
+a
+1
+2
+3
+show status like 'Qcache_hits';
+Variable_name Value
+Qcache_hits 3
+drop table t1, t2;
+create table t1(c1 int);
+create table t2(c1 int);
+create table t3(c1 int);
+create view v1 as select t3.c1 as c1 from t3,t2 where t3.c1 = t2.c1;
+start transaction;
+insert into t1(c1) select c1 from v1;
+drop table t1, t2, t3;
+drop view v1;
+set global query_cache_size=0;