summaryrefslogtreecommitdiff
path: root/mysql-test/t/sp-code.test
diff options
context:
space:
mode:
authorChad MILLER <chad@mysql.com>2008-07-14 16:16:37 -0400
committerChad MILLER <chad@mysql.com>2008-07-14 16:16:37 -0400
commita4e7283a9254c09057c92ec20fc145c52bea1d51 (patch)
tree6009880c2c51b3422d95a760220fb7a20ebdb3e0 /mysql-test/t/sp-code.test
parentc425bf421da9ffa55d3d568f70508fa12dd07aa0 (diff)
parent55ab1ef6951428e0be31956e152537dec670e7df (diff)
downloadmariadb-git-a4e7283a9254c09057c92ec20fc145c52bea1d51.tar.gz
Merge from 5.0 trunk.
Diffstat (limited to 'mysql-test/t/sp-code.test')
-rw-r--r--mysql-test/t/sp-code.test32
1 files changed, 32 insertions, 0 deletions
diff --git a/mysql-test/t/sp-code.test b/mysql-test/t/sp-code.test
index 751282c895a..a76863dd5fa 100644
--- a/mysql-test/t/sp-code.test
+++ b/mysql-test/t/sp-code.test
@@ -598,4 +598,36 @@ show procedure code proc_33618_c;
drop procedure proc_33618_h;
drop procedure proc_33618_c;
+#
+# Bug#20906 (Multiple assignments in SET in stored routine produce incorrect
+# instructions)
+#
+
+--disable_warnings
+drop procedure if exists p_20906_a;
+drop procedure if exists p_20906_b;
+--enable_warnings
+
+create procedure p_20906_a() SET @a=@a+1, @b=@b+1;
+show procedure code p_20906_a;
+
+set @a=1;
+set @b=1;
+
+call p_20906_a();
+select @a, @b;
+
+create procedure p_20906_b() SET @a=@a+1, @b=@b+1, @c=@c+1;
+show procedure code p_20906_b;
+
+set @a=1;
+set @b=1;
+set @c=1;
+
+call p_20906_b();
+select @a, @b, @c;
+
+drop procedure p_20906_a;
+drop procedure p_20906_b;
+
--echo End of 5.0 tests.