summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2005-01-20 17:04:24 +0200
committerunknown <bell@sanja.is.com.ua>2005-01-20 17:04:24 +0200
commitfdb6225390afdbfe7c6ede76b736e1b1ba9f419d (patch)
tree55a1ebb68a57cbff13e567edf096a93400fe823b /mysql-test
parent59a68b89647753d1460279c7eb0fcf8d4044036a (diff)
downloadmariadb-git-fdb6225390afdbfe7c6ede76b736e1b1ba9f419d.tar.gz
fixed using in SP sentences which use Item tree temporary changes rollback (BUG#7992)
mysql-test/r/sp.result: rolling back temporary Item tree changes in SP mysql-test/t/sp.test: rolling back temporary Item tree changes in SP sql/sp_head.cc: if PS instruction made some temporary changes in Item tree we have to roll it back
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/sp.result13
-rw-r--r--mysql-test/t/sp.test21
2 files changed, 34 insertions, 0 deletions
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index 1fd519bc729..5640057bf35 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -2321,3 +2321,16 @@ select `foo` ();
`foo` ()
5
drop function `foo`;
+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;
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test
index 4f556e34d51..4c5665aae62 100644
--- a/mysql-test/t/sp.test
+++ b/mysql-test/t/sp.test
@@ -2739,3 +2739,24 @@ drop function if exists foo;
create function `foo` () returns int return 5;
select `foo` ();
drop function `foo`;
+
+#
+# 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;