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 /sql/sp_pcontext.h | |
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 'sql/sp_pcontext.h')
-rw-r--r-- | sql/sp_pcontext.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sp_pcontext.h b/sql/sp_pcontext.h index 66f631f4938..42d8140b78c 100644 --- a/sql/sp_pcontext.h +++ b/sql/sp_pcontext.h @@ -60,6 +60,12 @@ typedef struct sp_cond_type uint mysqlerr; } sp_cond_type_t; +/* Sanity check for SQLSTATEs. Will not check if it's really an existing + * state (there are just too many), but will check length bad characters. + */ +extern bool +sp_cond_check(LEX_STRING *sqlstate); + typedef struct sp_cond { LEX_STRING name; |