summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorpem@mysql.comhem.se <>2005-04-20 15:37:07 +0200
committerpem@mysql.comhem.se <>2005-04-20 15:37:07 +0200
commit189d6b502bbdf3b9e295177dc4f61ed28ca72db6 (patch)
tree3c9b6f1fc0b8cc55e92c4fbcb5cca379e6afb6a0 /mysql-test
parentff665c9513658c383f2b5cc0261eaf998c1b158d (diff)
downloadmariadb-git-189d6b502bbdf3b9e295177dc4f61ed28ca72db6.tar.gz
Fixed BUG#6898: Stored procedure crash if GOTO statements exist
Bug in the optimizer caused an infinite loop for weird code.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/sp.result9
-rw-r--r--mysql-test/t/sp.test16
2 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index 4bb1640f0eb..d911fc68b7c 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -2958,4 +2958,13 @@ select @x|
set global query_cache_size = @qcs1|
delete from t1|
drop function bug9902|
+drop procedure if exists bug6898|
+create procedure bug6898()
+begin
+goto label1;
+label label1;
+begin end;
+goto label1;
+end|
+drop procedure bug6898|
drop table t1,t2;
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test
index 4101a7a4bfa..d5298645f76 100644
--- a/mysql-test/t/sp.test
+++ b/mysql-test/t/sp.test
@@ -3629,6 +3629,22 @@ drop function bug9902|
#
+# BUG#6898: Stored procedure crash if GOTO statements exist
+#
+--disable_warnings
+drop procedure if exists bug6898|
+--enable_warnings
+create procedure bug6898()
+begin
+ goto label1;
+ label label1;
+ begin end;
+ goto label1;
+end|
+drop procedure bug6898|
+
+
+#
# BUG#NNNN: New bug synopsis
#
#--disable_warnings