List:Internals« Previous MessageNext Message »
From:pem Date:April 20 2005 3:57pm
Subject:bk commit into 5.0 tree (pem:1.1860) BUG#6898
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of pem. When pem does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.1860 05/04/20 15:37:07 pem@stripped +3 -0
  Fixed BUG#6898: Stored procedure crash if GOTO statements exist
    Bug in the optimizer caused an infinite loop for weird code.

  sql/sp_head.cc
    1.127 05/04/20 15:37:02 pem@stripped +1 -1
    Detect self referencing jumps in the optimizer.

  mysql-test/t/sp.test
    1.109 05/04/20 15:37:02 pem@stripped +16 -0
    New test case for BUG#6898.

  mysql-test/r/sp.result
    1.114 05/04/20 15:37:02 pem@stripped +9 -0
    New test case for BUG#6898.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	pem
# Host:	mysql.comhem.se
# Root:	/home/pem/work/mysql-5.0

--- 1.113/mysql-test/r/sp.result	Fri Apr 15 11:06:18 2005
+++ 1.114/mysql-test/r/sp.result	Wed Apr 20 15:37:02 2005
@@ -2958,4 +2958,13 @@
 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;

--- 1.108/mysql-test/t/sp.test	Fri Apr 15 11:06:18 2005
+++ 1.109/mysql-test/t/sp.test	Wed Apr 20 15:37:02 2005
@@ -3629,6 +3629,22 @@
 
 
 #
+# 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

--- 1.126/sql/sp_head.cc	Thu Apr 14 14:52:30 2005
+++ 1.127/sql/sp_head.cc	Wed Apr 20 15:37:02 2005
@@ -1499,7 +1499,7 @@
   {
     uint ndest;
 
-    if (start == i)
+    if (start == i || this == i)
       break;
     ndest= i->opt_shortcut_jump(sp, start);
     if (ndest == dest)
Thread
bk commit into 5.0 tree (pem:1.1860) BUG#6898pem20 Apr