Below is the list of changes that have just been committed into a local
5.0 repository of bell. When bell 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.2017 05/10/06 16:12:31 bell@stripped +3 -0
do not allow SP which we are parsing to use other SP context (BUG#13549)
sql/sp.cc
1.96 05/10/06 16:11:55 bell@stripped +8 -1
do not allow SP which we are parsing to use other SP context (BUG#13549)
mysql-test/t/sp.test
1.156 05/10/06 16:11:55 bell@stripped +20 -0
test suite for bug#13549
mysql-test/r/sp.result
1.160 05/10/06 16:11:55 bell@stripped +15 -0
test suite for bug#13549
# 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: bell
# Host: sanja.is.com.ua
# Root: /home/bell/mysql/bk/work-bug2-5.0
--- 1.159/mysql-test/r/sp.result 2005-10-03 20:00:47 +03:00
+++ 1.160/mysql-test/r/sp.result 2005-10-06 16:11:55 +03:00
@@ -3435,4 +3435,19 @@
tm1 CREATE TEMPORARY TABLE `tm1` (
`spv1` decimal(6,3) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop procedure bug12589_1|
+drop procedure bug12589_2|
+drop procedure bug12589_3|
+CREATE PROCEDURE `bug13549_2`()
+begin
+call bug13549_1();
+end|
+CREATE PROCEDURE `bug13549_1`()
+begin
+declare done int default 0;
+set done= not done;
+end|
+CALL bug13549_2()|
+drop procedure bug13549_2|
+drop procedure bug13549_1|
drop table t1,t2;
--- 1.155/mysql-test/t/sp.test 2005-10-03 20:00:49 +03:00
+++ 1.156/mysql-test/t/sp.test 2005-10-06 16:11:55 +03:00
@@ -4313,6 +4313,26 @@
# No warnings here
call bug12589_2()|
call bug12589_3()|
+drop procedure bug12589_1|
+drop procedure bug12589_2|
+drop procedure bug12589_3|
+
+#
+# Calling procedure with more variables and NOT before last variable
+# from procedure with less variables (BUG#13549)
+#
+CREATE PROCEDURE `bug13549_2`()
+begin
+ call bug13549_1();
+end|
+CREATE PROCEDURE `bug13549_1`()
+begin
+ declare done int default 0;
+ set done= not done;
+end|
+CALL bug13549_2()|
+drop procedure bug13549_2|
+drop procedure bug13549_1|
#
--- 1.95/sql/sp.cc 2005-09-15 22:29:01 +03:00
+++ 1.96/sql/sp.cc 2005-10-06 16:11:55 +03:00
@@ -274,6 +274,7 @@
String str(buff, sizeof(buff), &my_charset_bin);
ulong sql_mode;
Open_tables_state open_tables_state_backup;
+ bool res;
DBUG_ENTER("db_find_routine");
DBUG_PRINT("enter", ("type: %d name: %*s",
type, name->m_name.length, name->m_name.str));
@@ -422,7 +423,13 @@
thd->lex->found_semicolon= tmpfsc;
}
- if (yyparse(thd) || thd->is_fatal_error || thd->lex->sphead == NULL)
+ {
+ sp_rcontext *save_spcont= thd->spcont;
+ thd->spcont= 0;
+ res= yyparse(thd);
+ thd->spcont= save_spcont;
+ }
+ if (res || thd->is_fatal_error || thd->lex->sphead == NULL)
{
LEX *newlex= thd->lex;
sp_head *sp= newlex->sphead;
| Thread |
|---|
| • bk commit into 5.0 tree (bell:1.2017) BUG#13549 | sanja | 6 Oct |