mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
Fixed some error handling in the SP parts of the parser.
include/mysqld_error.h: Added SP error messages for the parser. sql/share/czech/errmsg.txt: Added SP error messages for the parser. sql/share/danish/errmsg.txt: Added SP error messages for the parser. sql/share/dutch/errmsg.txt: Added SP error messages for the parser. sql/share/english/errmsg.txt: Added SP error messages for the parser. sql/share/estonian/errmsg.txt: Added SP error messages for the parser. sql/share/french/errmsg.txt: Added SP error messages for the parser. sql/share/german/errmsg.txt: Added SP error messages for the parser. sql/share/greek/errmsg.txt: Added SP error messages for the parser. sql/share/hungarian/errmsg.txt: Added SP error messages for the parser. sql/share/italian/errmsg.txt: Added SP error messages for the parser. sql/share/japanese/errmsg.txt: Added SP error messages for the parser. sql/share/korean/errmsg.txt: Added SP error messages for the parser. sql/share/norwegian-ny/errmsg.txt: Added SP error messages for the parser. sql/share/norwegian/errmsg.txt: Added SP error messages for the parser. sql/share/polish/errmsg.txt: Added SP error messages for the parser. sql/share/portuguese/errmsg.txt: Added SP error messages for the parser. sql/share/romanian/errmsg.txt: Added SP error messages for the parser. sql/share/russian/errmsg.txt: Added SP error messages for the parser. sql/share/serbian/errmsg.txt: Added SP error messages for the parser. sql/share/slovak/errmsg.txt: Added SP error messages for the parser. sql/share/spanish/errmsg.txt: Added SP error messages for the parser. sql/share/swedish/errmsg.txt: Added SP error messages for the parser. sql/share/ukrainian/errmsg.txt: Added SP error messages for the parser. sql/sql_yacc.yy: Replaced dummy printfs with real error messages in the SP parser.
This commit is contained in:
parent
79993565a9
commit
dcac913c15
25 changed files with 153 additions and 14 deletions
|
|
@ -270,4 +270,11 @@
|
|||
#define ER_SP_ALREADY_EXISTS 1251
|
||||
#define ER_SP_DOES_NOT_EXIST 1252
|
||||
#define ER_SP_DROP_FAILED 1253
|
||||
#define ER_ERROR_MESSAGES 254
|
||||
#define ER_SP_STORE_FAILED 1254
|
||||
#define ER_SP_LEAVE_MISMATCH 1255
|
||||
#define ER_SP_ITERATE_MISMATCH 1256
|
||||
#define ER_SP_LABEL_REDEFINE 1257
|
||||
#define ER_SP_LABEL_MISMATCH 1258
|
||||
#define ER_SP_UNINIT_VAR 1259
|
||||
#define ER_ERROR_MESSAGES 260
|
||||
|
||||
|
|
|
|||
|
|
@ -264,3 +264,9 @@ v/*
|
|||
"PROCEDURE already exists"
|
||||
"PROCEDURE does not exist"
|
||||
"Failed to DROP PROCEDURE"
|
||||
"Failed to store PROCEDURE"
|
||||
"LEAVE with no matching label"
|
||||
"ITERATE with no matching label"
|
||||
"Redefining label"
|
||||
"End-label without match"
|
||||
"Referring to uninitialized variable"
|
||||
|
|
|
|||
|
|
@ -258,3 +258,9 @@
|
|||
"PROCEDURE already exists"
|
||||
"PROCEDURE does not exist"
|
||||
"Failed to DROP PROCEDURE"
|
||||
"Failed to store PROCEDURE"
|
||||
"LEAVE with no matching label"
|
||||
"ITERATE with no matching label"
|
||||
"Redefining label"
|
||||
"End-label without match"
|
||||
"Referring to uninitialized variable"
|
||||
|
|
|
|||
|
|
@ -266,3 +266,9 @@
|
|||
"PROCEDURE already exists"
|
||||
"PROCEDURE does not exist"
|
||||
"Failed to DROP PROCEDURE"
|
||||
"Failed to store PROCEDURE"
|
||||
"LEAVE with no matching label"
|
||||
"ITERATE with no matching label"
|
||||
"Redefining label"
|
||||
"End-label without match"
|
||||
"Referring to uninitialized variable"
|
||||
|
|
|
|||
|
|
@ -255,4 +255,9 @@
|
|||
"PROCEDURE already exists"
|
||||
"PROCEDURE does not exist"
|
||||
"Failed to DROP PROCEDURE"
|
||||
"Failed to store PROCEDURE"
|
||||
"Failed to CREATE PROCEDURE"
|
||||
"LEAVE with no matching label"
|
||||
"ITERATE with no matching label"
|
||||
"Redefining label"
|
||||
"End-label without match"
|
||||
"Referring to uninitialized variable"
|
||||
|
|
|
|||
|
|
@ -260,3 +260,9 @@
|
|||
"PROCEDURE already exists"
|
||||
"PROCEDURE does not exist"
|
||||
"Failed to DROP PROCEDURE"
|
||||
"Failed to store PROCEDURE"
|
||||
"LEAVE with no matching label"
|
||||
"ITERATE with no matching label"
|
||||
"Redefining label"
|
||||
"End-label without match"
|
||||
"Referring to uninitialized variable"
|
||||
|
|
|
|||
|
|
@ -255,3 +255,9 @@
|
|||
"PROCEDURE already exists"
|
||||
"PROCEDURE does not exist"
|
||||
"Failed to DROP PROCEDURE"
|
||||
"Failed to store PROCEDURE"
|
||||
"LEAVE with no matching label"
|
||||
"ITERATE with no matching label"
|
||||
"Redefining label"
|
||||
"End-label without match"
|
||||
"Referring to uninitialized variable"
|
||||
|
|
|
|||
|
|
@ -265,3 +265,9 @@
|
|||
"PROCEDURE already exists"
|
||||
"PROCEDURE does not exist"
|
||||
"Failed to DROP PROCEDURE"
|
||||
"Failed to store PROCEDURE"
|
||||
"LEAVE with no matching label"
|
||||
"ITERATE with no matching label"
|
||||
"Redefining label"
|
||||
"End-label without match"
|
||||
"Referring to uninitialized variable"
|
||||
|
|
|
|||
|
|
@ -255,3 +255,9 @@
|
|||
"PROCEDURE already exists"
|
||||
"PROCEDURE does not exist"
|
||||
"Failed to DROP PROCEDURE"
|
||||
"Failed to store PROCEDURE"
|
||||
"LEAVE with no matching label"
|
||||
"ITERATE with no matching label"
|
||||
"Redefining label"
|
||||
"End-label without match"
|
||||
"Referring to uninitialized variable"
|
||||
|
|
|
|||
|
|
@ -257,3 +257,9 @@
|
|||
"PROCEDURE already exists"
|
||||
"PROCEDURE does not exist"
|
||||
"Failed to DROP PROCEDURE"
|
||||
"Failed to store PROCEDURE"
|
||||
"LEAVE with no matching label"
|
||||
"ITERATE with no matching label"
|
||||
"Redefining label"
|
||||
"End-label without match"
|
||||
"Referring to uninitialized variable"
|
||||
|
|
|
|||
|
|
@ -255,3 +255,9 @@
|
|||
"PROCEDURE already exists"
|
||||
"PROCEDURE does not exist"
|
||||
"Failed to DROP PROCEDURE"
|
||||
"Failed to store PROCEDURE"
|
||||
"LEAVE with no matching label"
|
||||
"ITERATE with no matching label"
|
||||
"Redefining label"
|
||||
"End-label without match"
|
||||
"Referring to uninitialized variable"
|
||||
|
|
|
|||
|
|
@ -257,3 +257,9 @@
|
|||
"PROCEDURE already exists"
|
||||
"PROCEDURE does not exist"
|
||||
"Failed to DROP PROCEDURE"
|
||||
"Failed to store PROCEDURE"
|
||||
"LEAVE with no matching label"
|
||||
"ITERATE with no matching label"
|
||||
"Redefining label"
|
||||
"End-label without match"
|
||||
"Referring to uninitialized variable"
|
||||
|
|
|
|||
|
|
@ -255,3 +255,9 @@
|
|||
"PROCEDURE already exists"
|
||||
"PROCEDURE does not exist"
|
||||
"Failed to DROP PROCEDURE"
|
||||
"Failed to store PROCEDURE"
|
||||
"LEAVE with no matching label"
|
||||
"ITERATE with no matching label"
|
||||
"Redefining label"
|
||||
"End-label without match"
|
||||
"Referring to uninitialized variable"
|
||||
|
|
|
|||
|
|
@ -257,3 +257,9 @@
|
|||
"PROCEDURE already exists"
|
||||
"PROCEDURE does not exist"
|
||||
"Failed to DROP PROCEDURE"
|
||||
"Failed to store PROCEDURE"
|
||||
"LEAVE with no matching label"
|
||||
"ITERATE with no matching label"
|
||||
"Redefining label"
|
||||
"End-label without match"
|
||||
"Referring to uninitialized variable"
|
||||
|
|
|
|||
|
|
@ -257,3 +257,9 @@
|
|||
"PROCEDURE already exists"
|
||||
"PROCEDURE does not exist"
|
||||
"Failed to DROP PROCEDURE"
|
||||
"Failed to store PROCEDURE"
|
||||
"LEAVE with no matching label"
|
||||
"ITERATE with no matching label"
|
||||
"Redefining label"
|
||||
"End-label without match"
|
||||
"Referring to uninitialized variable"
|
||||
|
|
|
|||
|
|
@ -259,3 +259,9 @@
|
|||
"PROCEDURE already exists"
|
||||
"PROCEDURE does not exist"
|
||||
"Failed to DROP PROCEDURE"
|
||||
"Failed to store PROCEDURE"
|
||||
"LEAVE with no matching label"
|
||||
"ITERATE with no matching label"
|
||||
"Redefining label"
|
||||
"End-label without match"
|
||||
"Referring to uninitialized variable"
|
||||
|
|
|
|||
|
|
@ -255,3 +255,9 @@
|
|||
"PROCEDURE already exists"
|
||||
"PROCEDURE does not exist"
|
||||
"Failed to DROP PROCEDURE"
|
||||
"Failed to store PROCEDURE"
|
||||
"LEAVE with no matching label"
|
||||
"ITERATE with no matching label"
|
||||
"Redefining label"
|
||||
"End-label without match"
|
||||
"Referring to uninitialized variable"
|
||||
|
|
|
|||
|
|
@ -259,3 +259,9 @@
|
|||
"PROCEDURE already exists"
|
||||
"PROCEDURE does not exist"
|
||||
"Failed to DROP PROCEDURE"
|
||||
"Failed to store PROCEDURE"
|
||||
"LEAVE with no matching label"
|
||||
"ITERATE with no matching label"
|
||||
"Redefining label"
|
||||
"End-label without match"
|
||||
"Referring to uninitialized variable"
|
||||
|
|
|
|||
|
|
@ -258,3 +258,9 @@
|
|||
"PROCEDURE already exists"
|
||||
"PROCEDURE does not exist"
|
||||
"Failed to DROP PROCEDURE"
|
||||
"Failed to store PROCEDURE"
|
||||
"LEAVE with no matching label"
|
||||
"ITERATE with no matching label"
|
||||
"Redefining label"
|
||||
"End-label without match"
|
||||
"Referring to uninitialized variable"
|
||||
|
|
|
|||
|
|
@ -251,3 +251,9 @@
|
|||
"PROCEDURE already exists"
|
||||
"PROCEDURE does not exist"
|
||||
"Failed to DROP PROCEDURE"
|
||||
"Failed to store PROCEDURE"
|
||||
"LEAVE with no matching label"
|
||||
"ITERATE with no matching label"
|
||||
"Redefining label"
|
||||
"End-label without match"
|
||||
"Referring to uninitialized variable"
|
||||
|
|
|
|||
|
|
@ -263,3 +263,9 @@
|
|||
"PROCEDURE already exists"
|
||||
"PROCEDURE does not exist"
|
||||
"Failed to DROP PROCEDURE"
|
||||
"Failed to store PROCEDURE"
|
||||
"LEAVE with no matching label"
|
||||
"ITERATE with no matching label"
|
||||
"Redefining label"
|
||||
"End-label without match"
|
||||
"Referring to uninitialized variable"
|
||||
|
|
|
|||
|
|
@ -256,3 +256,9 @@
|
|||
"PROCEDURE already exists"
|
||||
"PROCEDURE does not exist"
|
||||
"Failed to DROP PROCEDURE"
|
||||
"Failed to store PROCEDURE"
|
||||
"LEAVE with no matching label"
|
||||
"ITERATE with no matching label"
|
||||
"Redefining label"
|
||||
"End-label without match"
|
||||
"Referring to uninitialized variable"
|
||||
|
|
|
|||
|
|
@ -255,3 +255,9 @@
|
|||
"PROCEDURE already exists"
|
||||
"PROCEDURE does not exist"
|
||||
"Failed to DROP PROCEDURE"
|
||||
"Failed to store PROCEDURE"
|
||||
"LEAVE with no matching label"
|
||||
"ITERATE with no matching label"
|
||||
"Redefining label"
|
||||
"End-label without match"
|
||||
"Referring to uninitialized variable"
|
||||
|
|
|
|||
|
|
@ -260,3 +260,9 @@
|
|||
"PROCEDURE already exists"
|
||||
"PROCEDURE does not exist"
|
||||
"Failed to DROP PROCEDURE"
|
||||
"Failed to store PROCEDURE"
|
||||
"LEAVE with no matching label"
|
||||
"ITERATE with no matching label"
|
||||
"Redefining label"
|
||||
"End-label without match"
|
||||
"Referring to uninitialized variable"
|
||||
|
|
|
|||
|
|
@ -1097,7 +1097,7 @@ sp_proc_stmt:
|
|||
|
||||
if (! lab)
|
||||
{
|
||||
printf("QQ LEAVE with no matching label\n");
|
||||
send_error(YYTHD, ER_SP_LEAVE_MISMATCH);
|
||||
YYABORT;
|
||||
}
|
||||
else
|
||||
|
|
@ -1115,7 +1115,7 @@ sp_proc_stmt:
|
|||
|
||||
if (! lab)
|
||||
{
|
||||
printf("QQ ITERATE with no matching label\n");
|
||||
send_error(YYTHD, ER_SP_ITERATE_MISMATCH);
|
||||
YYABORT;
|
||||
}
|
||||
else
|
||||
|
|
@ -1217,7 +1217,7 @@ sp_labeled_control:
|
|||
|
||||
if (lab)
|
||||
{
|
||||
printf("QQ Redefining label\n");
|
||||
send_error(YYTHD, ER_SP_LABEL_REDEFINE);
|
||||
YYABORT;
|
||||
}
|
||||
else
|
||||
|
|
@ -1231,14 +1231,9 @@ sp_labeled_control:
|
|||
LEX *lex= Lex;
|
||||
sp_label_t *lab= lex->spcont->find_label($5.str);
|
||||
|
||||
if (! lab)
|
||||
if (! lab || strcasecmp($5.str, lab->name) != 0)
|
||||
{
|
||||
printf("QQ end-label without match\n");
|
||||
YYABORT;
|
||||
}
|
||||
else if (strcasecmp($5.str, lab->name) != 0)
|
||||
{
|
||||
printf("QQ mismatching labels\n");
|
||||
send_error(YYTHD, ER_SP_LABEL_MISMATCH);
|
||||
YYABORT;
|
||||
}
|
||||
else
|
||||
|
|
@ -4158,8 +4153,8 @@ simple_ident:
|
|||
{ /* We're compiling a stored procedure and found a variable */
|
||||
if (lex->sql_command != SQLCOM_CALL && ! spv->isset)
|
||||
{
|
||||
printf("QQ Referring to an unitialized variable\n");
|
||||
YYABORT; /* QQ Referring to an unitialized variable */
|
||||
send_error(YYTHD, ER_SP_UNINIT_VAR);
|
||||
YYABORT;
|
||||
}
|
||||
else
|
||||
$$ = (Item*) new Item_splocal(spv->offset);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue