mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 11:27:39 +02:00
MDEV-10411 Providing compatibility for basic PL/SQL constructs
Changing label syntax from "label:" to "<<label>>".
This commit is contained in:
parent
4de26a8e0e
commit
47a75ed7cb
3 changed files with 154 additions and 7 deletions
|
|
@ -1059,6 +1059,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
|
|||
opt_component key_cache_name
|
||||
sp_opt_label BIN_NUM label_ident TEXT_STRING_filesystem ident_or_empty
|
||||
opt_constraint constraint opt_ident
|
||||
label_declaration_oracle
|
||||
|
||||
%type <lex_string_with_metadata>
|
||||
TEXT_STRING
|
||||
|
|
@ -3507,7 +3508,7 @@ sp_opt_label:
|
|||
;
|
||||
|
||||
sp_labeled_block:
|
||||
label_ident ':' BEGIN_SYM
|
||||
label_declaration_oracle BEGIN_SYM
|
||||
{
|
||||
LEX *lex= Lex;
|
||||
sp_pcontext *ctx= lex->spcont;
|
||||
|
|
@ -3519,10 +3520,10 @@ sp_labeled_block:
|
|||
}
|
||||
sp_block_content sp_opt_label
|
||||
{
|
||||
if ($6.str)
|
||||
if ($5.str)
|
||||
{
|
||||
if (my_strcasecmp(system_charset_info, $6.str, $5->name.str) != 0)
|
||||
my_yyabort_error((ER_SP_LABEL_MISMATCH, MYF(0), $6.str));
|
||||
if (my_strcasecmp(system_charset_info, $5.str, $4->name.str) != 0)
|
||||
my_yyabort_error((ER_SP_LABEL_MISMATCH, MYF(0), $5.str));
|
||||
}
|
||||
}
|
||||
;
|
||||
|
|
@ -3675,14 +3676,14 @@ pop_sp_empty_label:
|
|||
;
|
||||
|
||||
sp_labeled_control:
|
||||
label_ident ':' LOOP_SYM
|
||||
label_declaration_oracle LOOP_SYM
|
||||
{
|
||||
if (push_sp_label(thd, $1))
|
||||
MYSQL_YYABORT;
|
||||
}
|
||||
loop_body pop_sp_label
|
||||
{ }
|
||||
| label_ident ':' WHILE_SYM
|
||||
| label_declaration_oracle WHILE_SYM
|
||||
{
|
||||
if (push_sp_label(thd, $1))
|
||||
MYSQL_YYABORT;
|
||||
|
|
@ -3690,7 +3691,7 @@ sp_labeled_control:
|
|||
}
|
||||
while_body pop_sp_label
|
||||
{ }
|
||||
| label_ident ':' REPEAT_SYM
|
||||
| label_declaration_oracle REPEAT_SYM
|
||||
{
|
||||
if (push_sp_label(thd, $1))
|
||||
MYSQL_YYABORT;
|
||||
|
|
@ -13808,6 +13809,10 @@ label_ident:
|
|||
}
|
||||
;
|
||||
|
||||
label_declaration_oracle:
|
||||
SHIFT_LEFT label_ident SHIFT_RIGHT { $$= $2; }
|
||||
;
|
||||
|
||||
ident_or_text:
|
||||
ident { $$=$1;}
|
||||
| TEXT_STRING_sys { $$=$1;}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue