List:Commits« Previous MessageNext Message »
From:Alexander Nozdrin Date:May 18 2006 10:44am
Subject:bk commit into 5.0 tree (anozdrin:1.2144) BUG#18037
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of alik. When alik 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.2144 06/05/18 14:44:15 anozdrin@stripped +2 -0
  Test case for BUG#18037: Server crash when returning system
  variable in stored procedures.

  mysql-test/t/sp.test
    1.188 06/05/18 14:44:12 anozdrin@stripped +46 -0
    Test case for BUG#18037: Server crash when returning system
    variable in stored procedures.

  mysql-test/r/sp.result
    1.200 06/05/18 14:44:12 anozdrin@stripped +30 -0
    Test case for BUG#18037: Server crash when returning system
    variable in stored procedures.

# 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:	anozdrin
# Host:	station.home
# Root:	/mnt/raid/MySQL/devel/5.0-bug18037

--- 1.199/mysql-test/r/sp.result	2006-05-10 23:16:27 +04:00
+++ 1.200/mysql-test/r/sp.result	2006-05-18 14:44:12 +04:00
@@ -4960,4 +4960,34 @@
 DROP FUNCTION bug18589_f1|
 DROP PROCEDURE bug18589_p1|
 DROP PROCEDURE bug18589_p2|
+DROP FUNCTION IF EXISTS bug18037_f1|
+DROP PROCEDURE IF EXISTS bug18037_p1|
+DROP PROCEDURE IF EXISTS bug18037_p2|
+CREATE FUNCTION bug18037_f1() RETURNS INT
+BEGIN
+RETURN @@server_id;
+END|
+CREATE PROCEDURE bug18037_p1()
+BEGIN
+DECLARE v INT DEFAULT @@server_id;
+END|
+CREATE PROCEDURE bug18037_p2()
+BEGIN
+CASE @@server_id
+WHEN -1 THEN
+SELECT 0;
+ELSE
+SELECT 1;
+END CASE;
+END|
+SELECT bug18037_f1()|
+bug18037_f1()
+1
+CALL bug18037_p1()|
+CALL bug18037_p2()|
+1
+1
+DROP FUNCTION bug18037_f1|
+DROP PROCEDURE bug18037_p1|
+DROP PROCEDURE bug18037_p2|
 drop table t1,t2;

--- 1.187/mysql-test/t/sp.test	2006-05-10 23:16:27 +04:00
+++ 1.188/mysql-test/t/sp.test	2006-05-18 14:44:12 +04:00
@@ -5844,6 +5844,52 @@
 
 
 #
+# BUG#18037: Server crash when returning system variable in stored procedures
+# BUG#19633: Stack corruption in fix_fields()/THD::rollback_item_tree_changes()
+#
+
+# Prepare.
+
+--disable_warnings
+DROP FUNCTION IF EXISTS bug18037_f1|
+DROP PROCEDURE IF EXISTS bug18037_p1|
+DROP PROCEDURE IF EXISTS bug18037_p2|
+--enable_warnings
+
+# Test case.
+
+CREATE FUNCTION bug18037_f1() RETURNS INT
+BEGIN
+  RETURN @@server_id;
+END|
+
+CREATE PROCEDURE bug18037_p1()
+BEGIN
+  DECLARE v INT DEFAULT @@server_id;
+END|
+
+CREATE PROCEDURE bug18037_p2()
+BEGIN
+  CASE @@server_id
+  WHEN -1 THEN
+    SELECT 0;
+  ELSE
+    SELECT 1;
+  END CASE;
+END|
+
+SELECT bug18037_f1()|
+CALL bug18037_p1()|
+CALL bug18037_p2()|
+
+# Cleanup.
+
+DROP FUNCTION bug18037_f1|
+DROP PROCEDURE bug18037_p1|
+DROP PROCEDURE bug18037_p2|
+
+
+#
 # BUG#NNNN: New bug synopsis
 #
 #--disable_warnings
Thread
bk commit into 5.0 tree (anozdrin:1.2144) BUG#18037Alexander Nozdrin18 May