Loading mysql-test/r/sp.result +13 −0 Original line number Diff line number Diff line Loading @@ -2381,3 +2381,16 @@ ERROR 42000: Can't find any matching row in the user table drop function bug5278| drop table t1; drop table t2; drop procedure if exists p1; create table t1(id int); insert into t1 values(1); create procedure p1() begin declare i int; select max(id)+1 into i from t1; end // call p1()// call p1()// drop procedure p1; drop table t1; mysql-test/r/view_query_cache.result +25 −0 Original line number Diff line number Diff line drop table if exists t1,t2,v1,v2,v3; drop view if exists t1,t2,v1,v2,v3; set GLOBAL query_cache_size=1355776; flush status; create table t1 (a int, b int); Loading Loading @@ -98,4 +100,27 @@ Qcache_hits 1 drop view v1; set query_cache_type=default; drop table t1; create table t1 (a int); insert into t1 values (1), (2), (3); create view v1 as select a from t1 where a > 1; select * from v1; a 2 3 alter view v1 as select a from t1 where a > 2; select * from v1; a 3 drop view v1; select * from v1; ERROR 42S02: Table 'test.v1' doesn't exist drop table t1; create table t1 (a int, primary key (a), b int); create table t2 (a int, primary key (a), b int); insert into t2 values (1000, 2000); create view v3 (a,b) as select t1.a as a, t2.a as b from t1, t2; select * from v3; a b drop view v3; drop table t1, t2; set GLOBAL query_cache_size=default; mysql-test/t/sp.test +21 −0 Original line number Diff line number Diff line Loading @@ -2853,3 +2853,24 @@ drop function bug5278| delimiter ;| drop table t1; drop table t2; # # rolling back temporary Item tree changes in SP # --disable_warnings drop procedure if exists p1; --enable_warnings create table t1(id int); insert into t1 values(1); delimiter //; create procedure p1() begin declare i int; select max(id)+1 into i from t1; end // call p1()// call p1()// delimiter ;// drop procedure p1; drop table t1; mysql-test/t/view_query_cache.test +30 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,11 @@ # # QUERY CACHE options for VIEWs # --disable_warnings drop table if exists t1,t2,v1,v2,v3; drop view if exists t1,t2,v1,v2,v3; --enable_warnings set GLOBAL query_cache_size=1355776; flush status; create table t1 (a int, b int); Loading Loading @@ -53,6 +58,30 @@ drop view v1; set query_cache_type=default; drop table t1; set GLOBAL query_cache_size=default; # # invalidation of view # create table t1 (a int); insert into t1 values (1), (2), (3); create view v1 as select a from t1 where a > 1; select * from v1; alter view v1 as select a from t1 where a > 2; select * from v1; drop view v1; -- error 1146 select * from v1; drop table t1; # # join view with QC # create table t1 (a int, primary key (a), b int); create table t2 (a int, primary key (a), b int); insert into t2 values (1000, 2000); create view v3 (a,b) as select t1.a as a, t2.a as b from t1, t2; select * from v3; drop view v3; drop table t1, t2; set GLOBAL query_cache_size=default; sql/sp_head.cc +1 −0 Original line number Diff line number Diff line Loading @@ -488,6 +488,7 @@ sp_head::execute(THD *thd) break; DBUG_PRINT("execute", ("Instruction %u", ip)); ret= i->execute(thd, &ip); thd->rollback_item_tree_changes(); if (i->free_list) cleanup_items(i->free_list); // Check if an exception has occurred and a handler has been found Loading Loading
mysql-test/r/sp.result +13 −0 Original line number Diff line number Diff line Loading @@ -2381,3 +2381,16 @@ ERROR 42000: Can't find any matching row in the user table drop function bug5278| drop table t1; drop table t2; drop procedure if exists p1; create table t1(id int); insert into t1 values(1); create procedure p1() begin declare i int; select max(id)+1 into i from t1; end // call p1()// call p1()// drop procedure p1; drop table t1;
mysql-test/r/view_query_cache.result +25 −0 Original line number Diff line number Diff line drop table if exists t1,t2,v1,v2,v3; drop view if exists t1,t2,v1,v2,v3; set GLOBAL query_cache_size=1355776; flush status; create table t1 (a int, b int); Loading Loading @@ -98,4 +100,27 @@ Qcache_hits 1 drop view v1; set query_cache_type=default; drop table t1; create table t1 (a int); insert into t1 values (1), (2), (3); create view v1 as select a from t1 where a > 1; select * from v1; a 2 3 alter view v1 as select a from t1 where a > 2; select * from v1; a 3 drop view v1; select * from v1; ERROR 42S02: Table 'test.v1' doesn't exist drop table t1; create table t1 (a int, primary key (a), b int); create table t2 (a int, primary key (a), b int); insert into t2 values (1000, 2000); create view v3 (a,b) as select t1.a as a, t2.a as b from t1, t2; select * from v3; a b drop view v3; drop table t1, t2; set GLOBAL query_cache_size=default;
mysql-test/t/sp.test +21 −0 Original line number Diff line number Diff line Loading @@ -2853,3 +2853,24 @@ drop function bug5278| delimiter ;| drop table t1; drop table t2; # # rolling back temporary Item tree changes in SP # --disable_warnings drop procedure if exists p1; --enable_warnings create table t1(id int); insert into t1 values(1); delimiter //; create procedure p1() begin declare i int; select max(id)+1 into i from t1; end // call p1()// call p1()// delimiter ;// drop procedure p1; drop table t1;
mysql-test/t/view_query_cache.test +30 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,11 @@ # # QUERY CACHE options for VIEWs # --disable_warnings drop table if exists t1,t2,v1,v2,v3; drop view if exists t1,t2,v1,v2,v3; --enable_warnings set GLOBAL query_cache_size=1355776; flush status; create table t1 (a int, b int); Loading Loading @@ -53,6 +58,30 @@ drop view v1; set query_cache_type=default; drop table t1; set GLOBAL query_cache_size=default; # # invalidation of view # create table t1 (a int); insert into t1 values (1), (2), (3); create view v1 as select a from t1 where a > 1; select * from v1; alter view v1 as select a from t1 where a > 2; select * from v1; drop view v1; -- error 1146 select * from v1; drop table t1; # # join view with QC # create table t1 (a int, primary key (a), b int); create table t2 (a int, primary key (a), b int); insert into t2 values (1000, 2000); create view v3 (a,b) as select t1.a as a, t2.a as b from t1, t2; select * from v3; drop view v3; drop table t1, t2; set GLOBAL query_cache_size=default;
sql/sp_head.cc +1 −0 Original line number Diff line number Diff line Loading @@ -488,6 +488,7 @@ sp_head::execute(THD *thd) break; DBUG_PRINT("execute", ("Instruction %u", ip)); ret= i->execute(thd, &ip); thd->rollback_item_tree_changes(); if (i->free_list) cleanup_items(i->free_list); // Check if an exception has occurred and a handler has been found Loading