diff options
author | unknown <pem@mysql.comhem.se> | 2005-02-28 18:07:06 +0100 |
---|---|---|
committer | unknown <pem@mysql.comhem.se> | 2005-02-28 18:07:06 +0100 |
commit | 110f6abd3800f0a3be9febc81e295966d2fb9f77 (patch) | |
tree | 541ebb69474f5c6881039a34e9d6b5e24fe87969 /mysql-test/r/sp-error.result | |
parent | cfff7e6e184ab70b262ab36eaf8bee07746f87aa (diff) | |
download | mariadb-git-110f6abd3800f0a3be9febc81e295966d2fb9f77.tar.gz |
Fixed BUG#8760: Stored Procedures: Invalid SQLSTATE is allowed in
a DECLARE ? HANDLER FOR stmt.
mysql-test/r/sp-error.result:
New test case for BUG#8776 (check format of sqlstates in handler declarations).
mysql-test/t/sp-error.test:
New test case for BUG#8776 (check format of sqlstates in handler declarations).
sql/share/errmsg.txt:
New error message for malformed SQLSTATEs.
sql/sp_pcontext.cc:
Added function for checking SQLSTATE format.
sql/sp_pcontext.h:
Added function for checking SQLSTATE format.
sql/sql_yacc.yy:
Check format of SQLSTATE in handler declaration.
Diffstat (limited to 'mysql-test/r/sp-error.result')
-rw-r--r-- | mysql-test/r/sp-error.result | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/r/sp-error.result b/mysql-test/r/sp-error.result index 1c2f4662ef1..1182c3d3569 100644 --- a/mysql-test/r/sp-error.result +++ b/mysql-test/r/sp-error.result @@ -466,4 +466,32 @@ ERROR 70100: Query execution was interrupted call bug6807()| ERROR 70100: Query execution was interrupted drop procedure bug6807| +drop procedure if exists bug8776_1| +drop procedure if exists bug8776_2| +drop procedure if exists bug8776_3| +drop procedure if exists bug8776_4| +create procedure bug8776_1() +begin +declare continue handler for sqlstate '42S0200test' begin end; +begin end; +end| +ERROR 42000: Bad SQLSTATE: '42S0200test' +create procedure bug8776_2() +begin +declare continue handler for sqlstate '4200' begin end; +begin end; +end| +ERROR 42000: Bad SQLSTATE: '4200' +create procedure bug8776_3() +begin +declare continue handler for sqlstate '420000' begin end; +begin end; +end| +ERROR 42000: Bad SQLSTATE: '420000' +create procedure bug8776_4() +begin +declare continue handler for sqlstate '42x00' begin end; +begin end; +end| +ERROR 42000: Bad SQLSTATE: '42x00' drop table t1| |