Below is the list of changes that have just been committed into a local
5.1 repository of malff. When malff 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@stripped, 2008-03-21 12:08:04-06:00, malff@stripped. +3 -0
Bug#8759 (Stored Procedures: SQLSTATE '00000' should be illegal)
Fixed the parser to reject SQLSTATE '00000',
since '00000' is the successful completion condition,
and can not be caught by an exception handler in SQL.
mysql-test/r/sp-error.result@stripped, 2008-03-21 12:07:58-06:00, malff@stripped. +12 -0
Bug#8759 (Stored Procedures: SQLSTATE '00000' should be illegal)
mysql-test/t/sp-error.test@stripped, 2008-03-21 12:07:59-06:00, malff@stripped. +26 -0
Bug#8759 (Stored Procedures: SQLSTATE '00000' should be illegal)
sql/sp_pcontext.cc@stripped, 2008-03-21 12:07:59-06:00, malff@stripped. +2 -0
Bug#8759 (Stored Procedures: SQLSTATE '00000' should be illegal)
diff -Nrup a/mysql-test/r/sp-error.result b/mysql-test/r/sp-error.result
--- a/mysql-test/r/sp-error.result 2008-02-04 11:39:50 -07:00
+++ b/mysql-test/r/sp-error.result 2008-03-21 12:07:58 -06:00
@@ -1638,3 +1638,15 @@ Warning 1287 The syntax 'TYPE=storage_en
call p1();
call p1();
drop procedure p1;
+drop procedure if exists proc_8759;
+create procedure proc_8759()
+begin
+declare should_be_illegal condition for sqlstate '00000';
+declare continue handler for should_be_illegal set @x=0;
+end$$
+ERROR 42000: Bad SQLSTATE: '00000'
+create procedure proc_8759()
+begin
+declare continue handler for sqlstate '00000' set @x=0;
+end$$
+ERROR 42000: Bad SQLSTATE: '00000'
diff -Nrup a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test
--- a/mysql-test/t/sp-error.test 2008-02-04 11:39:50 -07:00
+++ b/mysql-test/t/sp-error.test 2008-03-21 12:07:59 -06:00
@@ -2387,6 +2387,32 @@ call p1();
drop procedure p1;
#
+# Bug#8759 (Stored Procedures: SQLSTATE '00000' should be illegal)
+#
+
+--disable_warnings
+drop procedure if exists proc_8759;
+--enable_warnings
+
+delimiter $$;
+
+--error ER_SP_BAD_SQLSTATE
+create procedure proc_8759()
+begin
+ declare should_be_illegal condition for sqlstate '00000';
+ declare continue handler for should_be_illegal set @x=0;
+end$$
+
+--error ER_SP_BAD_SQLSTATE
+create procedure proc_8759()
+begin
+ declare continue handler for sqlstate '00000' set @x=0;
+end$$
+
+delimiter ;$$
+
+
+#
# BUG#NNNN: New bug synopsis
#
#--disable_warnings
diff -Nrup a/sql/sp_pcontext.cc b/sql/sp_pcontext.cc
--- a/sql/sp_pcontext.cc 2007-06-10 04:43:54 -06:00
+++ b/sql/sp_pcontext.cc 2008-03-21 12:07:59 -06:00
@@ -51,6 +51,8 @@ sp_cond_check(LEX_STRING *sqlstate)
(c < 'A' || 'Z' < c))
return FALSE;
}
+ if (strcmp(sqlstate->str, "00000") == 0)
+ return FALSE;
return TRUE;
}
| Thread |
|---|
| • bk commit into 5.1 tree (malff:1.2569) BUG#8759 | marc.alff | 21 Mar |