|
|
|
@ -287,6 +287,8 @@ void ORAerror(THD *thd, const char *s) |
|
|
|
} |
|
|
|
|
|
|
|
%{ |
|
|
|
/* avoid unintentional %union size increases, it's what a parser stack made of */ |
|
|
|
static_assert(sizeof(YYSTYPE) == sizeof(void*)*2+8, "%union size check"); |
|
|
|
bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize); |
|
|
|
%} |
|
|
|
|
|
|
|
@ -1129,8 +1131,8 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize); |
|
|
|
%left '^' |
|
|
|
%left MYSQL_CONCAT_SYM |
|
|
|
%left NEG '~' NOT2_SYM BINARY |
|
|
|
%left SUBQUERY_AS_EXPR |
|
|
|
%left COLLATE_SYM |
|
|
|
%left SUBQUERY_AS_EXPR |
|
|
|
|
|
|
|
/* |
|
|
|
Tokens that can change their meaning from identifier to something else |
|
|
|
@ -2352,9 +2354,9 @@ create: |
|
|
|
| create_or_replace view_algorithm definer_opt opt_view_suid VIEW_SYM |
|
|
|
opt_if_not_exists table_ident |
|
|
|
{ |
|
|
|
if (Lex->main_select_push()) |
|
|
|
if (unlikely(Lex->add_create_view(thd, $1 | $6, $2, $4, $7))) |
|
|
|
MYSQL_YYABORT; |
|
|
|
if (Lex->add_create_view(thd, $1 | $6, $2, $4, $7)) |
|
|
|
if (Lex->main_select_push()) |
|
|
|
MYSQL_YYABORT; |
|
|
|
} |
|
|
|
view_list_opt AS view_select |
|
|
|
@ -4115,9 +4117,7 @@ sp_proc_stmt_return: |
|
|
|
; |
|
|
|
|
|
|
|
reset_lex_expr: |
|
|
|
{ Lex->sphead->reset_lex(thd); } |
|
|
|
expr |
|
|
|
{ $$= $2; } |
|
|
|
{ Lex->sphead->reset_lex(thd); } expr { $$= $2; } |
|
|
|
; |
|
|
|
|
|
|
|
sp_proc_stmt_exit_oracle: |
|
|
|
@ -4133,14 +4133,14 @@ sp_proc_stmt_exit_oracle: |
|
|
|
} |
|
|
|
| EXIT_ORACLE_SYM WHEN_SYM reset_lex_expr |
|
|
|
{ |
|
|
|
if (Lex->sp_exit_statement(thd, $3) || |
|
|
|
Lex->sphead->restore_lex(thd)) |
|
|
|
if (unlikely(Lex->sp_exit_statement(thd, $3)) || |
|
|
|
unlikely(Lex->sphead->restore_lex(thd))) |
|
|
|
MYSQL_YYABORT; |
|
|
|
} |
|
|
|
| EXIT_ORACLE_SYM label_ident WHEN_SYM reset_lex_expr |
|
|
|
{ |
|
|
|
if (Lex->sp_exit_statement(thd, &$2, $4) || |
|
|
|
Lex->sphead->restore_lex(thd)) |
|
|
|
if (unlikely(Lex->sp_exit_statement(thd, &$2, $4)) || |
|
|
|
unlikely(Lex->sphead->restore_lex(thd))) |
|
|
|
MYSQL_YYABORT; |
|
|
|
} |
|
|
|
; |
|
|
|
@ -4158,14 +4158,14 @@ sp_proc_stmt_continue_oracle: |
|
|
|
} |
|
|
|
| CONTINUE_ORACLE_SYM WHEN_SYM reset_lex_expr |
|
|
|
{ |
|
|
|
if (Lex->sp_continue_statement(thd, $3) || |
|
|
|
Lex->sphead->restore_lex(thd)) |
|
|
|
if (unlikely(Lex->sp_continue_statement(thd, $3)) || |
|
|
|
unlikely(Lex->sphead->restore_lex(thd))) |
|
|
|
MYSQL_YYABORT; |
|
|
|
} |
|
|
|
| CONTINUE_ORACLE_SYM label_ident WHEN_SYM reset_lex_expr |
|
|
|
{ |
|
|
|
if (Lex->sp_continue_statement(thd, &$2, $4) || |
|
|
|
Lex->sphead->restore_lex(thd)) |
|
|
|
if (unlikely(Lex->sp_continue_statement(thd, &$2, $4)) || |
|
|
|
unlikely(Lex->sphead->restore_lex(thd))) |
|
|
|
MYSQL_YYABORT; |
|
|
|
} |
|
|
|
; |
|
|
|
@ -5386,13 +5386,12 @@ partition_entry: |
|
|
|
thd->parse_error(ER_PARTITION_ENTRY_ERROR); |
|
|
|
MYSQL_YYABORT; |
|
|
|
} |
|
|
|
DBUG_ASSERT(Lex->part_info->table); |
|
|
|
if (Lex->main_select_push()) |
|
|
|
MYSQL_YYABORT; |
|
|
|
/* |
|
|
|
We enter here when opening the frm file to translate |
|
|
|
partition info string into part_info data structure. |
|
|
|
*/ |
|
|
|
if (Lex->main_select_push()) |
|
|
|
MYSQL_YYABORT; |
|
|
|
} |
|
|
|
partition |
|
|
|
{ |
|
|
|
@ -9285,6 +9284,7 @@ opt_ignore_leaves: |
|
|
|
Select : retrieve data from table |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
select: |
|
|
|
query_expression_no_with_clause |
|
|
|
{ |
|
|
|
@ -9317,7 +9317,6 @@ select: |
|
|
|
} |
|
|
|
; |
|
|
|
|
|
|
|
|
|
|
|
select_into: |
|
|
|
select_into_query_specification |
|
|
|
{ |
|
|
|
@ -9354,7 +9353,6 @@ select_into: |
|
|
|
} |
|
|
|
; |
|
|
|
|
|
|
|
|
|
|
|
simple_table: |
|
|
|
query_specification { $$= $1; } |
|
|
|
| table_value_constructor { $$= $1; } |
|
|
|
@ -9378,8 +9376,7 @@ query_specification_start: |
|
|
|
{ |
|
|
|
SELECT_LEX *sel; |
|
|
|
LEX *lex= Lex; |
|
|
|
if (!(sel= lex->alloc_select(TRUE)) || |
|
|
|
lex->push_select(sel)) |
|
|
|
if (!(sel= lex->alloc_select(TRUE)) || lex->push_select(sel)) |
|
|
|
MYSQL_YYABORT; |
|
|
|
sel->init_select(); |
|
|
|
sel->braces= FALSE; |
|
|
|
@ -9702,7 +9699,7 @@ select_options: |
|
|
|
opt_history_unit: |
|
|
|
/* empty*/ %prec PREC_BELOW_IDENTIFIER_OPT_SPECIAL_CASE |
|
|
|
{ |
|
|
|
$$= VERS_UNDEFINED; |
|
|
|
$$= VERS_TIMESTAMP; |
|
|
|
} |
|
|
|
| TRANSACTION_SYM |
|
|
|
{ |
|
|
|
@ -9718,7 +9715,7 @@ history_point: |
|
|
|
TIMESTAMP TEXT_STRING |
|
|
|
{ |
|
|
|
Item *item; |
|
|
|
if (!(item= type_handler_datetime2.create_literal_item(thd, |
|
|
|
if (!(item= type_handler_datetime.create_literal_item(thd, |
|
|
|
$2.str, $2.length, |
|
|
|
YYCSCL, true))) |
|
|
|
MYSQL_YYABORT; |
|
|
|
@ -9834,6 +9831,7 @@ select_lock_type: |
|
|
|
} |
|
|
|
; |
|
|
|
|
|
|
|
|
|
|
|
opt_select_lock_type: |
|
|
|
/* empty */ |
|
|
|
{ |
|
|
|
@ -9845,6 +9843,7 @@ opt_select_lock_type: |
|
|
|
} |
|
|
|
; |
|
|
|
|
|
|
|
|
|
|
|
opt_lock_wait_timeout_new: |
|
|
|
/* empty */ |
|
|
|
{ |
|
|
|
@ -12483,7 +12482,6 @@ table_primary_derived: |
|
|
|
MYSQL_YYABORT; |
|
|
|
} |
|
|
|
; |
|
|
|
; |
|
|
|
|
|
|
|
opt_outer: |
|
|
|
/* empty */ {} |
|
|
|
@ -12984,7 +12982,7 @@ limit_clause: |
|
|
|
{ |
|
|
|
$$.select_limit= 0; |
|
|
|
$$.offset_limit= 0; |
|
|
|
$$.explicit_limit= 1; |
|
|
|
$$.explicit_limit= 0; |
|
|
|
Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT); |
|
|
|
} |
|
|
|
; |
|
|
|
@ -13100,6 +13098,7 @@ order_limit_lock: |
|
|
|
$$->lock= $1; |
|
|
|
} |
|
|
|
; |
|
|
|
|
|
|
|
opt_order_limit_lock: |
|
|
|
/* empty */ |
|
|
|
{ |
|
|
|
@ -13138,7 +13137,6 @@ opt_procedure_or_into: |
|
|
|
} |
|
|
|
; |
|
|
|
|
|
|
|
|
|
|
|
order_or_limit: |
|
|
|
order_clause opt_limit_clause |
|
|
|
{ |
|
|
|
@ -14503,26 +14501,26 @@ show_param: |
|
|
|
} |
|
|
|
| ALL SLAVES STATUS_SYM |
|
|
|
{ |
|
|
|
Lex->sql_command = SQLCOM_SHOW_SLAVE_STAT; |
|
|
|
if (!(Lex->m_sql_cmd= new (thd->mem_root) |
|
|
|
Sql_cmd_show_slave_status(true))) |
|
|
|
MYSQL_YYABORT; |
|
|
|
Lex->sql_command = SQLCOM_SHOW_SLAVE_STAT; |
|
|
|
} |
|
|
|
| SLAVE STATUS_SYM |
|
|
|
{ |
|
|
|
LEX *lex= thd->lex; |
|
|
|
lex->mi.connection_name= null_clex_str; |
|
|
|
lex->sql_command = SQLCOM_SHOW_SLAVE_STAT; |
|
|
|
if (!(lex->m_sql_cmd= new (thd->mem_root) |
|
|
|
Sql_cmd_show_slave_status())) |
|
|
|
MYSQL_YYABORT; |
|
|
|
lex->sql_command = SQLCOM_SHOW_SLAVE_STAT; |
|
|
|
} |
|
|
|
| SLAVE connection_name STATUS_SYM |
|
|
|
{ |
|
|
|
Lex->sql_command = SQLCOM_SHOW_SLAVE_STAT; |
|
|
|
if (!(Lex->m_sql_cmd= new (thd->mem_root) |
|
|
|
Sql_cmd_show_slave_status())) |
|
|
|
MYSQL_YYABORT; |
|
|
|
Lex->sql_command = SQLCOM_SHOW_SLAVE_STAT; |
|
|
|
} |
|
|
|
| CREATE PROCEDURE_SYM sp_name |
|
|
|
{ |
|
|
|
@ -15106,6 +15104,7 @@ shutdown_option: |
|
|
|
Lex->is_shutdown_wait_for_slaves= true; |
|
|
|
} |
|
|
|
; |
|
|
|
|
|
|
|
/* change database */ |
|
|
|
|
|
|
|
use: |
|
|
|
@ -15130,7 +15129,7 @@ load: |
|
|
|
$2 == FILETYPE_CSV ? "LOAD DATA" : "LOAD XML"); |
|
|
|
MYSQL_YYABORT; |
|
|
|
} |
|
|
|
if (Lex->main_select_push()) |
|
|
|
if (lex->main_select_push()) |
|
|
|
MYSQL_YYABORT; |
|
|
|
mysql_init_select(lex); |
|
|
|
} |
|
|
|
@ -15544,7 +15543,7 @@ temporal_literal: |
|
|
|
} |
|
|
|
| TIMESTAMP TEXT_STRING |
|
|
|
{ |
|
|
|
if (unlikely(!($$= type_handler_datetime2.create_literal_item(thd, |
|
|
|
if (unlikely(!($$= type_handler_datetime.create_literal_item(thd, |
|
|
|
$2.str, $2.length, |
|
|
|
YYCSCL, true)))) |
|
|
|
MYSQL_YYABORT; |
|
|
|
@ -16475,9 +16474,9 @@ keyword_sp_var_and_label: |
|
|
|
| MYSQL_SYM |
|
|
|
| MYSQL_ERRNO_SYM |
|
|
|
| NAME_SYM |
|
|
|
| NEVER_SYM |
|
|
|
| NEXT_SYM %prec PREC_BELOW_CONTRACTION_TOKEN2 |
|
|
|
| NEXTVAL_SYM |
|
|
|
| NEVER_SYM |
|
|
|
| NEW_SYM |
|
|
|
| NOCACHE_SYM |
|
|
|
| NOCYCLE_SYM |
|
|
|
@ -18510,6 +18509,7 @@ trigger_tail: |
|
|
|
|
|
|
|
**************************************************************************/ |
|
|
|
|
|
|
|
|
|
|
|
sf_return_type: |
|
|
|
{ |
|
|
|
LEX *lex= Lex; |
|
|
|
|