)))
MYSQL_YYABORT;
(yyval.sp_assignment_lex_list)->push_back((yyvsp[0].assignment_lex), thd->mem_root);
}
#line 31718 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 408: /* cursor_actual_parameters: cursor_actual_parameters ',' assignment_source_expr */
#line 4003 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.sp_assignment_lex_list)= (yyvsp[-2].sp_assignment_lex_list);
(yyval.sp_assignment_lex_list)->push_back((yyvsp[0].assignment_lex), thd->mem_root);
}
#line 31727 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 409: /* opt_parenthesized_cursor_actual_parameters: %empty */
#line 4010 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.sp_assignment_lex_list)= NULL; }
#line 31733 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 410: /* opt_parenthesized_cursor_actual_parameters: '(' cursor_actual_parameters ')' */
#line 4011 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.sp_assignment_lex_list)= (yyvsp[-1].sp_assignment_lex_list); }
#line 31739 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 414: /* sp_proc_stmt_open: OPEN_SYM ident opt_parenthesized_cursor_actual_parameters */
#line 4022 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_open_cursor(thd, &(yyvsp[-1].ident_sys), (yyvsp[0].sp_assignment_lex_list))))
MYSQL_YYABORT;
}
#line 31748 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 415: /* sp_proc_stmt_fetch_head: FETCH_SYM ident INTO */
#line 4030 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_add_cfetch(thd, &(yyvsp[-1].ident_sys))))
MYSQL_YYABORT;
}
#line 31757 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 416: /* sp_proc_stmt_fetch_head: FETCH_SYM FROM ident INTO */
#line 4035 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_add_cfetch(thd, &(yyvsp[-1].ident_sys))))
MYSQL_YYABORT;
}
#line 31766 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 417: /* sp_proc_stmt_fetch_head: FETCH_SYM NEXT_SYM FROM ident INTO */
#line 4040 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_add_cfetch(thd, &(yyvsp[-1].ident_sys))))
MYSQL_YYABORT;
}
#line 31775 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 418: /* sp_proc_stmt_fetch: sp_proc_stmt_fetch_head sp_fetch_list */
#line 4047 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 31781 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 419: /* sp_proc_stmt_fetch: FETCH_SYM GROUP_SYM NEXT_SYM ROW_SYM */
#line 4049 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_add_agg_cfetch()))
MYSQL_YYABORT;
}
#line 31790 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 420: /* sp_proc_stmt_close: CLOSE_SYM ident */
#line 4057 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
sp_head *sp= lex->sphead;
uint offset;
sp_instr_cclose *i;
if (unlikely(!lex->spcont->find_cursor(&(yyvsp[0].ident_sys), &offset, false)))
my_yyabort_error((ER_SP_CURSOR_MISMATCH, MYF(0), (yyvsp[0].ident_sys).str));
i= new (thd->mem_root)
sp_instr_cclose(sp->instructions(), lex->spcont, offset);
if (unlikely(i == NULL) ||
unlikely(sp->add_instr(i)))
MYSQL_YYABORT;
}
#line 31809 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 421: /* sp_fetch_list: ident */
#line 4075 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
sp_head *sp= lex->sphead;
sp_pcontext *spc= lex->spcont;
sp_variable *spv= likely(spc != NULL)
? spc->find_variable(&(yyvsp[0].ident_sys), false)
: NULL;
if (unlikely(!spv))
my_yyabort_error((ER_SP_UNDECLARED_VAR, MYF(0), (yyvsp[0].ident_sys).str));
/* An SP local variable */
sp_instr_cfetch *i= (sp_instr_cfetch *)sp->last_instruction();
i->add_to_varlist(spv);
}
#line 31829 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 422: /* sp_fetch_list: sp_fetch_list ',' ident */
#line 4091 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
sp_head *sp= lex->sphead;
sp_pcontext *spc= lex->spcont;
sp_variable *spv= likely(spc != NULL)
? spc->find_variable(&(yyvsp[0].ident_sys), false)
: NULL;
if (unlikely(!spv))
my_yyabort_error((ER_SP_UNDECLARED_VAR, MYF(0), (yyvsp[0].ident_sys).str));
/* An SP local variable */
sp_instr_cfetch *i= (sp_instr_cfetch *)sp->last_instruction();
i->add_to_varlist(spv);
}
#line 31849 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 423: /* $@47: %empty */
#line 4110 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyvsp[-1].expr_lex)->sp_if_expr(thd)))
MYSQL_YYABORT;
}
#line 31858 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 424: /* $@48: %empty */
#line 4115 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyvsp[-3].expr_lex)->sp_if_after_statements(thd)))
MYSQL_YYABORT;
}
#line 31867 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 425: /* sp_if: expr_lex THEN_SYM $@47 sp_if_then_statements $@48 sp_elseifs */
#line 4120 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sphead->backpatch(lex->spcont->pop_label());
}
#line 31877 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 430: /* $@49: %empty */
#line 4136 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->maybe_start_compound_statement(thd)))
MYSQL_YYABORT;
/**
An example of the CASE statement in use is
CREATE PROCEDURE proc_19194_simple(i int)
BEGIN
DECLARE str CHAR(10);
CASE i
WHEN 1 THEN SET str="1";
WHEN 2 THEN SET str="2";
WHEN 3 THEN SET str="3";
ELSE SET str="unknown";
END CASE;
SELECT str;
END
The actions are used to generate the following code:
SHOW PROCEDURE CODE proc_19194_simple;
Pos Instruction
0 set str@1 NULL
1 set_case_expr (12) 0 i@0
2 jump_if_not 5(12) (case_expr@0 = 1)
3 set str@1 _latin1'1'
4 jump 12
5 jump_if_not 8(12) (case_expr@0 = 2)
6 set str@1 _latin1'2'
7 jump 12
8 jump_if_not 11(12) (case_expr@0 = 3)
9 set str@1 _latin1'3'
10 jump 12
11 set str@1 _latin1'unknown'
12 stmt 0 "SELECT str"
*/
Lex->sphead->new_cont_backpatch(NULL);
/*
BACKPATCH: Creating target label for the jump to after END CASE
(instruction 12 in the example)
*/
Lex->spcont->push_label(thd, &empty_clex_str, Lex->sphead->instructions());
}
#line 31931 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 431: /* case_stmt_specification: CASE_SYM $@49 case_stmt_body else_clause_opt END CASE_SYM */
#line 4189 "/home/buildbot/git/sql/sql_yacc.yy"
{
/*
BACKPATCH: Resolving forward jump from
"case_stmt_action_then" to after END CASE
(jump from instruction 4 to 12, 7 to 12 ... in the example)
*/
Lex->sphead->backpatch(Lex->spcont->pop_label());
if ((yyvsp[-3].num))
Lex->spcont->pop_case_expr_id();
Lex->sphead->do_cont_backpatch();
}
#line 31949 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 432: /* $@50: %empty */
#line 4206 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyvsp[0].expr_lex)->case_stmt_action_expr()))
MYSQL_YYABORT;
}
#line 31958 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 433: /* case_stmt_body: expr_lex $@50 simple_when_clause_list */
#line 4211 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 31964 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 434: /* case_stmt_body: searched_when_clause_list */
#line 4213 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 31970 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 439: /* $@51: %empty */
#line 4228 "/home/buildbot/git/sql/sql_yacc.yy"
{
/* Simple case: = */
if (unlikely((yyvsp[0].expr_lex)->case_stmt_action_when(true)))
MYSQL_YYABORT;
}
#line 31980 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 440: /* simple_when_clause: WHEN_SYM expr_lex $@51 THEN_SYM sp_case_then_statements */
#line 4235 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->case_stmt_action_then()))
MYSQL_YYABORT;
}
#line 31989 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 441: /* $@52: %empty */
#line 4243 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyvsp[0].expr_lex)->case_stmt_action_when(false)))
MYSQL_YYABORT;
}
#line 31998 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 442: /* searched_when_clause: WHEN_SYM expr_lex $@52 THEN_SYM sp_case_then_statements */
#line 4249 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->case_stmt_action_then()))
MYSQL_YYABORT;
}
#line 32007 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 443: /* else_clause_opt: %empty */
#line 4257 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
sp_head *sp= lex->sphead;
uint ip= sp->instructions();
sp_instr_error *i= new (thd->mem_root)
sp_instr_error(ip, lex->spcont, ER_SP_CASE_NOT_FOUND);
if (unlikely(i == NULL) ||
unlikely(sp->add_instr(i)))
MYSQL_YYABORT;
}
#line 32022 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 445: /* sp_opt_label: %empty */
#line 4271 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= null_clex_str; }
#line 32028 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 446: /* sp_opt_label: label_ident */
#line 4272 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= (yyvsp[0].ident_sys); }
#line 32034 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 447: /* opt_sp_for_loop_direction: %empty */
#line 4277 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 32040 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 448: /* opt_sp_for_loop_direction: REVERSE_SYM */
#line 4278 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= -1; }
#line 32046 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 449: /* sp_for_loop_index_and_bounds: ident_for_loop_index sp_for_loop_bounds */
#line 4283 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_for_loop_declarations(thd, &(yyval.for_loop), &(yyvsp[-1].ident_sys), (yyvsp[0].for_loop_bounds))))
MYSQL_YYABORT;
}
#line 32055 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 450: /* sp_for_loop_bounds: IN_SYM opt_sp_for_loop_direction for_loop_bound_expr DOT_DOT_SYM for_loop_bound_expr */
#line 4292 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.for_loop_bounds)= Lex_for_loop_bounds_intrange((yyvsp[-3].num), (yyvsp[-2].assignment_lex), (yyvsp[0].assignment_lex));
}
#line 32063 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 451: /* sp_for_loop_bounds: IN_SYM opt_sp_for_loop_direction for_loop_bound_expr */
#line 4296 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.for_loop_bounds).m_direction= (yyvsp[-1].num);
(yyval.for_loop_bounds).m_index= (yyvsp[0].assignment_lex);
(yyval.for_loop_bounds).m_target_bound= NULL;
(yyval.for_loop_bounds).m_implicit_cursor= false;
}
#line 32074 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 452: /* sp_for_loop_bounds: IN_SYM opt_sp_for_loop_direction '(' sp_cursor_stmt ')' */
#line 4303 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_for_loop_implicit_cursor_statement(thd, &(yyval.for_loop_bounds),
(yyvsp[-1].sp_cursor_stmt))))
MYSQL_YYABORT;
}
#line 32084 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 453: /* loop_body: sp_proc_stmts1 END LOOP_SYM */
#line 4312 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
uint ip= lex->sphead->instructions();
sp_label *lab= lex->spcont->last_label(); /* Jumping back */
sp_instr_jump *i= new (thd->mem_root)
sp_instr_jump(ip, lex->spcont, lab->ip);
if (unlikely(i == NULL) ||
unlikely(lex->sphead->add_instr(i)))
MYSQL_YYABORT;
}
#line 32099 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 454: /* repeat_body: sp_proc_stmts1 UNTIL_SYM expr_lex END REPEAT_SYM */
#line 4326 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyvsp[-2].expr_lex)->sp_repeat_loop_finalize(thd))
MYSQL_YYABORT;
}
#line 32108 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 455: /* pop_sp_loop_label: sp_opt_label */
#line 4334 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_pop_loop_label(thd, &(yyvsp[0].lex_str))))
MYSQL_YYABORT;
}
#line 32117 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 456: /* $@53: %empty */
#line 4342 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_push_loop_label(thd, &(yyvsp[-1].lex_str))))
MYSQL_YYABORT;
}
#line 32126 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 457: /* sp_labeled_control: sp_control_label LOOP_SYM $@53 loop_body pop_sp_loop_label */
#line 4347 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 32132 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 458: /* $@54: %empty */
#line 4349 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_push_loop_label(thd, &(yyvsp[-1].lex_str))))
MYSQL_YYABORT;
}
#line 32141 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 459: /* sp_labeled_control: sp_control_label WHILE_SYM $@54 while_body pop_sp_loop_label */
#line 4354 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 32147 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 460: /* $@55: %empty */
#line 4356 "/home/buildbot/git/sql/sql_yacc.yy"
{
// See "The FOR LOOP statement" comments in sql_lex.cc
Lex->sp_block_init(thd); // The outer DECLARE..BEGIN..END block
}
#line 32156 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 461: /* $@56: %empty */
#line 4361 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_push_loop_label(thd, &(yyvsp[-3].lex_str)))) // The inner WHILE block
MYSQL_YYABORT;
if (unlikely(Lex->sp_for_loop_condition_test(thd, (yyvsp[0].for_loop))))
MYSQL_YYABORT;
}
#line 32167 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 462: /* $@57: %empty */
#line 4368 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_for_loop_finalize(thd, (yyvsp[-2].for_loop))))
MYSQL_YYABORT;
}
#line 32176 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 463: /* sp_labeled_control: sp_control_label FOR_SYM $@55 sp_for_loop_index_and_bounds $@56 for_loop_statements $@57 pop_sp_loop_label */
#line 4373 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_for_loop_outer_block_finalize(thd, (yyvsp[-4].for_loop))))
MYSQL_YYABORT;
}
#line 32185 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 464: /* $@58: %empty */
#line 4378 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_push_loop_label(thd, &(yyvsp[-1].lex_str))))
MYSQL_YYABORT;
}
#line 32194 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 465: /* sp_labeled_control: sp_control_label REPEAT_SYM $@58 repeat_body pop_sp_loop_label */
#line 4383 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 32200 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 466: /* $@59: %empty */
#line 4388 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_push_loop_empty_label(thd)))
MYSQL_YYABORT;
}
#line 32209 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 467: /* sp_unlabeled_control: LOOP_SYM $@59 loop_body */
#line 4393 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sp_pop_loop_empty_label(thd);
}
#line 32217 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 468: /* $@60: %empty */
#line 4397 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_push_loop_empty_label(thd)))
MYSQL_YYABORT;
}
#line 32226 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 469: /* sp_unlabeled_control: WHILE_SYM $@60 while_body */
#line 4402 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sp_pop_loop_empty_label(thd);
}
#line 32234 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 470: /* $@61: %empty */
#line 4406 "/home/buildbot/git/sql/sql_yacc.yy"
{
// See "The FOR LOOP statement" comments in sql_lex.cc
if (unlikely(Lex->maybe_start_compound_statement(thd)))
MYSQL_YYABORT;
Lex->sp_block_init(thd); // The outer DECLARE..BEGIN..END block
}
#line 32245 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 471: /* $@62: %empty */
#line 4413 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_push_loop_empty_label(thd))) // The inner WHILE block
MYSQL_YYABORT;
if (unlikely(Lex->sp_for_loop_condition_test(thd, (yyvsp[0].for_loop))))
MYSQL_YYABORT;
}
#line 32256 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 472: /* sp_unlabeled_control: FOR_SYM $@61 sp_for_loop_index_and_bounds $@62 for_loop_statements */
#line 4420 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_for_loop_finalize(thd, (yyvsp[-2].for_loop))))
MYSQL_YYABORT;
Lex->sp_pop_loop_empty_label(thd); // The inner WHILE block
if (unlikely(Lex->sp_for_loop_outer_block_finalize(thd, (yyvsp[-2].for_loop))))
MYSQL_YYABORT;
}
#line 32268 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 473: /* $@63: %empty */
#line 4428 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_push_loop_empty_label(thd)))
MYSQL_YYABORT;
}
#line 32277 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 474: /* sp_unlabeled_control: REPEAT_SYM $@63 repeat_body */
#line 4433 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sp_pop_loop_empty_label(thd);
}
#line 32285 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 475: /* trg_action_time: BEFORE_SYM */
#line 4440 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->trg_chistics.action_time= TRG_ACTION_BEFORE; }
#line 32291 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 476: /* trg_action_time: AFTER_SYM */
#line 4442 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->trg_chistics.action_time= TRG_ACTION_AFTER; }
#line 32297 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 477: /* trg_event: INSERT */
#line 4447 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->trg_chistics.event= TRG_EVENT_INSERT; }
#line 32303 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 478: /* trg_event: UPDATE_SYM */
#line 4449 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->trg_chistics.event= TRG_EVENT_UPDATE; }
#line 32309 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 479: /* trg_event: DELETE_SYM */
#line 4451 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->trg_chistics.event= TRG_EVENT_DELETE; }
#line 32315 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 480: /* $@64: %empty */
#line 4456 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->create_info.option_list= NULL; }
#line 32321 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 481: /* create_body: create_field_list_parens $@64 opt_create_table_options opt_create_partitioning opt_create_select */
#line 4457 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32327 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 482: /* create_body: opt_create_table_options opt_create_partitioning opt_create_select */
#line 4458 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32333 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 483: /* create_body: create_like */
#line 4460 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.add(DDL_options_st::OPT_LIKE);
TABLE_LIST *src_table= Lex->first_select_lex()->
add_table_to_list(thd, (yyvsp[0].table), NULL, 0, TL_READ, MDL_SHARED_READ);
if (unlikely(! src_table))
MYSQL_YYABORT;
/* CREATE TABLE ... LIKE is not allowed for views. */
src_table->required_type= TABLE_TYPE_NORMAL;
}
#line 32348 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 484: /* create_like: LIKE table_ident */
#line 4473 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table)= (yyvsp[0].table); }
#line 32354 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 485: /* create_like: LEFT_PAREN_LIKE LIKE table_ident ')' */
#line 4474 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table)= (yyvsp[-1].table); }
#line 32360 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 486: /* opt_create_select: %empty */
#line 4478 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32366 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 487: /* opt_create_select: opt_duplicate opt_as create_select_query_expression opt_versioning_option */
#line 4481 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.add(DDL_options_st::OPT_CREATE_SELECT);
if (Lex->check_cte_dependencies_and_resolve_references())
MYSQL_YYABORT;
}
#line 32376 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 488: /* create_select_query_expression: query_expression */
#line 4490 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->parsed_insert_select((yyvsp[0].select_lex_unit)->first_select()))
MYSQL_YYABORT;
}
#line 32385 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 489: /* create_select_query_expression: LEFT_PAREN_WITH with_clause query_expression_no_with_clause ')' */
#line 4495 "/home/buildbot/git/sql/sql_yacc.yy"
{
SELECT_LEX *first_select= (yyvsp[-1].select_lex_unit)->first_select();
(yyvsp[-1].select_lex_unit)->set_with_clause((yyvsp[-2].with_clause));
(yyvsp[-2].with_clause)->attach_to(first_select);
if (Lex->parsed_insert_select(first_select))
MYSQL_YYABORT;
}
#line 32397 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 490: /* opt_create_partitioning: opt_partitioning */
#line 4506 "/home/buildbot/git/sql/sql_yacc.yy"
{
/*
Remove all tables used in PARTITION clause from the global table
list. Partitioning with subqueries is not allowed anyway.
*/
TABLE_LIST *last_non_sel_table= Lex->create_last_non_select_table;
last_non_sel_table->next_global= 0;
Lex->query_tables_last= &last_non_sel_table->next_global;
}
#line 32411 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 491: /* opt_partitioning: %empty */
#line 4542 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32417 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 493: /* $@65: %empty */
#line 4548 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->part_info= new (thd->mem_root) partition_info();
if (unlikely(!lex->part_info))
MYSQL_YYABORT;
if (lex->sql_command == SQLCOM_ALTER_TABLE)
{
lex->alter_info.partition_flags|= ALTER_PARTITION_INFO;
}
}
#line 32432 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 495: /* have_partitioning: %empty */
#line 4563 "/home/buildbot/git/sql/sql_yacc.yy"
{
#ifdef WITH_PARTITION_STORAGE_ENGINE
LEX_CSTRING partition_name={STRING_WITH_LEN("partition")};
if (unlikely(!plugin_is_ready(&partition_name, MYSQL_STORAGE_ENGINE_PLUGIN)))
my_yyabort_error((ER_OPTION_PREVENTS_STATEMENT, MYF(0),
"--skip-partition"));
#else
my_yyabort_error((ER_FEATURE_DISABLED, MYF(0), "partitioning",
"--with-plugin-partition"));
#endif
}
#line 32448 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 496: /* $@66: %empty */
#line 4578 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!Lex->part_info))
{
thd->parse_error(ER_PARTITION_ENTRY_ERROR);
MYSQL_YYABORT;
}
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.
*/
}
#line 32466 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 497: /* partition_entry: PARTITION_SYM $@66 partition */
#line 4592 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->pop_select(); //main select
}
#line 32474 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 498: /* $@67: %empty */
#line 4599 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->safe_to_cache_query= 1; }
#line 32480 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 500: /* part_type_def: opt_linear KEY_SYM opt_key_algo '(' part_field_list ')' */
#line 4605 "/home/buildbot/git/sql/sql_yacc.yy"
{
partition_info *part_info= Lex->part_info;
part_info->list_of_part_fields= TRUE;
part_info->column_list= FALSE;
part_info->part_type= HASH_PARTITION;
}
#line 32491 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 501: /* $@68: %empty */
#line 4612 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->part_type= HASH_PARTITION; }
#line 32497 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 502: /* part_type_def: opt_linear HASH_SYM $@68 part_func */
#line 4613 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32503 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 503: /* part_type_def: RANGE_SYM part_func */
#line 4615 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->part_type= RANGE_PARTITION; }
#line 32509 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 504: /* part_type_def: RANGE_SYM part_column_list */
#line 4617 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->part_type= RANGE_PARTITION; }
#line 32515 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 505: /* $@69: %empty */
#line 4619 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->parsing_place= IN_PART_FUNC;
}
#line 32523 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 506: /* part_type_def: LIST_SYM $@69 part_func */
#line 4623 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->part_info->part_type= LIST_PARTITION;
Select->parsing_place= NO_MATTER;
}
#line 32532 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 507: /* part_type_def: LIST_SYM part_column_list */
#line 4628 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->part_type= LIST_PARTITION; }
#line 32538 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 508: /* $@70: %empty */
#line 4630 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->part_info->vers_init_info(thd)))
MYSQL_YYABORT;
}
#line 32547 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 510: /* opt_linear: %empty */
#line 4638 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32553 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 511: /* opt_linear: LINEAR_SYM */
#line 4640 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->linear_hash_ind= TRUE;}
#line 32559 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 512: /* opt_key_algo: %empty */
#line 4645 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->key_algorithm= partition_info::KEY_ALGORITHM_NONE;}
#line 32565 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 513: /* opt_key_algo: ALGORITHM_SYM '=' real_ulong_num */
#line 4647 "/home/buildbot/git/sql/sql_yacc.yy"
{
switch ((yyvsp[0].ulong_num)) {
case 1:
Lex->part_info->key_algorithm= partition_info::KEY_ALGORITHM_51;
break;
case 2:
Lex->part_info->key_algorithm= partition_info::KEY_ALGORITHM_55;
break;
default:
thd->parse_error();
MYSQL_YYABORT;
}
}
#line 32583 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 514: /* part_field_list: %empty */
#line 4663 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32589 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 515: /* part_field_list: part_field_item_list */
#line 4664 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32595 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 516: /* part_field_item_list: part_field_item */
#line 4668 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32601 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 517: /* part_field_item_list: part_field_item_list ',' part_field_item */
#line 4669 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32607 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 518: /* part_field_item: ident */
#line 4674 "/home/buildbot/git/sql/sql_yacc.yy"
{
partition_info *part_info= Lex->part_info;
part_info->num_columns++;
if (unlikely(part_info->part_field_list.push_back((yyvsp[0].ident_sys).str,
thd->mem_root)))
MYSQL_YYABORT;
if (unlikely(part_info->num_columns > MAX_REF_PARTS))
my_yyabort_error((ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR, MYF(0),
"list of partition fields"));
}
#line 32622 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 519: /* part_column_list: COLUMNS '(' part_field_list ')' */
#line 4688 "/home/buildbot/git/sql/sql_yacc.yy"
{
partition_info *part_info= Lex->part_info;
part_info->column_list= TRUE;
part_info->list_of_part_fields= TRUE;
}
#line 32632 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 520: /* part_func: '(' part_func_expr ')' */
#line 4698 "/home/buildbot/git/sql/sql_yacc.yy"
{
partition_info *part_info= Lex->part_info;
if (unlikely(part_info->set_part_expr(thd, (yyvsp[-1].item), FALSE)))
MYSQL_YYABORT;
part_info->num_columns= 1;
part_info->column_list= FALSE;
}
#line 32644 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 521: /* sub_part_func: '(' part_func_expr ')' */
#line 4709 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->part_info->set_part_expr(thd, (yyvsp[-1].item), TRUE)))
MYSQL_YYABORT;
}
#line 32653 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 522: /* opt_num_parts: %empty */
#line 4717 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32659 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 523: /* opt_num_parts: PARTITIONS_SYM real_ulong_num */
#line 4719 "/home/buildbot/git/sql/sql_yacc.yy"
{
uint num_parts= (yyvsp[0].ulong_num);
partition_info *part_info= Lex->part_info;
if (unlikely(num_parts == 0))
my_yyabort_error((ER_NO_PARTS_ERROR, MYF(0), "partitions"));
part_info->num_parts= num_parts;
part_info->use_default_num_partitions= FALSE;
}
#line 32673 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 524: /* opt_sub_part: %empty */
#line 4731 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32679 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 525: /* $@71: %empty */
#line 4733 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->subpart_type= HASH_PARTITION; }
#line 32685 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 526: /* opt_sub_part: SUBPARTITION_SYM BY opt_linear HASH_SYM sub_part_func $@71 opt_num_subparts */
#line 4734 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32691 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 527: /* $@72: %empty */
#line 4737 "/home/buildbot/git/sql/sql_yacc.yy"
{
partition_info *part_info= Lex->part_info;
part_info->subpart_type= HASH_PARTITION;
part_info->list_of_subpart_fields= TRUE;
}
#line 32701 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 528: /* opt_sub_part: SUBPARTITION_SYM BY opt_linear KEY_SYM opt_key_algo '(' sub_part_field_list ')' $@72 opt_num_subparts */
#line 4742 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32707 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 529: /* sub_part_field_list: sub_part_field_item */
#line 4746 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32713 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 530: /* sub_part_field_list: sub_part_field_list ',' sub_part_field_item */
#line 4747 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32719 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 531: /* sub_part_field_item: ident */
#line 4752 "/home/buildbot/git/sql/sql_yacc.yy"
{
partition_info *part_info= Lex->part_info;
if (unlikely(part_info->subpart_field_list.push_back((yyvsp[0].ident_sys).str,
thd->mem_root)))
MYSQL_YYABORT;
if (unlikely(part_info->subpart_field_list.elements > MAX_REF_PARTS))
my_yyabort_error((ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR, MYF(0),
"list of subpartition fields"));
}
#line 32734 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 532: /* part_func_expr: bit_expr */
#line 4766 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!Lex->safe_to_cache_query))
{
thd->parse_error(ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR);
MYSQL_YYABORT;
}
(yyval.item)=(yyvsp[0].item);
}
#line 32747 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 533: /* opt_num_subparts: %empty */
#line 4777 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32753 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 534: /* opt_num_subparts: SUBPARTITIONS_SYM real_ulong_num */
#line 4779 "/home/buildbot/git/sql/sql_yacc.yy"
{
uint num_parts= (yyvsp[0].ulong_num);
LEX *lex= Lex;
if (unlikely(num_parts == 0))
my_yyabort_error((ER_NO_PARTS_ERROR, MYF(0), "subpartitions"));
lex->part_info->num_subparts= num_parts;
lex->part_info->use_default_num_subpartitions= FALSE;
}
#line 32766 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 535: /* part_defs: %empty */
#line 4791 "/home/buildbot/git/sql/sql_yacc.yy"
{
partition_info *part_info= Lex->part_info;
if (unlikely(part_info->part_type == RANGE_PARTITION))
my_yyabort_error((ER_PARTITIONS_MUST_BE_DEFINED_ERROR, MYF(0),
"RANGE"));
if (unlikely(part_info->part_type == LIST_PARTITION))
my_yyabort_error((ER_PARTITIONS_MUST_BE_DEFINED_ERROR, MYF(0),
"LIST"));
}
#line 32780 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 536: /* part_defs: '(' part_def_list ')' */
#line 4801 "/home/buildbot/git/sql/sql_yacc.yy"
{
partition_info *part_info= Lex->part_info;
uint count_curr_parts= part_info->partitions.elements;
if (part_info->num_parts != 0)
{
if (unlikely(part_info->num_parts !=
count_curr_parts))
{
thd->parse_error(ER_PARTITION_WRONG_NO_PART_ERROR);
MYSQL_YYABORT;
}
}
else if (count_curr_parts > 0)
{
part_info->num_parts= count_curr_parts;
}
part_info->count_curr_subparts= 0;
}
#line 32803 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 537: /* part_def_list: part_definition */
#line 4822 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32809 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 538: /* part_def_list: part_def_list ',' part_definition */
#line 4823 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32815 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 541: /* $@73: %empty */
#line 4833 "/home/buildbot/git/sql/sql_yacc.yy"
{
partition_info *part_info= Lex->part_info;
partition_element *p_elem= new (thd->mem_root) partition_element();
if (unlikely(!p_elem) ||
unlikely(part_info->partitions.push_back(p_elem, thd->mem_root)))
MYSQL_YYABORT;
p_elem->part_state= PART_NORMAL;
p_elem->id= part_info->partitions.elements - 1;
part_info->curr_part_elem= p_elem;
part_info->current_partition= p_elem;
part_info->use_default_partitions= FALSE;
part_info->use_default_num_partitions= FALSE;
}
#line 32835 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 542: /* part_definition: opt_partition $@73 part_name opt_part_values opt_part_options opt_sub_partition */
#line 4852 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32841 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 543: /* part_name: ident */
#line 4857 "/home/buildbot/git/sql/sql_yacc.yy"
{
partition_info *part_info= Lex->part_info;
partition_element *p_elem= part_info->curr_part_elem;
if (unlikely(check_ident_length(&(yyvsp[0].ident_sys))))
MYSQL_YYABORT;
p_elem->partition_name= (yyvsp[0].ident_sys).str;
}
#line 32853 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 544: /* opt_part_values: %empty */
#line 4868 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
partition_info *part_info= lex->part_info;
if (! lex->is_partition_management())
{
if (unlikely(part_info->error_if_requires_values()))
MYSQL_YYABORT;
if (unlikely(part_info->part_type == VERSIONING_PARTITION))
my_yyabort_error((ER_VERS_WRONG_PARTS, MYF(0),
lex->create_last_non_select_table->
table_name.str));
}
else
part_info->part_type= HASH_PARTITION;
}
#line 32873 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 545: /* $@74: %empty */
#line 4884 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
partition_info *part_info= lex->part_info;
if (! lex->is_partition_management())
{
if (unlikely(part_info->part_type != RANGE_PARTITION))
my_yyabort_error((ER_PARTITION_WRONG_VALUES_ERROR, MYF(0),
"RANGE", "LESS THAN"));
}
else
part_info->part_type= RANGE_PARTITION;
}
#line 32890 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 546: /* opt_part_values: VALUES_LESS_SYM THAN_SYM $@74 part_func_max */
#line 4896 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32896 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 547: /* $@75: %empty */
#line 4898 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
partition_info *part_info= lex->part_info;
if (! lex->is_partition_management())
{
if (unlikely(part_info->part_type != LIST_PARTITION))
my_yyabort_error((ER_PARTITION_WRONG_VALUES_ERROR, MYF(0),
"LIST", "IN"));
}
else
part_info->part_type= LIST_PARTITION;
}
#line 32913 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 548: /* opt_part_values: VALUES_IN_SYM $@75 part_values_in */
#line 4910 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32919 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 549: /* opt_part_values: CURRENT_SYM */
#line 4912 "/home/buildbot/git/sql/sql_yacc.yy"
{
#ifdef WITH_PARTITION_STORAGE_ENGINE
if (Lex->part_values_current(thd))
MYSQL_YYABORT;
#endif
}
#line 32930 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 550: /* opt_part_values: HISTORY_SYM */
#line 4919 "/home/buildbot/git/sql/sql_yacc.yy"
{
#ifdef WITH_PARTITION_STORAGE_ENGINE
if (Lex->part_values_history(thd))
MYSQL_YYABORT;
#endif
}
#line 32941 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 551: /* opt_part_values: DEFAULT */
#line 4926 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
partition_info *part_info= lex->part_info;
if (! lex->is_partition_management())
{
if (unlikely(part_info->part_type != LIST_PARTITION))
my_yyabort_error((ER_PARTITION_WRONG_VALUES_ERROR, MYF(0),
"LIST", "DEFAULT"));
}
else
part_info->part_type= LIST_PARTITION;
if (unlikely(part_info->init_column_part(thd)))
MYSQL_YYABORT;
if (unlikely(part_info->add_max_value(thd)))
MYSQL_YYABORT;
}
#line 32962 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 552: /* part_func_max: MAXVALUE_SYM */
#line 4946 "/home/buildbot/git/sql/sql_yacc.yy"
{
partition_info *part_info= Lex->part_info;
if (unlikely(part_info->num_columns &&
part_info->num_columns != 1U))
{
part_info->print_debug("Kilroy II", NULL);
thd->parse_error(ER_PARTITION_COLUMN_LIST_ERROR);
MYSQL_YYABORT;
}
else
part_info->num_columns= 1U;
if (unlikely(part_info->init_column_part(thd)))
MYSQL_YYABORT;
if (unlikely(part_info->add_max_value(thd)))
MYSQL_YYABORT;
}
#line 32984 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 553: /* part_func_max: part_value_item */
#line 4963 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32990 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 554: /* part_values_in: part_value_item */
#line 4968 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
partition_info *part_info= lex->part_info;
part_info->print_debug("part_values_in: part_value_item", NULL);
if (part_info->num_columns != 1U)
{
if (unlikely(!lex->is_partition_management() ||
part_info->num_columns == 0 ||
part_info->num_columns > MAX_REF_PARTS))
{
part_info->print_debug("Kilroy III", NULL);
thd->parse_error(ER_PARTITION_COLUMN_LIST_ERROR);
MYSQL_YYABORT;
}
/*
Reorganize the current large array into a list of small
arrays with one entry in each array. This can happen
in the first partition of an ALTER TABLE statement where
we ADD or REORGANIZE partitions. Also can only happen
for LIST partitions.
*/
if (unlikely(part_info->reorganize_into_single_field_col_val(thd)))
MYSQL_YYABORT;
}
}
#line 33021 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 555: /* part_values_in: '(' part_value_list ')' */
#line 4995 "/home/buildbot/git/sql/sql_yacc.yy"
{
partition_info *part_info= Lex->part_info;
if (unlikely(part_info->num_columns < 2U))
{
thd->parse_error(ER_ROW_SINGLE_PARTITION_FIELD_ERROR);
MYSQL_YYABORT;
}
}
#line 33034 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 556: /* part_value_list: part_value_item */
#line 5006 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33040 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 557: /* part_value_list: part_value_list ',' part_value_item */
#line 5007 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33046 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 558: /* $@76: %empty */
#line 5012 "/home/buildbot/git/sql/sql_yacc.yy"
{
partition_info *part_info= Lex->part_info;
part_info->print_debug("( part_value_item", NULL);
/* Initialisation code needed for each list of value expressions */
if (unlikely(!(part_info->part_type == LIST_PARTITION &&
part_info->num_columns == 1U) &&
part_info->init_column_part(thd)))
MYSQL_YYABORT;
}
#line 33060 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 559: /* $@77: %empty */
#line 5021 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33066 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 560: /* part_value_item: '(' $@76 part_value_item_list $@77 ')' */
#line 5023 "/home/buildbot/git/sql/sql_yacc.yy"
{
partition_info *part_info= Lex->part_info;
part_info->print_debug(") part_value_item", NULL);
if (part_info->num_columns == 0)
part_info->num_columns= part_info->curr_list_object;
if (unlikely(part_info->num_columns != part_info->curr_list_object))
{
/*
All value items lists must be of equal length, in some cases
which is covered by the above if-statement we don't know yet
how many columns is in the partition so the assignment above
ensures that we only report errors when we know we have an
error.
*/
part_info->print_debug("Kilroy I", NULL);
thd->parse_error(ER_PARTITION_COLUMN_LIST_ERROR);
MYSQL_YYABORT;
}
part_info->curr_list_object= 0;
}
#line 33091 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 561: /* part_value_item_list: part_value_expr_item */
#line 5046 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33097 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 562: /* part_value_item_list: part_value_item_list ',' part_value_expr_item */
#line 5047 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33103 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 563: /* part_value_expr_item: MAXVALUE_SYM */
#line 5052 "/home/buildbot/git/sql/sql_yacc.yy"
{
partition_info *part_info= Lex->part_info;
if (unlikely(part_info->part_type == LIST_PARTITION))
{
thd->parse_error(ER_MAXVALUE_IN_VALUES_IN);
MYSQL_YYABORT;
}
if (unlikely(part_info->add_max_value(thd)))
MYSQL_YYABORT;
}
#line 33118 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 564: /* part_value_expr_item: bit_expr */
#line 5063 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
partition_info *part_info= lex->part_info;
Item *part_expr= (yyvsp[0].item);
if (unlikely(!lex->safe_to_cache_query))
{
thd->parse_error(ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR);
MYSQL_YYABORT;
}
if (unlikely(part_info->add_column_list_value(thd, part_expr)))
MYSQL_YYABORT;
}
#line 33136 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 565: /* opt_sub_partition: %empty */
#line 5081 "/home/buildbot/git/sql/sql_yacc.yy"
{
partition_info *part_info= Lex->part_info;
if (unlikely(part_info->num_subparts != 0 &&
!part_info->use_default_subpartitions))
{
/*
We come here when we have defined subpartitions on the first
partition but not on all the subsequent partitions.
*/
thd->parse_error(ER_PARTITION_WRONG_NO_SUBPART_ERROR);
MYSQL_YYABORT;
}
}
#line 33154 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 566: /* opt_sub_partition: '(' sub_part_list ')' */
#line 5095 "/home/buildbot/git/sql/sql_yacc.yy"
{
partition_info *part_info= Lex->part_info;
if (part_info->num_subparts != 0)
{
if (unlikely(part_info->num_subparts !=
part_info->count_curr_subparts))
{
thd->parse_error(ER_PARTITION_WRONG_NO_SUBPART_ERROR);
MYSQL_YYABORT;
}
}
else if (part_info->count_curr_subparts > 0)
{
if (unlikely(part_info->partitions.elements > 1))
{
thd->parse_error(ER_PARTITION_WRONG_NO_SUBPART_ERROR);
MYSQL_YYABORT;
}
part_info->num_subparts= part_info->count_curr_subparts;
}
part_info->count_curr_subparts= 0;
}
#line 33181 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 567: /* sub_part_list: sub_part_definition */
#line 5120 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33187 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 568: /* sub_part_list: sub_part_list ',' sub_part_definition */
#line 5121 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33193 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 569: /* $@78: %empty */
#line 5126 "/home/buildbot/git/sql/sql_yacc.yy"
{
partition_info *part_info= Lex->part_info;
partition_element *curr_part= part_info->current_partition;
partition_element *sub_p_elem= new (thd->mem_root)
partition_element(curr_part);
if (unlikely(part_info->use_default_subpartitions &&
part_info->partitions.elements >= 2))
{
/*
create table t1 (a int)
partition by list (a) subpartition by hash (a)
(partition p0 values in (1),
partition p1 values in (2) subpartition sp11);
causes use to arrive since we are on the second
partition, but still use_default_subpartitions
is set. When we come here we're processing at least
the second partition (the current partition processed
have already been put into the partitions list.
*/
thd->parse_error(ER_PARTITION_WRONG_NO_SUBPART_ERROR);
MYSQL_YYABORT;
}
if (unlikely(!sub_p_elem) ||
unlikely(curr_part->subpartitions.push_back(sub_p_elem, thd->mem_root)))
MYSQL_YYABORT;
sub_p_elem->id= curr_part->subpartitions.elements - 1;
part_info->curr_part_elem= sub_p_elem;
part_info->use_default_subpartitions= FALSE;
part_info->use_default_num_subpartitions= FALSE;
part_info->count_curr_subparts++;
}
#line 33230 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 570: /* sub_part_definition: SUBPARTITION_SYM $@78 sub_name opt_subpart_options */
#line 5158 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33236 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 571: /* sub_name: ident_or_text */
#line 5163 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(check_ident_length(&(yyvsp[0].lex_str))))
MYSQL_YYABORT;
Lex->part_info->curr_part_elem->partition_name= (yyvsp[0].lex_str).str;
}
#line 33246 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 572: /* opt_part_options: %empty */
#line 5171 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33252 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 573: /* opt_part_options: part_option_list */
#line 5172 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33258 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 574: /* part_option_list: part_option_list part_option */
#line 5176 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33264 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 575: /* part_option_list: part_option */
#line 5177 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33270 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 576: /* part_option: server_part_option */
#line 5181 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33276 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 577: /* part_option: engine_defined_option */
#line 5183 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[0].engine_option_value_ptr)->link(&Lex->part_info->curr_part_elem->option_list,
&Lex->option_list_last);
}
#line 33285 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 578: /* opt_subpart_options: %empty */
#line 5190 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33291 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 579: /* opt_subpart_options: subpart_option_list */
#line 5191 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33297 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 580: /* subpart_option_list: subpart_option_list server_part_option */
#line 5195 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33303 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 581: /* subpart_option_list: server_part_option */
#line 5196 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33309 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 582: /* server_part_option: TABLESPACE opt_equal ident_or_text */
#line 5201 "/home/buildbot/git/sql/sql_yacc.yy"
{ /* Compatibility with MySQL */ }
#line 33315 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 583: /* server_part_option: opt_storage ENGINE_SYM opt_equal storage_engines */
#line 5203 "/home/buildbot/git/sql/sql_yacc.yy"
{
partition_info *part_info= Lex->part_info;
part_info->curr_part_elem->engine_type= (yyvsp[0].db_type);
part_info->default_engine_type= (yyvsp[0].db_type);
}
#line 33325 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 584: /* server_part_option: CONNECTION_SYM opt_equal TEXT_STRING_sys */
#line 5209 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->part_info->curr_part_elem->connect_string.str= (yyvsp[0].lex_str).str;
lex->part_info->curr_part_elem->connect_string.length= (yyvsp[0].lex_str).length;
}
#line 33335 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 585: /* server_part_option: NODEGROUP_SYM opt_equal real_ulong_num */
#line 5215 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->curr_part_elem->nodegroup_id= (uint16) (yyvsp[0].ulong_num); }
#line 33341 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 586: /* server_part_option: MAX_ROWS opt_equal real_ulonglong_num */
#line 5217 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->curr_part_elem->part_max_rows= (ha_rows) (yyvsp[0].ulonglong_number); }
#line 33347 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 587: /* server_part_option: MIN_ROWS opt_equal real_ulonglong_num */
#line 5219 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->curr_part_elem->part_min_rows= (ha_rows) (yyvsp[0].ulonglong_number); }
#line 33353 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 588: /* server_part_option: DATA_SYM DIRECTORY_SYM opt_equal TEXT_STRING_sys */
#line 5221 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->curr_part_elem->data_file_name= (yyvsp[0].lex_str).str; }
#line 33359 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 589: /* server_part_option: INDEX_SYM DIRECTORY_SYM opt_equal TEXT_STRING_sys */
#line 5223 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->curr_part_elem->index_file_name= (yyvsp[0].lex_str).str; }
#line 33365 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 590: /* server_part_option: COMMENT_SYM opt_equal TEXT_STRING_sys */
#line 5225 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->curr_part_elem->part_comment= (yyvsp[0].lex_str).str; }
#line 33371 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 591: /* opt_versioning_rotation: %empty */
#line 5229 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33377 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 592: /* $@79: %empty */
#line 5230 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->clause_that_disallows_subselect= "INTERVAL"; }
#line 33383 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 593: /* opt_versioning_rotation: $@79 INTERVAL_SYM expr interval opt_versioning_interval_start opt_vers_auto_part */
#line 5232 "/home/buildbot/git/sql/sql_yacc.yy"
{
partition_info *part_info= Lex->part_info;
const char *table_name= Lex->create_last_non_select_table->table_name.str;
if (unlikely(part_info->vers_set_interval(thd, (yyvsp[-3].item), (yyvsp[-2].interval), (yyvsp[-1].item), (yyvsp[0].num),
table_name)))
MYSQL_YYABORT;
}
#line 33395 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 594: /* opt_versioning_rotation: LIMIT ulonglong_num opt_vers_auto_part */
#line 5240 "/home/buildbot/git/sql/sql_yacc.yy"
{
partition_info *part_info= Lex->part_info;
const char *table_name= Lex->create_last_non_select_table->table_name.str;
if (unlikely(part_info->vers_set_limit((yyvsp[-1].ulonglong_number), (yyvsp[0].num), table_name)))
MYSQL_YYABORT;
}
#line 33406 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 595: /* opt_versioning_interval_start: %empty */
#line 5251 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= NULL;
}
#line 33414 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 596: /* opt_versioning_interval_start: STARTS_SYM literal */
#line 5255 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= (yyvsp[0].item);
}
#line 33422 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 597: /* opt_vers_auto_part: %empty */
#line 5262 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= 0;
}
#line 33430 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 598: /* opt_vers_auto_part: AUTO_SYM */
#line 5266 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= 1;
}
#line 33438 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 599: /* opt_as: %empty */
#line 5275 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33444 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 600: /* opt_as: AS */
#line 5276 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33450 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 601: /* opt_create_database_options: %empty */
#line 5280 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33456 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 602: /* opt_create_database_options: create_database_options */
#line 5281 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33462 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 603: /* create_database_options: create_database_option */
#line 5285 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33468 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 604: /* create_database_options: create_database_options create_database_option */
#line 5286 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33474 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 605: /* create_database_option: default_collation */
#line 5290 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33480 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 606: /* create_database_option: default_charset */
#line 5291 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33486 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 607: /* create_database_option: COMMENT_SYM opt_equal TEXT_STRING_sys */
#line 5293 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.schema_comment= thd->make_clex_string((yyvsp[0].lex_str));
Lex->create_info.used_fields|= HA_CREATE_USED_COMMENT;
}
#line 33495 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 608: /* opt_if_not_exists_table_element: %empty */
#line 5301 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->check_exists= FALSE;
}
#line 33503 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 609: /* opt_if_not_exists_table_element: IF_SYM not EXISTS */
#line 5305 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->check_exists= TRUE;
}
#line 33511 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 610: /* opt_if_not_exists: %empty */
#line 5312 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.object_ddl_options).init();
}
#line 33519 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 611: /* opt_if_not_exists: IF_SYM not EXISTS */
#line 5316 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.object_ddl_options).set(DDL_options_st::OPT_IF_NOT_EXISTS);
}
#line 33527 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 612: /* create_or_replace: CREATE */
#line 5323 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.object_ddl_options).init();
}
#line 33535 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 613: /* create_or_replace: CREATE OR_SYM REPLACE */
#line 5327 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.object_ddl_options).set(DDL_options_st::OPT_OR_REPLACE);
}
#line 33543 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 621: /* create_table_option: ENGINE_SYM opt_equal ident_or_text */
#line 5350 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (!lex->m_sql_cmd)
{
DBUG_ASSERT(lex->sql_command == SQLCOM_ALTER_TABLE);
if (!(lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_alter_table()))
MYSQL_YYABORT;
}
Storage_engine_name *opt=
lex->m_sql_cmd->option_storage_engine_name();
DBUG_ASSERT(opt); // Expect a proper Sql_cmd
*opt= Storage_engine_name((yyvsp[0].lex_str));
lex->create_info.used_fields|= HA_CREATE_USED_ENGINE;
}
#line 33562 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 622: /* create_table_option: MAX_ROWS opt_equal ulonglong_num */
#line 5365 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.max_rows= (yyvsp[0].ulonglong_number);
Lex->create_info.used_fields|= HA_CREATE_USED_MAX_ROWS;
}
#line 33571 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 623: /* create_table_option: MIN_ROWS opt_equal ulonglong_num */
#line 5370 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.min_rows= (yyvsp[0].ulonglong_number);
Lex->create_info.used_fields|= HA_CREATE_USED_MIN_ROWS;
}
#line 33580 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 624: /* create_table_option: AVG_ROW_LENGTH opt_equal ulong_num */
#line 5375 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.avg_row_length=(yyvsp[0].ulong_num);
Lex->create_info.used_fields|= HA_CREATE_USED_AVG_ROW_LENGTH;
}
#line 33589 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 625: /* create_table_option: PASSWORD_SYM opt_equal TEXT_STRING_sys */
#line 5380 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.password=(yyvsp[0].lex_str).str;
Lex->create_info.used_fields|= HA_CREATE_USED_PASSWORD;
}
#line 33598 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 626: /* create_table_option: COMMENT_SYM opt_equal TEXT_STRING_sys */
#line 5385 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.comment=(yyvsp[0].lex_str);
Lex->create_info.used_fields|= HA_CREATE_USED_COMMENT;
}
#line 33607 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 627: /* create_table_option: AUTO_INC opt_equal ulonglong_num */
#line 5390 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.auto_increment_value=(yyvsp[0].ulonglong_number);
Lex->create_info.used_fields|= HA_CREATE_USED_AUTO;
}
#line 33616 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 628: /* create_table_option: PACK_KEYS_SYM opt_equal ulong_num */
#line 5395 "/home/buildbot/git/sql/sql_yacc.yy"
{
switch((yyvsp[0].ulong_num)) {
case 0:
Lex->create_info.table_options|= HA_OPTION_NO_PACK_KEYS;
break;
case 1:
Lex->create_info.table_options|= HA_OPTION_PACK_KEYS;
break;
default:
thd->parse_error();
MYSQL_YYABORT;
}
Lex->create_info.used_fields|= HA_CREATE_USED_PACK_KEYS;
}
#line 33635 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 629: /* create_table_option: PACK_KEYS_SYM opt_equal DEFAULT */
#line 5410 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.table_options&=
~(HA_OPTION_PACK_KEYS | HA_OPTION_NO_PACK_KEYS);
Lex->create_info.used_fields|= HA_CREATE_USED_PACK_KEYS;
}
#line 33645 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 630: /* create_table_option: STATS_AUTO_RECALC_SYM opt_equal ulong_num */
#line 5416 "/home/buildbot/git/sql/sql_yacc.yy"
{
switch((yyvsp[0].ulong_num)) {
case 0:
Lex->create_info.stats_auto_recalc= HA_STATS_AUTO_RECALC_OFF;
break;
case 1:
Lex->create_info.stats_auto_recalc= HA_STATS_AUTO_RECALC_ON;
break;
default:
thd->parse_error();
MYSQL_YYABORT;
}
Lex->create_info.used_fields|= HA_CREATE_USED_STATS_AUTO_RECALC;
}
#line 33664 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 631: /* create_table_option: STATS_AUTO_RECALC_SYM opt_equal DEFAULT */
#line 5431 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.stats_auto_recalc= HA_STATS_AUTO_RECALC_DEFAULT;
Lex->create_info.used_fields|= HA_CREATE_USED_STATS_AUTO_RECALC;
}
#line 33673 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 632: /* create_table_option: STATS_PERSISTENT_SYM opt_equal ulong_num */
#line 5436 "/home/buildbot/git/sql/sql_yacc.yy"
{
switch((yyvsp[0].ulong_num)) {
case 0:
Lex->create_info.table_options|= HA_OPTION_NO_STATS_PERSISTENT;
break;
case 1:
Lex->create_info.table_options|= HA_OPTION_STATS_PERSISTENT;
break;
default:
thd->parse_error();
MYSQL_YYABORT;
}
Lex->create_info.used_fields|= HA_CREATE_USED_STATS_PERSISTENT;
}
#line 33692 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 633: /* create_table_option: STATS_PERSISTENT_SYM opt_equal DEFAULT */
#line 5451 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.table_options&=
~(HA_OPTION_STATS_PERSISTENT | HA_OPTION_NO_STATS_PERSISTENT);
Lex->create_info.used_fields|= HA_CREATE_USED_STATS_PERSISTENT;
}
#line 33702 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 634: /* create_table_option: STATS_SAMPLE_PAGES_SYM opt_equal ulong_num */
#line 5457 "/home/buildbot/git/sql/sql_yacc.yy"
{
/* From user point of view STATS_SAMPLE_PAGES can be specified as
STATS_SAMPLE_PAGES=N (where 0 0xffff))
{
thd->parse_error();
MYSQL_YYABORT;
}
Lex->create_info.stats_sample_pages=(yyvsp[0].ulong_num);
Lex->create_info.used_fields|= HA_CREATE_USED_STATS_SAMPLE_PAGES;
}
#line 33724 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 635: /* create_table_option: STATS_SAMPLE_PAGES_SYM opt_equal DEFAULT */
#line 5475 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.stats_sample_pages=0;
Lex->create_info.used_fields|= HA_CREATE_USED_STATS_SAMPLE_PAGES;
}
#line 33733 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 636: /* create_table_option: CHECKSUM_SYM opt_equal ulong_num */
#line 5480 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.table_options|= (yyvsp[0].ulong_num) ? HA_OPTION_CHECKSUM : HA_OPTION_NO_CHECKSUM;
Lex->create_info.used_fields|= HA_CREATE_USED_CHECKSUM;
}
#line 33742 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 637: /* create_table_option: TABLE_CHECKSUM_SYM opt_equal ulong_num */
#line 5485 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.table_options|= (yyvsp[0].ulong_num) ? HA_OPTION_CHECKSUM : HA_OPTION_NO_CHECKSUM;
Lex->create_info.used_fields|= HA_CREATE_USED_CHECKSUM;
}
#line 33751 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 638: /* create_table_option: PAGE_CHECKSUM_SYM opt_equal choice */
#line 5490 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.used_fields|= HA_CREATE_USED_PAGE_CHECKSUM;
Lex->create_info.page_checksum= (yyvsp[0].choice);
}
#line 33760 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 639: /* create_table_option: DELAY_KEY_WRITE_SYM opt_equal ulong_num */
#line 5495 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.table_options|= (yyvsp[0].ulong_num) ? HA_OPTION_DELAY_KEY_WRITE : HA_OPTION_NO_DELAY_KEY_WRITE;
Lex->create_info.used_fields|= HA_CREATE_USED_DELAY_KEY_WRITE;
}
#line 33769 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 640: /* create_table_option: ROW_FORMAT_SYM opt_equal row_types */
#line 5500 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.row_type= (yyvsp[0].row_type);
Lex->create_info.used_fields|= HA_CREATE_USED_ROW_FORMAT;
}
#line 33778 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 641: /* $@80: %empty */
#line 5505 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->first_select_lex()->table_list.save_and_clear(&Lex->save_list);
}
#line 33786 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 642: /* create_table_option: UNION_SYM opt_equal $@80 '(' opt_table_list ')' */
#line 5509 "/home/buildbot/git/sql/sql_yacc.yy"
{
/*
Move the union list to the merge_list and exclude its tables
from the global list.
*/
LEX *lex=Lex;
lex->create_info.merge_list= lex->first_select_lex()->table_list.first;
lex->first_select_lex()->table_list= lex->save_list;
/*
When excluding union list from the global list we assume that
elements of the former immediately follow elements which represent
table being created/altered and parent tables.
*/
TABLE_LIST *last_non_sel_table= lex->create_last_non_select_table;
DBUG_ASSERT(last_non_sel_table->next_global ==
lex->create_info.merge_list);
last_non_sel_table->next_global= 0;
Lex->query_tables_last= &last_non_sel_table->next_global;
lex->create_info.used_fields|= HA_CREATE_USED_UNION;
}
#line 33812 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 645: /* create_table_option: INSERT_METHOD opt_equal merge_insert_types */
#line 5533 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.merge_insert_method= (yyvsp[0].ulong_num);
Lex->create_info.used_fields|= HA_CREATE_USED_INSERT_METHOD;
}
#line 33821 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 646: /* create_table_option: DATA_SYM DIRECTORY_SYM opt_equal TEXT_STRING_sys */
#line 5538 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.data_file_name= (yyvsp[0].lex_str).str;
Lex->create_info.used_fields|= HA_CREATE_USED_DATADIR;
}
#line 33830 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 647: /* create_table_option: INDEX_SYM DIRECTORY_SYM opt_equal TEXT_STRING_sys */
#line 5543 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.index_file_name= (yyvsp[0].lex_str).str;
Lex->create_info.used_fields|= HA_CREATE_USED_INDEXDIR;
}
#line 33839 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 648: /* create_table_option: TABLESPACE ident */
#line 5548 "/home/buildbot/git/sql/sql_yacc.yy"
{ /* Compatiblity with MySQL */ }
#line 33845 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 649: /* create_table_option: STORAGE_SYM DISK_SYM */
#line 5550 "/home/buildbot/git/sql/sql_yacc.yy"
{Lex->create_info.storage_media= HA_SM_DISK;}
#line 33851 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 650: /* create_table_option: STORAGE_SYM MEMORY_SYM */
#line 5552 "/home/buildbot/git/sql/sql_yacc.yy"
{Lex->create_info.storage_media= HA_SM_MEMORY;}
#line 33857 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 651: /* create_table_option: CONNECTION_SYM opt_equal TEXT_STRING_sys */
#line 5554 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.connect_string.str= (yyvsp[0].lex_str).str;
Lex->create_info.connect_string.length= (yyvsp[0].lex_str).length;
Lex->create_info.used_fields|= HA_CREATE_USED_CONNECTION;
}
#line 33867 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 652: /* create_table_option: KEY_BLOCK_SIZE opt_equal ulong_num */
#line 5560 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.used_fields|= HA_CREATE_USED_KEY_BLOCK_SIZE;
Lex->create_info.key_block_size= (yyvsp[0].ulong_num);
}
#line 33876 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 653: /* create_table_option: TRANSACTIONAL_SYM opt_equal choice */
#line 5565 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.used_fields|= HA_CREATE_USED_TRANSACTIONAL;
Lex->create_info.transactional= (yyvsp[0].choice);
}
#line 33885 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 654: /* create_table_option: engine_defined_option */
#line 5570 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[0].engine_option_value_ptr)->link(&Lex->create_info.option_list, &Lex->option_list_last);
}
#line 33893 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 655: /* create_table_option: SEQUENCE_SYM opt_equal choice */
#line 5574 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.used_fields|= HA_CREATE_USED_SEQUENCE;
Lex->create_info.sequence= ((yyvsp[0].choice) == HA_CHOICE_YES);
}
#line 33902 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 657: /* engine_defined_option: IDENT_sys equal TEXT_STRING_sys */
#line 5583 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyvsp[0].lex_str).length > ENGINE_OPTION_MAX_LENGTH))
my_yyabort_error((ER_VALUE_TOO_LONG, MYF(0), (yyvsp[-2].ident_sys).str));
(yyval.engine_option_value_ptr)= new (thd->mem_root) engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].lex_str), true);
MYSQL_YYABORT_UNLESS((yyval.engine_option_value_ptr));
}
#line 33913 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 658: /* engine_defined_option: IDENT_sys equal ident */
#line 5590 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyvsp[0].ident_sys).length > ENGINE_OPTION_MAX_LENGTH))
my_yyabort_error((ER_VALUE_TOO_LONG, MYF(0), (yyvsp[-2].ident_sys).str));
(yyval.engine_option_value_ptr)= new (thd->mem_root) engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].ident_sys), false);
MYSQL_YYABORT_UNLESS((yyval.engine_option_value_ptr));
}
#line 33924 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 659: /* engine_defined_option: IDENT_sys equal real_ulonglong_num */
#line 5597 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.engine_option_value_ptr)= new (thd->mem_root) engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].ulonglong_number), thd->mem_root);
MYSQL_YYABORT_UNLESS((yyval.engine_option_value_ptr));
}
#line 33933 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 660: /* engine_defined_option: IDENT_sys equal DEFAULT */
#line 5602 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.engine_option_value_ptr)= new (thd->mem_root) engine_option_value((yyvsp[-2].ident_sys));
MYSQL_YYABORT_UNLESS((yyval.engine_option_value_ptr));
}
#line 33942 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 663: /* versioning_option: WITH_SYSTEM_SYM VERSIONING_SYM */
#line 5615 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->create_info.options & HA_LEX_CREATE_TMP_TABLE))
{
if (!DBUG_IF("sysvers_force"))
{
my_error(ER_VERS_NOT_SUPPORTED, MYF(0), "CREATE TEMPORARY TABLE");
MYSQL_YYABORT;
}
}
else
{
Lex->alter_info.flags|= ALTER_ADD_SYSTEM_VERSIONING;
Lex->create_info.options|= HA_VERSIONED_TABLE;
}
}
#line 33962 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 664: /* default_charset: opt_default charset opt_equal charset_name_or_default */
#line 5634 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->create_info.add_table_option_default_charset((yyvsp[0].charset))))
MYSQL_YYABORT;
}
#line 33971 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 665: /* default_collation: opt_default COLLATE_SYM opt_equal collation_name_or_default */
#line 5642 "/home/buildbot/git/sql/sql_yacc.yy"
{
Table_specification_st *cinfo= &Lex->create_info;
if (unlikely(cinfo->add_table_option_default_collation((yyvsp[0].Lex_extended_collation))))
MYSQL_YYABORT;
}
#line 33981 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 666: /* storage_engines: ident_or_text */
#line 5651 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Storage_engine_name((yyvsp[0].lex_str)).
resolve_storage_engine_with_error(thd, &(yyval.db_type),
thd->lex->create_info.tmp_table()))
MYSQL_YYABORT;
}
#line 33992 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 667: /* known_storage_engines: ident_or_text */
#line 5661 "/home/buildbot/git/sql/sql_yacc.yy"
{
plugin_ref plugin;
if (likely((plugin= ha_resolve_by_name(thd, &(yyvsp[0].lex_str), false))))
(yyval.db_type)= plugin_hton(plugin);
else
my_yyabort_error((ER_UNKNOWN_STORAGE_ENGINE, MYF(0), (yyvsp[0].lex_str).str));
}
#line 34004 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 668: /* row_types: DEFAULT */
#line 5671 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.row_type)= ROW_TYPE_DEFAULT; }
#line 34010 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 669: /* row_types: FIXED_SYM */
#line 5672 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.row_type)= ROW_TYPE_FIXED; }
#line 34016 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 670: /* row_types: DYNAMIC_SYM */
#line 5673 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.row_type)= ROW_TYPE_DYNAMIC; }
#line 34022 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 671: /* row_types: COMPRESSED_SYM */
#line 5674 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.row_type)= ROW_TYPE_COMPRESSED; }
#line 34028 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 672: /* row_types: REDUNDANT_SYM */
#line 5675 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.row_type)= ROW_TYPE_REDUNDANT; }
#line 34034 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 673: /* row_types: COMPACT_SYM */
#line 5676 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.row_type)= ROW_TYPE_COMPACT; }
#line 34040 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 674: /* row_types: PAGE_SYM */
#line 5677 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.row_type)= ROW_TYPE_PAGE; }
#line 34046 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 675: /* merge_insert_types: NO_SYM */
#line 5681 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= MERGE_INSERT_DISABLED; }
#line 34052 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 676: /* merge_insert_types: FIRST_SYM */
#line 5682 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= MERGE_INSERT_TO_FIRST; }
#line 34058 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 677: /* merge_insert_types: LAST_SYM */
#line 5683 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= MERGE_INSERT_TO_LAST; }
#line 34064 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 678: /* udf_type: STRING_SYM */
#line 5687 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.num) = (int) STRING_RESULT; }
#line 34070 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 679: /* udf_type: REAL */
#line 5688 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.num) = (int) REAL_RESULT; }
#line 34076 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 680: /* udf_type: DECIMAL_SYM */
#line 5689 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.num) = (int) DECIMAL_RESULT; }
#line 34082 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 681: /* udf_type: INT_SYM */
#line 5690 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.num) = (int) INT_RESULT; }
#line 34088 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 682: /* create_field_list: field_list */
#line 5696 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_last_non_select_table= Lex->last_table();
}
#line 34096 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 683: /* create_field_list_parens: LEFT_PAREN_ALT field_list ')' */
#line 5703 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_last_non_select_table= Lex->last_table();
}
#line 34104 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 686: /* field_list_item: column_def */
#line 5714 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 34110 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 690: /* field_list_item: PERIOD_SYM period_for_application_time */
#line 5718 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 34116 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 691: /* column_def: field_spec */
#line 5723 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.create_field)= (yyvsp[0].create_field); }
#line 34122 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 692: /* column_def: field_spec opt_constraint references */
#line 5725 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->add_column_foreign_key(&((yyvsp[-2].create_field)->field_name), &(yyvsp[-1].lex_str),
(yyvsp[0].table), DDL_options())))
MYSQL_YYABORT;
(yyval.create_field)= (yyvsp[-2].create_field);
}
#line 34133 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 693: /* $@81: %empty */
#line 5735 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->option_list= NULL;
if (unlikely(Lex->add_key(Key::MULTIPLE, &(yyvsp[-1].lex_str), (yyvsp[0].key_alg), (yyvsp[-2].object_ddl_options))))
MYSQL_YYABORT;
}
#line 34143 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 694: /* key_def: key_or_index opt_if_not_exists opt_ident opt_USING_key_algorithm $@81 '(' key_list ')' normal_key_options */
#line 5740 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 34149 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 695: /* $@82: %empty */
#line 5742 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->option_list= NULL;
if (unlikely(Lex->add_key(Key::MULTIPLE, &(yyvsp[-2].ident_sys), (yyvsp[0].key_alg), (yyvsp[-3].object_ddl_options))))
MYSQL_YYABORT;
}
#line 34159 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 696: /* key_def: key_or_index opt_if_not_exists ident TYPE_SYM btree_or_rtree $@82 '(' key_list ')' normal_key_options */
#line 5747 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 34165 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 697: /* $@83: %empty */
#line 5749 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->option_list= NULL;
if (unlikely(Lex->add_key((yyvsp[-3].key_type), &(yyvsp[0].lex_str), HA_KEY_ALG_UNDEF, (yyvsp[-1].object_ddl_options))))
MYSQL_YYABORT;
}
#line 34175 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 698: /* key_def: fulltext opt_key_or_index opt_if_not_exists opt_ident $@83 '(' key_list ')' fulltext_key_options */
#line 5754 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 34181 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 699: /* $@84: %empty */
#line 5756 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->option_list= NULL;
if (unlikely(Lex->add_key((yyvsp[-3].key_type), &(yyvsp[0].lex_str), HA_KEY_ALG_UNDEF, (yyvsp[-1].object_ddl_options))))
MYSQL_YYABORT;
}
#line 34191 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 700: /* key_def: spatial opt_key_or_index opt_if_not_exists opt_ident $@84 '(' key_list ')' spatial_key_options */
#line 5761 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 34197 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 701: /* $@85: %empty */
#line 5765 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->option_list= NULL;
if (unlikely(Lex->add_key((yyvsp[-3].key_type), (yyvsp[-1].lex_str).str ? &(yyvsp[-1].lex_str) : &(yyvsp[-4].lex_str), (yyvsp[0].key_alg), (yyvsp[-2].object_ddl_options))))
MYSQL_YYABORT;
}
#line 34207 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 702: /* key_def: opt_constraint constraint_key_type opt_if_not_exists opt_ident opt_USING_key_algorithm $@85 '(' key_list opt_without_overlaps ')' normal_key_options */
#line 5770 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 34213 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 703: /* $@86: %empty */
#line 5773 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->option_list= NULL;
if (unlikely(Lex->add_key((yyvsp[-4].key_type), (yyvsp[-2].ident_sys).str ? &(yyvsp[-2].ident_sys) : &(yyvsp[-5].lex_str), (yyvsp[0].key_alg), (yyvsp[-3].object_ddl_options))))
MYSQL_YYABORT;
}
#line 34223 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 704: /* key_def: opt_constraint constraint_key_type opt_if_not_exists ident TYPE_SYM btree_or_rtree $@86 '(' key_list opt_without_overlaps ')' normal_key_options */
#line 5778 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 34229 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 705: /* $@87: %empty */
#line 5780 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->check_add_key((yyvsp[-1].object_ddl_options))) ||
unlikely(!(Lex->last_key= (new (thd->mem_root)
Key(Key::MULTIPLE,
(yyvsp[-4].lex_str).str ? &(yyvsp[-4].lex_str) : &(yyvsp[0].lex_str),
HA_KEY_ALG_UNDEF, true, (yyvsp[-1].object_ddl_options))))))
MYSQL_YYABORT;
Lex->option_list= NULL;
}
#line 34243 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 706: /* key_def: opt_constraint FOREIGN KEY_SYM opt_if_not_exists opt_ident $@87 '(' key_list ')' references */
#line 5790 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->add_table_foreign_key((yyvsp[-5].lex_str).str ? &(yyvsp[-5].lex_str) : &(yyvsp[-9].lex_str),
(yyvsp[-9].lex_str).str ? &(yyvsp[-9].lex_str) : &(yyvsp[-5].lex_str), (yyvsp[0].table), (yyvsp[-6].object_ddl_options))))
MYSQL_YYABORT;
}
#line 34253 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 707: /* constraint_def: opt_constraint check_constraint */
#line 5799 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->add_constraint((yyvsp[-1].lex_str), (yyvsp[0].virtual_column), FALSE);
}
#line 34261 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 708: /* period_for_system_time: PERIOD_SYM FOR_SYSTEM_TIME_SYM '(' ident ',' ident ')' */
#line 5807 "/home/buildbot/git/sql/sql_yacc.yy"
{
Vers_parse_info &info= Lex->vers_get_info();
info.set_period((yyvsp[-3].ident_sys), (yyvsp[-1].ident_sys));
}
#line 34270 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 709: /* period_for_application_time: FOR_SYM ident '(' ident ',' ident ')' */
#line 5815 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->add_period((yyvsp[-5].ident_sys), (yyvsp[-3].ident_sys), (yyvsp[-1].ident_sys)))
MYSQL_YYABORT;
}
#line 34279 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 710: /* opt_check_constraint: %empty */
#line 5822 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.virtual_column)= (Virtual_column_info*) 0; }
#line 34285 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 711: /* opt_check_constraint: check_constraint */
#line 5823 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.virtual_column)= (yyvsp[0].virtual_column);}
#line 34291 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 712: /* check_constraint: CHECK_SYM '(' expr ')' */
#line 5828 "/home/buildbot/git/sql/sql_yacc.yy"
{
Virtual_column_info *v= add_virtual_expression(thd, (yyvsp[-1].item));
if (unlikely(!v))
MYSQL_YYABORT;
(yyval.virtual_column)= v;
}
#line 34302 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 713: /* opt_constraint_no_id: %empty */
#line 5837 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34308 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 714: /* opt_constraint_no_id: CONSTRAINT */
#line 5838 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34314 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 715: /* opt_constraint: %empty */
#line 5842 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= null_clex_str; }
#line 34320 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 716: /* opt_constraint: constraint */
#line 5843 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= (yyvsp[0].lex_str); }
#line 34326 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 717: /* constraint: CONSTRAINT opt_ident */
#line 5847 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].lex_str); }
#line 34332 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 718: /* @88: %empty */
#line 5852 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
Create_field *f= new (thd->mem_root) Create_field();
if (unlikely(check_string_char_length(&(yyvsp[0].lex_str), 0, NAME_CHAR_LEN,
system_charset_info, 1)))
my_yyabort_error((ER_TOO_LONG_IDENT, MYF(0), (yyvsp[0].lex_str).str));
if (unlikely(!f))
MYSQL_YYABORT;
lex->init_last_field(f, &(yyvsp[0].lex_str));
(yyval.create_field)= f;
lex->parsing_options.lookup_keywords_after_qualifier= true;
}
#line 34352 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 719: /* field_spec: field_ident @88 field_type_or_serial opt_check_constraint */
#line 5868 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->parsing_options.lookup_keywords_after_qualifier= false;
(yyval.create_field)= (yyvsp[-2].create_field);
(yyval.create_field)->check_constraint= (yyvsp[0].virtual_column);
if (unlikely((yyval.create_field)->check(thd)))
MYSQL_YYABORT;
lex->alter_info.create_list.push_back((yyval.create_field), thd->mem_root);
(yyval.create_field)->create_if_not_exists= Lex->check_exists;
if ((yyval.create_field)->flags & PRI_KEY_FLAG)
lex->add_key_to_list(&(yyvsp[-3].lex_str), Key::PRIMARY, lex->check_exists);
else if ((yyval.create_field)->flags & UNIQUE_KEY_FLAG)
lex->add_key_to_list(&(yyvsp[-3].lex_str), Key::UNIQUE, lex->check_exists);
}
#line 34375 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 720: /* $@89: %empty */
#line 5890 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->set_attributes(thd, (yyvsp[0].Lex_field_type),
COLUMN_DEFINITION_TABLE_FIELD);
}
#line 34384 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 721: /* field_type_or_serial: qualified_field_type $@89 field_def */
#line 5895 "/home/buildbot/git/sql/sql_yacc.yy"
{
auto tmp= (yyvsp[-2].Lex_field_type).charset_collation_attrs();
if (tmp.merge_column_charset_clause_and_collate_clause((yyvsp[0].Lex_exact_charset_extended_collation_attrs)))
MYSQL_YYABORT;
Lex->last_field->set_charset_collation_attrs(tmp);
}
#line 34395 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 722: /* $@90: %empty */
#line 5902 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->set_handler(&type_handler_ulonglong);
Lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG
| UNSIGNED_FLAG | UNIQUE_KEY_FLAG;
Lex->alter_info.flags|= ALTER_ADD_INDEX;
}
#line 34406 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 724: /* opt_serial_attribute: %empty */
#line 5912 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34412 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 725: /* opt_serial_attribute: opt_serial_attribute_list */
#line 5913 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34418 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 726: /* opt_serial_attribute_list: opt_serial_attribute_list serial_attribute */
#line 5917 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34424 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 728: /* opt_asrow_attribute: %empty */
#line 5922 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34430 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 729: /* opt_asrow_attribute: opt_asrow_attribute_list */
#line 5923 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34436 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 730: /* opt_asrow_attribute_list: opt_asrow_attribute_list asrow_attribute */
#line 5927 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34442 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 732: /* field_def: %empty */
#line 5932 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_exact_charset_extended_collation_attrs).init(); }
#line 34448 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 734: /* field_def: attribute_list compressed_deprecated_column_attribute */
#line 5934 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_exact_charset_extended_collation_attrs)= (yyvsp[-1].Lex_exact_charset_extended_collation_attrs); }
#line 34454 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 735: /* field_def: attribute_list compressed_deprecated_column_attribute attribute_list */
#line 5936 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (((yyval.Lex_exact_charset_extended_collation_attrs)= (yyvsp[-2].Lex_exact_charset_extended_collation_attrs)).merge_column_collate_clause_and_collate_clause((yyvsp[0].Lex_exact_charset_extended_collation_attrs)))
MYSQL_YYABORT;
}
#line 34463 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 736: /* $@91: %empty */
#line 5941 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->vcol_info= (yyvsp[0].virtual_column);
}
#line 34471 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 737: /* field_def: opt_generated_always AS virtual_column_func $@91 vcol_opt_specifier vcol_opt_attribute */
#line 5945 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_exact_charset_extended_collation_attrs).init();
}
#line 34479 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 738: /* field_def: opt_generated_always AS ROW_SYM START_SYM opt_asrow_attribute */
#line 5949 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->last_field_generated_always_as_row_start())
MYSQL_YYABORT;
(yyval.Lex_exact_charset_extended_collation_attrs).init();
}
#line 34489 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 739: /* field_def: opt_generated_always AS ROW_SYM END opt_asrow_attribute */
#line 5955 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->last_field_generated_always_as_row_end())
MYSQL_YYABORT;
(yyval.Lex_exact_charset_extended_collation_attrs).init();
}
#line 34499 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 740: /* opt_generated_always: %empty */
#line 5963 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34505 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 741: /* opt_generated_always: GENERATED_SYM ALWAYS_SYM */
#line 5964 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34511 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 742: /* vcol_opt_specifier: %empty */
#line 5969 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->vcol_info->set_stored_in_db_flag(FALSE);
}
#line 34519 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 743: /* vcol_opt_specifier: VIRTUAL_SYM */
#line 5973 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->vcol_info->set_stored_in_db_flag(FALSE);
}
#line 34527 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 744: /* vcol_opt_specifier: PERSISTENT_SYM */
#line 5977 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->vcol_info->set_stored_in_db_flag(TRUE);
}
#line 34535 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 745: /* vcol_opt_specifier: STORED_SYM */
#line 5981 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->vcol_info->set_stored_in_db_flag(TRUE);
}
#line 34543 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 746: /* vcol_opt_attribute: %empty */
#line 5987 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34549 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 747: /* vcol_opt_attribute: vcol_opt_attribute_list */
#line 5988 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34555 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 748: /* vcol_opt_attribute_list: vcol_opt_attribute_list vcol_attribute */
#line 5992 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34561 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 750: /* vcol_attribute: UNIQUE_SYM */
#line 5998 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->last_field->flags|= UNIQUE_KEY_FLAG;
lex->alter_info.flags|= ALTER_ADD_INDEX;
}
#line 34571 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 751: /* vcol_attribute: UNIQUE_SYM KEY_SYM */
#line 6004 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->last_field->flags|= UNIQUE_KEY_FLAG;
lex->alter_info.flags|= ALTER_ADD_INDEX;
}
#line 34581 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 752: /* vcol_attribute: COMMENT_SYM TEXT_STRING_sys */
#line 6009 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_field->comment= (yyvsp[0].lex_str); }
#line 34587 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 753: /* vcol_attribute: INVISIBLE_SYM */
#line 6011 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->invisible= INVISIBLE_USER;
}
#line 34595 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 754: /* $@92: %empty */
#line 6018 "/home/buildbot/git/sql/sql_yacc.yy"
{
/*
"PARSE_VCOL_EXPR" can only be used by the SQL server
when reading a '*.frm' file.
Prevent the end user from invoking this command.
*/
MYSQL_YYABORT_UNLESS(Lex->parse_vcol_expr);
if (Lex->main_select_push())
MYSQL_YYABORT;
}
#line 34610 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 755: /* parse_vcol_expr: PARSE_VCOL_EXPR_SYM $@92 expr */
#line 6029 "/home/buildbot/git/sql/sql_yacc.yy"
{
Virtual_column_info *v= add_virtual_expression(thd, (yyvsp[0].item));
if (unlikely(!v))
MYSQL_YYABORT;
Lex->last_field->vcol_info= v;
Lex->pop_select(); //main select
}
#line 34622 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 757: /* parenthesized_expr: expr ',' expr_list */
#line 6041 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[0].item_list)->push_front((yyvsp[-2].item), thd->mem_root);
(yyval.item)= new (thd->mem_root) Item_row(thd, *(yyvsp[0].item_list));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 34633 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 758: /* virtual_column_func: '(' parenthesized_expr ')' */
#line 6051 "/home/buildbot/git/sql/sql_yacc.yy"
{
Virtual_column_info *v=
add_virtual_expression(thd, (yyvsp[-1].item));
if (unlikely(!v))
MYSQL_YYABORT;
(yyval.virtual_column)= v;
}
#line 34645 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 759: /* virtual_column_func: subquery */
#line 6059 "/home/buildbot/git/sql/sql_yacc.yy"
{
Item *item;
if (!(item= new (thd->mem_root) Item_singlerow_subselect(thd, (yyvsp[0].select_lex))))
MYSQL_YYABORT;
Virtual_column_info *v= add_virtual_expression(thd, item);
if (unlikely(!v))
MYSQL_YYABORT;
(yyval.virtual_column)= v;
}
#line 34659 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 763: /* column_default_expr: expr_or_literal */
#line 6075 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.virtual_column)= add_virtual_expression(thd, (yyvsp[0].item)))))
MYSQL_YYABORT;
}
#line 34668 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 764: /* field_type: field_type_all */
#line 6082 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->map_data_type(Lex_ident_sys(), &((yyval.Lex_field_type)= (yyvsp[0].Lex_field_type)));
}
#line 34676 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 765: /* qualified_field_type: field_type_all */
#line 6089 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->map_data_type(Lex_ident_sys(), &((yyval.Lex_field_type)= (yyvsp[0].Lex_field_type)));
}
#line 34684 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 766: /* qualified_field_type: sp_decl_ident '.' field_type_all */
#line 6093 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->map_data_type((yyvsp[-2].ident_sys), &((yyval.Lex_field_type)= (yyvsp[0].Lex_field_type))))
MYSQL_YYABORT;
}
#line 34693 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 767: /* udt_name: IDENT_sys */
#line 6100 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= (yyvsp[0].ident_sys); }
#line 34699 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 768: /* udt_name: reserved_keyword_udt */
#line 6101 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= (yyvsp[0].kwd); }
#line 34705 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 769: /* udt_name: non_reserved_keyword_udt */
#line 6102 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= (yyvsp[0].kwd); }
#line 34711 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 775: /* field_type_all: udt_name float_options srid_option */
#line 6112 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->set_field_type_udt(&(yyval.Lex_field_type), (yyvsp[-2].lex_str), (yyvsp[-1].Lex_length_and_dec)))
MYSQL_YYABORT;
}
#line 34720 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 776: /* field_type_numeric: int_type opt_field_length last_field_options */
#line 6120 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set_handler_length_flags((yyvsp[-2].type_handler), (yyvsp[-1].Lex_length_and_dec), (uint32) (yyvsp[0].ulong_num));
}
#line 34728 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 777: /* field_type_numeric: real_type opt_precision last_field_options */
#line 6123 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set((yyvsp[-2].type_handler), (yyvsp[-1].Lex_length_and_dec)); }
#line 34734 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 778: /* field_type_numeric: FLOAT_SYM float_options last_field_options */
#line 6125 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_float, (yyvsp[-1].Lex_length_and_dec));
if ((yyvsp[-1].Lex_length_and_dec).has_explicit_length() && !(yyvsp[-1].Lex_length_and_dec).has_explicit_dec())
{
if (unlikely((yyvsp[-1].Lex_length_and_dec).length() > PRECISION_FOR_DOUBLE))
my_yyabort_error((ER_WRONG_FIELD_SPEC, MYF(0),
Lex->last_field->field_name.str));
if ((yyvsp[-1].Lex_length_and_dec).length() > PRECISION_FOR_FLOAT)
(yyval.Lex_field_type).set(&type_handler_double);
else
(yyval.Lex_field_type).set(&type_handler_float);
}
}
#line 34752 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 779: /* field_type_numeric: BIT_SYM opt_field_length */
#line 6139 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_bit, (yyvsp[0].Lex_length_and_dec));
}
#line 34760 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 780: /* field_type_numeric: BOOL_SYM */
#line 6143 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set_handler_length(&type_handler_stiny, 1);
}
#line 34768 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 781: /* field_type_numeric: BOOLEAN_SYM */
#line 6147 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set_handler_length(&type_handler_stiny, 1);
}
#line 34776 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 782: /* field_type_numeric: DECIMAL_SYM float_options last_field_options */
#line 6151 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_newdecimal, (yyvsp[-1].Lex_length_and_dec));}
#line 34782 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 783: /* field_type_numeric: NUMBER_ORACLE_SYM float_options last_field_options */
#line 6153 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyvsp[-1].Lex_length_and_dec).has_explicit_length())
(yyval.Lex_field_type).set(&type_handler_newdecimal, (yyvsp[-1].Lex_length_and_dec));
else
(yyval.Lex_field_type).set(&type_handler_double);
}
#line 34793 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 784: /* field_type_numeric: NUMERIC_SYM float_options last_field_options */
#line 6160 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_newdecimal, (yyvsp[-1].Lex_length_and_dec));}
#line 34799 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 785: /* field_type_numeric: FIXED_SYM float_options last_field_options */
#line 6162 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_newdecimal, (yyvsp[-1].Lex_length_and_dec));}
#line 34805 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 786: /* opt_binary_and_compression: %empty */
#line 6167 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_exact_charset_extended_collation_attrs).init(); }
#line 34811 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 787: /* opt_binary_and_compression: binary */
#line 6168 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_exact_charset_extended_collation_attrs)= (yyvsp[0].Lex_exact_charset_extended_collation_attrs); }
#line 34817 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 788: /* opt_binary_and_compression: binary compressed_deprecated_data_type_attribute */
#line 6169 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_exact_charset_extended_collation_attrs)= (yyvsp[-1].Lex_exact_charset_extended_collation_attrs); }
#line 34823 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 789: /* opt_binary_and_compression: compressed opt_binary */
#line 6170 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_exact_charset_extended_collation_attrs)= (yyvsp[0].Lex_exact_charset_extended_collation_attrs); }
#line 34829 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 790: /* field_type_string: char opt_field_length opt_binary */
#line 6175 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_string, (yyvsp[-1].Lex_length_and_dec), (yyvsp[0].Lex_exact_charset_extended_collation_attrs));
}
#line 34837 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 791: /* field_type_string: nchar opt_field_length opt_bin_mod */
#line 6179 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_string, (yyvsp[-1].Lex_length_and_dec),
Lex_exact_charset_extended_collation_attrs::national((yyvsp[0].num)));
}
#line 34846 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 792: /* field_type_string: BINARY opt_field_length */
#line 6184 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_string, (yyvsp[0].Lex_length_and_dec), &my_charset_bin);
}
#line 34854 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 793: /* field_type_string: varchar opt_field_length opt_binary_and_compression */
#line 6188 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].Lex_length_and_dec), (yyvsp[0].Lex_exact_charset_extended_collation_attrs));
}
#line 34862 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 794: /* field_type_string: VARCHAR2_ORACLE_SYM opt_field_length opt_binary_and_compression */
#line 6192 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].Lex_length_and_dec), (yyvsp[0].Lex_exact_charset_extended_collation_attrs));
}
#line 34870 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 795: /* field_type_string: nvarchar opt_field_length opt_compressed opt_bin_mod */
#line 6196 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-2].Lex_length_and_dec),
Lex_exact_charset_extended_collation_attrs::national((yyvsp[0].num)));
}
#line 34879 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 796: /* field_type_string: VARBINARY opt_field_length opt_compressed */
#line 6201 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].Lex_length_and_dec), &my_charset_bin);
}
#line 34887 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 797: /* field_type_string: RAW_ORACLE_SYM opt_field_length opt_compressed */
#line 6205 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].Lex_length_and_dec), &my_charset_bin);
}
#line 34895 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 798: /* field_type_temporal: YEAR_SYM opt_field_length last_field_options */
#line 6212 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyvsp[-1].Lex_length_and_dec).has_explicit_length())
{
if ((yyvsp[-1].Lex_length_and_dec).length() != 4)
{
char buff[sizeof("YEAR()") + MY_INT64_NUM_DECIMAL_DIGITS + 1];
my_snprintf(buff, sizeof(buff), "YEAR(%u)", (uint) (yyvsp[-1].Lex_length_and_dec).length());
push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
ER_WARN_DEPRECATED_SYNTAX,
ER_THD(thd, ER_WARN_DEPRECATED_SYNTAX),
buff, "YEAR(4)");
}
}
(yyval.Lex_field_type).set(&type_handler_year, (yyvsp[-1].Lex_length_and_dec));
}
#line 34915 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 799: /* field_type_temporal: DATE_SYM */
#line 6227 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_newdate); }
#line 34921 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 800: /* field_type_temporal: TIME_SYM opt_field_length */
#line 6229 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(opt_mysql56_temporal_format ?
static_cast(&type_handler_time2) :
static_cast(&type_handler_time),
(yyvsp[0].Lex_length_and_dec));
}
#line 34932 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 801: /* field_type_temporal: TIMESTAMP opt_field_length */
#line 6236 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(opt_mysql56_temporal_format ?
static_cast(&type_handler_timestamp2):
static_cast(&type_handler_timestamp),
(yyvsp[0].Lex_length_and_dec));
}
#line 34943 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 802: /* field_type_temporal: DATETIME opt_field_length */
#line 6243 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(thd->type_handler_for_datetime(), (yyvsp[0].Lex_length_and_dec));
}
#line 34951 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 803: /* field_type_lob: TINYBLOB opt_compressed */
#line 6251 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_tiny_blob, &my_charset_bin);
}
#line 34959 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 804: /* field_type_lob: BLOB_MARIADB_SYM opt_field_length opt_compressed */
#line 6255 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_blob, (yyvsp[-1].Lex_length_and_dec), &my_charset_bin);
}
#line 34967 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 805: /* field_type_lob: BLOB_ORACLE_SYM field_length opt_compressed */
#line 6259 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_blob, (yyvsp[-1].Lex_length_and_dec), &my_charset_bin);
}
#line 34975 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 806: /* field_type_lob: BLOB_ORACLE_SYM opt_compressed */
#line 6263 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_long_blob, &my_charset_bin);
}
#line 34983 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 807: /* field_type_lob: MEDIUMBLOB opt_compressed */
#line 6267 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_medium_blob, &my_charset_bin);
}
#line 34991 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 808: /* field_type_lob: LONGBLOB opt_compressed */
#line 6271 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_long_blob, &my_charset_bin);
}
#line 34999 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 809: /* field_type_lob: LONG_SYM VARBINARY opt_compressed */
#line 6275 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_medium_blob, &my_charset_bin);
}
#line 35007 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 810: /* field_type_lob: LONG_SYM varchar opt_binary_and_compression */
#line 6279 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_medium_blob, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
#line 35013 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 811: /* field_type_lob: TINYTEXT opt_binary_and_compression */
#line 6281 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_tiny_blob, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
#line 35019 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 812: /* field_type_lob: TEXT_SYM opt_field_length opt_binary_and_compression */
#line 6283 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_blob, (yyvsp[-1].Lex_length_and_dec), (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
#line 35025 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 813: /* field_type_lob: MEDIUMTEXT opt_binary_and_compression */
#line 6285 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_medium_blob, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
#line 35031 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 814: /* field_type_lob: LONGTEXT opt_binary_and_compression */
#line 6287 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_long_blob, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
#line 35037 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 815: /* field_type_lob: CLOB_ORACLE_SYM opt_binary_and_compression */
#line 6289 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_long_blob, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
#line 35043 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 816: /* field_type_lob: LONG_SYM opt_binary_and_compression */
#line 6291 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_medium_blob, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
#line 35049 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 817: /* field_type_lob: JSON_SYM opt_compressed */
#line 6293 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_long_blob_json, &my_charset_utf8mb4_bin);
}
#line 35057 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 818: /* field_type_misc: ENUM '(' string_list ')' opt_binary */
#line 6300 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_enum, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
#line 35063 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 819: /* field_type_misc: SET '(' string_list ')' opt_binary */
#line 6302 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_set, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
#line 35069 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 820: /* char: CHAR_SYM */
#line 6306 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35075 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 821: /* nchar: NCHAR_SYM */
#line 6310 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35081 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 822: /* nchar: NATIONAL_SYM CHAR_SYM */
#line 6311 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35087 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 823: /* varchar: char VARYING */
#line 6315 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35093 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 824: /* varchar: VARCHAR */
#line 6316 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35099 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 825: /* nvarchar: NATIONAL_SYM VARCHAR */
#line 6320 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35105 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 826: /* nvarchar: NVARCHAR_SYM */
#line 6321 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35111 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 827: /* nvarchar: NCHAR_SYM VARCHAR */
#line 6322 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35117 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 828: /* nvarchar: NATIONAL_SYM CHAR_SYM VARYING */
#line 6323 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35123 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 829: /* nvarchar: NCHAR_SYM VARYING */
#line 6324 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35129 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 830: /* int_type: INT_SYM */
#line 6328 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.type_handler)= &type_handler_slong; }
#line 35135 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 831: /* int_type: TINYINT */
#line 6329 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.type_handler)= &type_handler_stiny; }
#line 35141 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 832: /* int_type: SMALLINT */
#line 6330 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.type_handler)= &type_handler_sshort; }
#line 35147 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 833: /* int_type: MEDIUMINT */
#line 6331 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.type_handler)= &type_handler_sint24; }
#line 35153 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 834: /* int_type: BIGINT */
#line 6332 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.type_handler)= &type_handler_slonglong; }
#line 35159 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 835: /* real_type: REAL */
#line 6337 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.type_handler)= thd->variables.sql_mode & MODE_REAL_AS_FLOAT ?
static_cast(&type_handler_float) :
static_cast(&type_handler_double);
}
#line 35169 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 836: /* real_type: DOUBLE_SYM */
#line 6342 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.type_handler)= &type_handler_double; }
#line 35175 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 837: /* real_type: DOUBLE_SYM PRECISION */
#line 6343 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.type_handler)= &type_handler_double; }
#line 35181 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 838: /* srid_option: %empty */
#line 6348 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_field->srid= 0; }
#line 35187 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 839: /* srid_option: REF_SYSTEM_ID_SYM '=' NUM */
#line 6351 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->srid=atoi((yyvsp[0].lex_str).str);
}
#line 35195 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 840: /* float_options: %empty */
#line 6357 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_length_and_dec).reset(); }
#line 35201 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 843: /* precision: '(' NUM ',' NUM ')' */
#line 6363 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_length_and_dec).set((yyvsp[-3].lex_str).str, (yyvsp[-1].lex_str).str); }
#line 35207 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 844: /* field_options: %empty */
#line 6367 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 0; }
#line 35213 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 845: /* field_options: SIGNED_SYM */
#line 6368 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 0; }
#line 35219 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 846: /* field_options: UNSIGNED */
#line 6369 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= UNSIGNED_FLAG; }
#line 35225 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 847: /* field_options: ZEROFILL */
#line 6370 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= UNSIGNED_FLAG | ZEROFILL_FLAG; }
#line 35231 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 848: /* field_options: UNSIGNED ZEROFILL */
#line 6371 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= UNSIGNED_FLAG | ZEROFILL_FLAG; }
#line 35237 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 849: /* field_options: ZEROFILL UNSIGNED */
#line 6372 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= UNSIGNED_FLAG | ZEROFILL_FLAG; }
#line 35243 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 850: /* last_field_options: field_options */
#line 6376 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_field->flags|= ((yyval.ulong_num)= (yyvsp[0].ulong_num)); }
#line 35249 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 851: /* field_length_str: '(' LONG_NUM ')' */
#line 6380 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.const_simple_string)= (yyvsp[-1].lex_str).str; }
#line 35255 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 852: /* field_length_str: '(' ULONGLONG_NUM ')' */
#line 6381 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.const_simple_string)= (yyvsp[-1].lex_str).str; }
#line 35261 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 853: /* field_length_str: '(' DECIMAL_NUM ')' */
#line 6382 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.const_simple_string)= (yyvsp[-1].lex_str).str; }
#line 35267 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 854: /* field_length_str: '(' NUM ')' */
#line 6383 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.const_simple_string)= (yyvsp[-1].lex_str).str; }
#line 35273 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 855: /* field_length: field_length_str */
#line 6386 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_length_and_dec).set((yyvsp[0].const_simple_string), NULL); }
#line 35279 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 856: /* field_scale: field_length_str */
#line 6390 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_length_and_dec).set(NULL, (yyvsp[0].const_simple_string)); }
#line 35285 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 857: /* opt_field_length: %empty */
#line 6395 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_length_and_dec).reset(); /* use default length */ }
#line 35291 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 859: /* opt_field_scale: %empty */
#line 6400 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_length_and_dec).reset(); }
#line 35297 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 861: /* opt_precision: %empty */
#line 6405 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_length_and_dec).reset(); }
#line 35303 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 862: /* opt_precision: precision */
#line 6406 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_length_and_dec)= (yyvsp[0].Lex_length_and_dec); }
#line 35309 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 863: /* attribute_list: attribute_list attribute */
#line 6412 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (((yyval.Lex_exact_charset_extended_collation_attrs)= (yyvsp[-1].Lex_exact_charset_extended_collation_attrs)).merge_column_collate_clause_and_collate_clause((yyvsp[0].Lex_exact_charset_extended_collation_attrs)))
MYSQL_YYABORT;
}
#line 35318 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 865: /* attribute: NULL_SYM */
#line 6421 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->flags&= ~NOT_NULL_FLAG;
Lex->last_field->explicitly_nullable= true;
(yyval.Lex_exact_charset_extended_collation_attrs).init();
}
#line 35328 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 866: /* attribute: DEFAULT column_default_expr */
#line 6427 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->default_value= (yyvsp[0].virtual_column);
(yyval.Lex_exact_charset_extended_collation_attrs).init();
}
#line 35337 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 867: /* attribute: ON UPDATE_SYM NOW_SYM opt_default_time_precision */
#line 6432 "/home/buildbot/git/sql/sql_yacc.yy"
{
Item *item= new (thd->mem_root) Item_func_now_local(thd, (yyvsp[0].num));
if (unlikely(item == NULL))
MYSQL_YYABORT;
Lex->last_field->on_update= item;
(yyval.Lex_exact_charset_extended_collation_attrs).init();
}
#line 35349 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 868: /* attribute: AUTO_INC */
#line 6439 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG; (yyval.Lex_exact_charset_extended_collation_attrs).init(); }
#line 35355 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 869: /* attribute: SERIAL_SYM DEFAULT VALUE_SYM */
#line 6441 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNIQUE_KEY_FLAG;
lex->alter_info.flags|= ALTER_ADD_INDEX;
(yyval.Lex_exact_charset_extended_collation_attrs).init();
}
#line 35366 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 870: /* attribute: COLLATE_SYM collation_name */
#line 6448 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_exact_charset_extended_collation_attrs)= Lex_exact_charset_extended_collation_attrs((yyvsp[0].Lex_extended_collation));
}
#line 35374 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 871: /* attribute: serial_attribute */
#line 6451 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_exact_charset_extended_collation_attrs).init(); }
#line 35380 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 872: /* opt_compression_method: %empty */
#line 6455 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.const_simple_string)= NULL; }
#line 35386 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 873: /* opt_compression_method: equal ident */
#line 6456 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.const_simple_string)= (yyvsp[0].ident_sys).str; }
#line 35392 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 874: /* opt_compressed: %empty */
#line 6460 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35398 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 875: /* opt_compressed: compressed */
#line 6461 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 35404 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 876: /* opt_enable: %empty */
#line 6465 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35410 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 877: /* opt_enable: ENABLE_SYM */
#line 6466 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 35416 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 878: /* compressed: COMPRESSED_SYM opt_compression_method */
#line 6471 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->last_field->set_compressed((yyvsp[0].const_simple_string))))
MYSQL_YYABORT;
}
#line 35425 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 879: /* compressed_deprecated_data_type_attribute: COMPRESSED_SYM opt_compression_method */
#line 6479 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->last_field->set_compressed_deprecated(thd, (yyvsp[0].const_simple_string))))
MYSQL_YYABORT;
}
#line 35434 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 880: /* compressed_deprecated_column_attribute: COMPRESSED_SYM opt_compression_method */
#line 6487 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->last_field->
set_compressed_deprecated_column_attribute(thd, (yyvsp[-1].kwd).pos(), (yyvsp[0].const_simple_string))))
MYSQL_YYABORT;
}
#line 35444 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 881: /* asrow_attribute: not NULL_SYM opt_enable */
#line 6496 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->flags|= NOT_NULL_FLAG;
}
#line 35452 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 882: /* asrow_attribute: opt_primary KEY_SYM */
#line 6500 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->last_field->flags|= PRI_KEY_FLAG | NOT_NULL_FLAG;
lex->alter_info.flags|= ALTER_ADD_INDEX;
}
#line 35462 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 885: /* serial_attribute: engine_defined_option */
#line 6511 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[0].engine_option_value_ptr)->link(&Lex->last_field->option_list, &Lex->option_list_last);
}
#line 35470 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 886: /* serial_attribute: with_or_without_system VERSIONING_SYM */
#line 6515 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->versioning= (yyvsp[-1].vers_column_versioning);
Lex->create_info.options|= HA_VERSIONED_TABLE;
if (Lex->alter_info.flags & ALTER_DROP_SYSTEM_VERSIONING)
{
my_yyabort_error((ER_VERS_NOT_VERSIONED, MYF(0),
Lex->create_last_non_select_table->table_name.str));
}
}
#line 35484 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 887: /* with_or_without_system: WITH_SYSTEM_SYM */
#line 6528 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.flags|= ALTER_COLUMN_UNVERSIONED;
Lex->create_info.vers_info.versioned_fields= true;
(yyval.vers_column_versioning)= Column_definition::WITH_VERSIONING;
}
#line 35494 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 888: /* with_or_without_system: WITHOUT SYSTEM */
#line 6534 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.flags|= ALTER_COLUMN_UNVERSIONED;
Lex->create_info.vers_info.unversioned_fields= true;
(yyval.vers_column_versioning)= Column_definition::WITHOUT_VERSIONING;
}
#line 35504 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 889: /* charset: CHAR_SYM SET */
#line 6543 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.kwd)= (yyvsp[-1].kwd); }
#line 35510 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 890: /* charset: CHARSET */
#line 6544 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.kwd)= (yyvsp[0].kwd); }
#line 35516 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 891: /* charset_name: ident_or_text */
#line 6549 "/home/buildbot/git/sql/sql_yacc.yy"
{
myf utf8_flag= thd->get_utf8_flag();
if (unlikely(!((yyval.charset)=get_charset_by_csname((yyvsp[0].lex_str).str, MY_CS_PRIMARY,
MYF(utf8_flag)))))
my_yyabort_error((ER_UNKNOWN_CHARACTER_SET, MYF(0), (yyvsp[0].lex_str).str));
}
#line 35527 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 892: /* charset_name: BINARY */
#line 6555 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)= &my_charset_bin; }
#line 35533 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 893: /* charset_name_or_default: charset_name */
#line 6559 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)=(yyvsp[0].charset); }
#line 35539 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 894: /* charset_name_or_default: DEFAULT */
#line 6560 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)=NULL; }
#line 35545 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 895: /* opt_load_data_charset: %empty */
#line 6564 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)= NULL; }
#line 35551 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 896: /* opt_load_data_charset: charset charset_name_or_default */
#line 6565 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)= (yyvsp[0].charset); }
#line 35557 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 897: /* old_or_new_charset_name: ident_or_text */
#line 6570 "/home/buildbot/git/sql/sql_yacc.yy"
{
myf utf8_flag= thd->get_utf8_flag();
if (unlikely(!((yyval.charset)=get_charset_by_csname((yyvsp[0].lex_str).str,
MY_CS_PRIMARY,
MYF(utf8_flag))) &&
!((yyval.charset)=get_old_charset_by_name((yyvsp[0].lex_str).str))))
my_yyabort_error((ER_UNKNOWN_CHARACTER_SET, MYF(0), (yyvsp[0].lex_str).str));
}
#line 35570 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 898: /* old_or_new_charset_name: BINARY */
#line 6578 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)= &my_charset_bin; }
#line 35576 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 899: /* old_or_new_charset_name_or_default: old_or_new_charset_name */
#line 6582 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)=(yyvsp[0].charset); }
#line 35582 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 900: /* old_or_new_charset_name_or_default: DEFAULT */
#line 6583 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)=NULL; }
#line 35588 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 901: /* collation_name: ident_or_text */
#line 6588 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyval.Lex_extended_collation).set_by_name((yyvsp[0].lex_str).str, thd->get_utf8_flag()))
MYSQL_YYABORT;
}
#line 35597 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 902: /* collation_name_or_default: collation_name */
#line 6595 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_extended_collation)=(yyvsp[0].Lex_extended_collation); }
#line 35603 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 903: /* collation_name_or_default: DEFAULT */
#line 6596 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_extended_collation).set_collate_default(); }
#line 35609 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 904: /* opt_default: %empty */
#line 6600 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35615 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 905: /* opt_default: DEFAULT */
#line 6601 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35621 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 906: /* charset_or_alias: charset charset_name */
#line 6605 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)= (yyvsp[0].charset); }
#line 35627 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 907: /* charset_or_alias: ASCII_SYM */
#line 6606 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)= &my_charset_latin1; }
#line 35633 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 908: /* charset_or_alias: UNICODE_SYM */
#line 6608 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.charset)= get_charset_by_csname("ucs2", MY_CS_PRIMARY,MYF(0)))))
my_yyabort_error((ER_UNKNOWN_CHARACTER_SET, MYF(0), "ucs2"));
}
#line 35642 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 909: /* opt_binary: %empty */
#line 6615 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_exact_charset_extended_collation_attrs).init(); }
#line 35648 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 911: /* binary: BYTE_SYM */
#line 6621 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_exact_charset_extended_collation_attrs).set_charset(Lex_exact_charset(&my_charset_bin));
}
#line 35656 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 912: /* binary: charset_or_alias */
#line 6625 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_exact_charset_extended_collation_attrs).set_charset(Lex_exact_charset((yyvsp[0].charset)));
}
#line 35664 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 913: /* binary: charset_or_alias BINARY */
#line 6629 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyval.Lex_exact_charset_extended_collation_attrs).set_charset_collate_binary(Lex_exact_charset((yyvsp[-1].charset))))
MYSQL_YYABORT;
}
#line 35673 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 914: /* binary: BINARY */
#line 6633 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_exact_charset_extended_collation_attrs).set_contextually_typed_binary_style(); }
#line 35679 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 915: /* binary: BINARY charset_or_alias */
#line 6635 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyval.Lex_exact_charset_extended_collation_attrs).set_charset_collate_binary(Lex_exact_charset((yyvsp[0].charset))))
MYSQL_YYABORT;
}
#line 35688 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 916: /* binary: charset_or_alias COLLATE_SYM DEFAULT */
#line 6640 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_exact_charset_extended_collation_attrs).set_charset_collate_default(Lex_exact_charset((yyvsp[-2].charset)));
}
#line 35696 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 917: /* binary: charset_or_alias COLLATE_SYM collation_name */
#line 6644 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyvsp[0].Lex_extended_collation).merge_exact_charset(Lex_exact_charset((yyvsp[-2].charset))))
MYSQL_YYABORT;
(yyval.Lex_exact_charset_extended_collation_attrs)= Lex_exact_charset_extended_collation_attrs((yyvsp[0].Lex_extended_collation));
}
#line 35706 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 918: /* binary: COLLATE_SYM collation_name */
#line 6650 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_exact_charset_extended_collation_attrs)= Lex_exact_charset_extended_collation_attrs((yyvsp[0].Lex_extended_collation));
}
#line 35714 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 919: /* binary: COLLATE_SYM DEFAULT */
#line 6654 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_exact_charset_extended_collation_attrs).set_collate_default();
}
#line 35722 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 920: /* opt_bin_mod: %empty */
#line 6660 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= false; }
#line 35728 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 921: /* opt_bin_mod: BINARY */
#line 6661 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= true; }
#line 35734 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 922: /* $@93: %empty */
#line 6666 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyvsp[0].ulong_num) == 0))
{
thd->parse_error();
MYSQL_YYABORT;
}
}
#line 35746 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 923: /* ws_nweights: '(' real_ulong_num $@93 ')' */
#line 6674 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= (yyvsp[-2].ulong_num); }
#line 35752 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 924: /* ws_level_flag_desc: ASC */
#line 6678 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 0; }
#line 35758 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 925: /* ws_level_flag_desc: DESC */
#line 6679 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 1 << MY_STRXFRM_DESC_SHIFT; }
#line 35764 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 926: /* ws_level_flag_reverse: REVERSE_SYM */
#line 6683 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 1 << MY_STRXFRM_REVERSE_SHIFT; }
#line 35770 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 927: /* ws_level_flags: %empty */
#line 6686 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 0; }
#line 35776 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 928: /* ws_level_flags: ws_level_flag_desc */
#line 6687 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= (yyvsp[0].ulong_num); }
#line 35782 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 929: /* ws_level_flags: ws_level_flag_desc ws_level_flag_reverse */
#line 6688 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= (yyvsp[-1].ulong_num) | (yyvsp[0].ulong_num); }
#line 35788 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 930: /* ws_level_flags: ws_level_flag_reverse */
#line 6689 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= (yyvsp[0].ulong_num) ; }
#line 35794 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 931: /* ws_level_number: real_ulong_num */
#line 6694 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.ulong_num)= (yyvsp[0].ulong_num) < 1 ? 1 : ((yyvsp[0].ulong_num) > MY_STRXFRM_NLEVELS ? MY_STRXFRM_NLEVELS : (yyvsp[0].ulong_num));
(yyval.ulong_num)--;
}
#line 35803 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 932: /* ws_level_list_item: ws_level_number ws_level_flags */
#line 6702 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.ulong_num)= (1 | (yyvsp[0].ulong_num)) << (yyvsp[-1].ulong_num);
}
#line 35811 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 933: /* ws_level_list: ws_level_list_item */
#line 6708 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= (yyvsp[0].ulong_num); }
#line 35817 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 934: /* ws_level_list: ws_level_list ',' ws_level_list_item */
#line 6709 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)|= (yyvsp[0].ulong_num); }
#line 35823 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 935: /* ws_level_range: ws_level_number '-' ws_level_number */
#line 6714 "/home/buildbot/git/sql/sql_yacc.yy"
{
uint start= (yyvsp[-2].ulong_num);
uint end= (yyvsp[0].ulong_num);
for ((yyval.ulong_num)= 0; start <= end; start++)
(yyval.ulong_num)|= (1 << start);
}
#line 35834 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 936: /* ws_level_list_or_range: ws_level_list */
#line 6723 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= (yyvsp[0].ulong_num); }
#line 35840 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 937: /* ws_level_list_or_range: ws_level_range */
#line 6724 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= (yyvsp[0].ulong_num); }
#line 35846 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 938: /* opt_ws_levels: %empty */
#line 6728 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 0; }
#line 35852 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 939: /* opt_ws_levels: LEVEL_SYM ws_level_list_or_range */
#line 6729 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= (yyvsp[0].ulong_num); }
#line 35858 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 942: /* references: REFERENCES table_ident opt_ref_list opt_match_clause opt_on_update_delete */
#line 6743 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.table)=(yyvsp[-3].table);
}
#line 35866 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 943: /* opt_ref_list: %empty */
#line 6750 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ref_list.empty(); }
#line 35872 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 945: /* ref_list: ref_list ',' ident */
#line 6756 "/home/buildbot/git/sql/sql_yacc.yy"
{
Key_part_spec *key= new (thd->mem_root) Key_part_spec(&(yyvsp[0].ident_sys), 0);
if (unlikely(key == NULL))
MYSQL_YYABORT;
Lex->ref_list.push_back(key, thd->mem_root);
}
#line 35883 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 946: /* ref_list: ident */
#line 6763 "/home/buildbot/git/sql/sql_yacc.yy"
{
Key_part_spec *key= new (thd->mem_root) Key_part_spec(&(yyvsp[0].ident_sys), 0);
if (unlikely(key == NULL))
MYSQL_YYABORT;
LEX *lex= Lex;
lex->ref_list.empty();
lex->ref_list.push_back(key, thd->mem_root);
}
#line 35896 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 947: /* opt_match_clause: %empty */
#line 6775 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->fk_match_option= Foreign_key::FK_MATCH_UNDEF; }
#line 35902 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 948: /* opt_match_clause: MATCH FULL */
#line 6777 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->fk_match_option= Foreign_key::FK_MATCH_FULL; }
#line 35908 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 949: /* opt_match_clause: MATCH PARTIAL */
#line 6779 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->fk_match_option= Foreign_key::FK_MATCH_PARTIAL; }
#line 35914 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 950: /* opt_match_clause: MATCH SIMPLE_SYM */
#line 6781 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->fk_match_option= Foreign_key::FK_MATCH_SIMPLE; }
#line 35920 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 951: /* opt_on_update_delete: %empty */
#line 6786 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->fk_update_opt= FK_OPTION_UNDEF;
lex->fk_delete_opt= FK_OPTION_UNDEF;
}
#line 35930 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 952: /* opt_on_update_delete: ON UPDATE_SYM delete_option */
#line 6792 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->fk_update_opt= (yyvsp[0].m_fk_option);
lex->fk_delete_opt= FK_OPTION_UNDEF;
}
#line 35940 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 953: /* opt_on_update_delete: ON DELETE_SYM delete_option */
#line 6798 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->fk_update_opt= FK_OPTION_UNDEF;
lex->fk_delete_opt= (yyvsp[0].m_fk_option);
}
#line 35950 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 954: /* opt_on_update_delete: ON UPDATE_SYM delete_option ON DELETE_SYM delete_option */
#line 6805 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->fk_update_opt= (yyvsp[-3].m_fk_option);
lex->fk_delete_opt= (yyvsp[0].m_fk_option);
}
#line 35960 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 955: /* opt_on_update_delete: ON DELETE_SYM delete_option ON UPDATE_SYM delete_option */
#line 6812 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->fk_update_opt= (yyvsp[0].m_fk_option);
lex->fk_delete_opt= (yyvsp[-3].m_fk_option);
}
#line 35970 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 956: /* delete_option: RESTRICT */
#line 6820 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_fk_option)= FK_OPTION_RESTRICT; }
#line 35976 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 957: /* delete_option: CASCADE */
#line 6821 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_fk_option)= FK_OPTION_CASCADE; }
#line 35982 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 958: /* delete_option: SET NULL_SYM */
#line 6822 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_fk_option)= FK_OPTION_SET_NULL; }
#line 35988 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 959: /* delete_option: NO_SYM ACTION */
#line 6823 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_fk_option)= FK_OPTION_NO_ACTION; }
#line 35994 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 960: /* delete_option: SET DEFAULT */
#line 6824 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_fk_option)= FK_OPTION_SET_DEFAULT; }
#line 36000 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 961: /* constraint_key_type: PRIMARY_SYM KEY_SYM */
#line 6828 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_type)= Key::PRIMARY; }
#line 36006 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 962: /* constraint_key_type: UNIQUE_SYM opt_key_or_index */
#line 6829 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_type)= Key::UNIQUE; }
#line 36012 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 963: /* key_or_index: KEY_SYM */
#line 6833 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36018 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 964: /* key_or_index: INDEX_SYM */
#line 6834 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36024 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 965: /* opt_key_or_index: %empty */
#line 6838 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36030 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 967: /* keys_or_index: KEYS */
#line 6843 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36036 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 968: /* keys_or_index: INDEX_SYM */
#line 6844 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36042 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 969: /* keys_or_index: INDEXES */
#line 6845 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36048 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 970: /* fulltext: FULLTEXT_SYM */
#line 6849 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_type)= Key::FULLTEXT;}
#line 36054 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 971: /* spatial: SPATIAL_SYM */
#line 6854 "/home/buildbot/git/sql/sql_yacc.yy"
{
#ifdef HAVE_SPATIAL
(yyval.key_type)= Key::SPATIAL;
#else
my_yyabort_error((ER_FEATURE_DISABLED, MYF(0), sym_group_geom.name,
sym_group_geom.needed_define));
#endif
}
#line 36067 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 972: /* normal_key_options: %empty */
#line 6865 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36073 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 973: /* normal_key_options: normal_key_opts */
#line 6866 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_key->option_list= Lex->option_list; }
#line 36079 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 974: /* fulltext_key_options: %empty */
#line 6870 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36085 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 975: /* fulltext_key_options: fulltext_key_opts */
#line 6871 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_key->option_list= Lex->option_list; }
#line 36091 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 976: /* spatial_key_options: %empty */
#line 6875 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36097 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 977: /* spatial_key_options: spatial_key_opts */
#line 6876 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_key->option_list= Lex->option_list; }
#line 36103 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 984: /* opt_USING_key_algorithm: %empty */
#line 6895 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_alg)= HA_KEY_ALG_UNDEF; }
#line 36109 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 985: /* opt_USING_key_algorithm: USING btree_or_rtree */
#line 6896 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_alg)= (yyvsp[0].key_alg); }
#line 36115 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 986: /* opt_key_algorithm_clause: %empty */
#line 6901 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_alg)= HA_KEY_ALG_UNDEF; }
#line 36121 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 987: /* opt_key_algorithm_clause: USING btree_or_rtree */
#line 6902 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_alg)= (yyvsp[0].key_alg); }
#line 36127 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 988: /* opt_key_algorithm_clause: TYPE_SYM btree_or_rtree */
#line 6903 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_alg)= (yyvsp[0].key_alg); }
#line 36133 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 989: /* key_using_alg: USING btree_or_rtree */
#line 6908 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_key->key_create_info.algorithm= (yyvsp[0].key_alg); }
#line 36139 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 990: /* key_using_alg: TYPE_SYM btree_or_rtree */
#line 6910 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_key->key_create_info.algorithm= (yyvsp[0].key_alg); }
#line 36145 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 991: /* all_key_opt: KEY_BLOCK_SIZE opt_equal ulong_num */
#line 6915 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_key->key_create_info.block_size= (yyvsp[0].ulong_num);
Lex->last_key->key_create_info.flags|= HA_USES_BLOCK_SIZE;
}
#line 36154 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 992: /* all_key_opt: COMMENT_SYM TEXT_STRING_sys */
#line 6920 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_key->key_create_info.comment= (yyvsp[0].lex_str); }
#line 36160 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 993: /* all_key_opt: VISIBLE_SYM */
#line 6922 "/home/buildbot/git/sql/sql_yacc.yy"
{
/* This is mainly for MySQL 8.0 compatibility */
}
#line 36168 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 994: /* all_key_opt: ignorability */
#line 6926 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_key->key_create_info.is_ignored= (yyvsp[0].num);
}
#line 36176 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 995: /* all_key_opt: engine_defined_option */
#line 6930 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[0].engine_option_value_ptr)->link(&Lex->option_list, &Lex->option_list_last);
}
#line 36184 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1000: /* fulltext_key_opt: WITH PARSER_SYM IDENT_sys */
#line 6947 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (likely(plugin_is_ready(&(yyvsp[0].ident_sys), MYSQL_FTPARSER_PLUGIN)))
Lex->last_key->key_create_info.parser_name= (yyvsp[0].ident_sys);
else
my_yyabort_error((ER_FUNCTION_NOT_DEFINED, MYF(0), (yyvsp[0].ident_sys).str));
}
#line 36195 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1001: /* btree_or_rtree: BTREE_SYM */
#line 6956 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_alg)= HA_KEY_ALG_BTREE; }
#line 36201 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1002: /* btree_or_rtree: RTREE_SYM */
#line 6957 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_alg)= HA_KEY_ALG_RTREE; }
#line 36207 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1003: /* btree_or_rtree: HASH_SYM */
#line 6958 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_alg)= HA_KEY_ALG_HASH; }
#line 36213 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1004: /* ignorability: IGNORED_SYM */
#line 6962 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= true; }
#line 36219 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1005: /* ignorability: NOT_SYM IGNORED_SYM */
#line 6963 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= false; }
#line 36225 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1006: /* key_list: key_list ',' key_part order_dir */
#line 6968 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[-1].key_part)->asc= (yyvsp[0].num);
Lex->last_key->columns.push_back((yyvsp[-1].key_part), thd->mem_root);
}
#line 36234 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1007: /* key_list: key_part order_dir */
#line 6973 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[-1].key_part)->asc= (yyvsp[0].num);
Lex->last_key->columns.push_back((yyvsp[-1].key_part), thd->mem_root);
}
#line 36243 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1008: /* opt_without_overlaps: %empty */
#line 6980 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36249 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1009: /* opt_without_overlaps: ',' ident WITHOUT OVERLAPS_SYM */
#line 6982 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_key->without_overlaps= true;
Lex->last_key->period= (yyvsp[-2].ident_sys);
}
#line 36258 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1010: /* key_part: ident */
#line 6990 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.key_part)= new (thd->mem_root) Key_part_spec(&(yyvsp[0].ident_sys), 0);
if (unlikely((yyval.key_part) == NULL))
MYSQL_YYABORT;
}
#line 36268 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1011: /* key_part: ident '(' NUM ')' */
#line 6996 "/home/buildbot/git/sql/sql_yacc.yy"
{
int key_part_len= atoi((yyvsp[-1].lex_str).str);
if (unlikely(!key_part_len))
my_yyabort_error((ER_KEY_PART_0, MYF(0), (yyvsp[-3].ident_sys).str));
(yyval.key_part)= new (thd->mem_root) Key_part_spec(&(yyvsp[-3].ident_sys), (uint) key_part_len);
if (unlikely((yyval.key_part) == NULL))
MYSQL_YYABORT;
}
#line 36281 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1012: /* opt_ident: %empty */
#line 7007 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= null_clex_str; }
#line 36287 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1013: /* opt_ident: field_ident */
#line 7008 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= (yyvsp[0].lex_str); }
#line 36293 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1014: /* string_list: text_string */
#line 7013 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_field->interval_list.push_back((yyvsp[0].string), thd->mem_root); }
#line 36299 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1015: /* string_list: string_list ',' text_string */
#line 7015 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_field->interval_list.push_back((yyvsp[0].string), thd->mem_root); }
#line 36305 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1016: /* $@94: %empty */
#line 7024 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->name= null_clex_str;
Lex->table_type= TABLE_TYPE_UNKNOWN;
Lex->sql_command= SQLCOM_ALTER_TABLE;
Lex->duplicates= DUP_ERROR;
Lex->first_select_lex()->order_list.empty();
Lex->create_info.init();
Lex->create_info.row_type= ROW_TYPE_NOT_USED;
Lex->alter_info.reset();
Lex->no_write_to_binlog= 0;
Lex->create_info.storage_media= HA_SM_DEFAULT;
if (Lex->main_select_push())
MYSQL_YYABORT;
DBUG_ASSERT(!Lex->m_sql_cmd);
}
#line 36325 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1017: /* $@95: %empty */
#line 7040 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.set((yyvsp[-2].object_ddl_options));
if (!Lex->first_select_lex()->
add_table_to_list(thd, (yyvsp[-1].table), NULL, TL_OPTION_UPDATING,
TL_READ_NO_INSERT, MDL_SHARED_UPGRADABLE))
MYSQL_YYABORT;
Lex->first_select_lex()->db=
(Lex->first_select_lex()->table_list.first)->db;
Lex->create_last_non_select_table= Lex->last_table();
Lex->mark_first_table_as_inserting();
}
#line 36341 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1018: /* alter: ALTER $@94 alter_options TABLE_SYM opt_if_exists table_ident opt_lock_wait_timeout $@95 alter_commands */
#line 7052 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (likely(!Lex->m_sql_cmd))
{
/* Create a generic ALTER TABLE statment. */
Lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_alter_table();
if (unlikely(Lex->m_sql_cmd == NULL))
MYSQL_YYABORT;
}
Lex->pop_select(); //main select
}
#line 36356 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1019: /* $@96: %empty */
#line 7063 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.init();
if (Lex->main_select_push(true))
MYSQL_YYABORT;
}
#line 36366 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1020: /* alter: ALTER DATABASE ident_or_empty $@96 create_database_options */
#line 7069 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command=SQLCOM_ALTER_DB;
lex->name= (yyvsp[-2].ident_sys);
if (lex->name.str == NULL &&
unlikely(lex->copy_db_to(&lex->name)))
MYSQL_YYABORT;
Lex->pop_select(); //main select
}
#line 36380 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1021: /* $@97: %empty */
#line 7079 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.init();
Lex->create_info.schema_comment= thd->make_clex_string((yyvsp[0].lex_str));
Lex->create_info.used_fields|= HA_CREATE_USED_COMMENT;
}
#line 36390 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1022: /* alter: ALTER DATABASE COMMENT_SYM opt_equal TEXT_STRING_sys $@97 opt_create_database_options */
#line 7085 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command=SQLCOM_ALTER_DB;
lex->name= Lex_ident_sys();
if (lex->name.str == NULL &&
unlikely(lex->copy_db_to(&lex->name)))
MYSQL_YYABORT;
}
#line 36403 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1023: /* alter: ALTER DATABASE ident UPGRADE_SYM DATA_SYM DIRECTORY_SYM NAME_SYM */
#line 7094 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (unlikely(lex->sphead))
my_yyabort_error((ER_SP_NO_DROP_SP, MYF(0), "DATABASE"));
lex->sql_command= SQLCOM_ALTER_DB_UPGRADE;
lex->name= (yyvsp[-4].ident_sys);
}
#line 36415 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1024: /* $@98: %empty */
#line 7102 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_alter_procedure_start((yyvsp[0].spname)))
MYSQL_YYABORT;
}
#line 36424 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1025: /* alter: ALTER PROCEDURE_SYM sp_name $@98 sp_a_chistics stmt_end */
#line 7107 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36430 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1026: /* $@99: %empty */
#line 7109 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_alter_function_start((yyvsp[0].spname)))
MYSQL_YYABORT;
}
#line 36439 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1027: /* alter: ALTER FUNCTION_SYM sp_name $@99 sp_a_chistics stmt_end */
#line 7114 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36445 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1028: /* $@100: %empty */
#line 7116 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->main_select_push())
MYSQL_YYABORT;
if (Lex->add_alter_view(thd, (yyvsp[-4].num), (yyvsp[-2].view_suid), (yyvsp[0].table)))
MYSQL_YYABORT;
}
#line 36456 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1029: /* alter: ALTER view_algorithm definer_opt opt_view_suid VIEW_SYM table_ident $@100 view_list_opt AS view_select stmt_end */
#line 7122 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36462 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1030: /* $@101: %empty */
#line 7129 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->main_select_push())
MYSQL_YYABORT;
if (Lex->add_alter_view(thd, VIEW_ALGORITHM_INHERIT, (yyvsp[-2].view_suid), (yyvsp[0].table)))
MYSQL_YYABORT;
}
#line 36473 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1031: /* alter: ALTER definer_opt opt_view_suid VIEW_SYM table_ident $@101 view_list_opt AS view_select stmt_end */
#line 7135 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36479 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1032: /* $@102: %empty */
#line 7137 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->main_select_push())
MYSQL_YYABORT;
/*
It is safe to use Lex->spname because
ALTER EVENT xxx RENATE TO yyy DO ALTER EVENT RENAME TO
is not allowed. Lex->spname is used in the case of RENAME TO
If it had to be supported spname had to be added to
Event_parse_data.
*/
if (unlikely(!(Lex->event_parse_data= Event_parse_data::new_instance(thd))))
MYSQL_YYABORT;
Lex->event_parse_data->identifier= (yyvsp[0].spname);
Lex->sql_command= SQLCOM_ALTER_EVENT;
Lex->stmt_definition_begin= (yyvsp[-2].simple_string);
}
#line 36502 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1033: /* alter: ALTER definer_opt remember_name EVENT_SYM sp_name $@102 ev_alter_on_schedule_completion opt_ev_rename_to opt_ev_status opt_ev_comment opt_ev_sql_stmt */
#line 7160 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyvsp[-4].num) || (yyvsp[-3].num) || (yyvsp[-2].num) || (yyvsp[-1].num) || (yyvsp[0].num))))
{
thd->parse_error();
MYSQL_YYABORT;
}
/*
sql_command is set here because some rules in ev_sql_stmt
can overwrite it
*/
Lex->sql_command= SQLCOM_ALTER_EVENT;
Lex->stmt_definition_end= (char*)YYLIP->get_cpp_ptr();
Lex->pop_select(); //main select
}
#line 36522 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1034: /* $@103: %empty */
#line 7176 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_ALTER_SERVER;
lex->server_options.reset((yyvsp[0].lex_str));
}
#line 36532 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1035: /* alter: ALTER SERVER_SYM ident_or_text $@103 OPTIONS_SYM '(' server_options_list ')' */
#line 7180 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 36538 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1036: /* alter: ALTER USER_SYM opt_if_exists clear_privileges grant_list opt_require_clause opt_resource_options opt_account_locking_and_opt_password_expiration */
#line 7184 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.set((yyvsp[-5].object_ddl_options));
Lex->sql_command= SQLCOM_ALTER_USER;
}
#line 36547 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1037: /* $@104: %empty */
#line 7189 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_ALTER_SEQUENCE;
DBUG_ASSERT(!lex->m_sql_cmd);
if (Lex->main_select_push())
MYSQL_YYABORT;
}
#line 36559 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1038: /* $@105: %empty */
#line 7197 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (!(lex->create_info.seq_create_info= new (thd->mem_root)
sequence_definition()) ||
!lex->first_select_lex()->
add_table_to_list(thd, (yyvsp[0].table), NULL, TL_OPTION_SEQUENCE,
TL_WRITE, MDL_EXCLUSIVE))
MYSQL_YYABORT;
}
#line 36573 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1039: /* $@106: %empty */
#line 7207 "/home/buildbot/git/sql/sql_yacc.yy"
{
/* Create a generic ALTER SEQUENCE statment. */
Lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_alter_sequence((yyvsp[-4].object_ddl_options));
if (unlikely(Lex->m_sql_cmd == NULL))
MYSQL_YYABORT;
}
#line 36584 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1040: /* alter: ALTER SEQUENCE_SYM opt_if_exists $@104 table_ident $@105 sequence_defs $@106 stmt_end */
#line 7212 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36590 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1041: /* account_locking_option: LOCK_SYM */
#line 7217 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->account_options.account_locked= ACCOUNTLOCK_LOCKED;
}
#line 36598 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1042: /* account_locking_option: UNLOCK_SYM */
#line 7221 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->account_options.account_locked= ACCOUNTLOCK_UNLOCKED;
}
#line 36606 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1043: /* opt_password_expire_option: %empty */
#line 7228 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->account_options.password_expire= PASSWORD_EXPIRE_NOW;
}
#line 36614 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1044: /* opt_password_expire_option: NEVER_SYM */
#line 7232 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->account_options.password_expire= PASSWORD_EXPIRE_NEVER;
}
#line 36622 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1045: /* opt_password_expire_option: DEFAULT */
#line 7236 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->account_options.password_expire= PASSWORD_EXPIRE_DEFAULT;
}
#line 36630 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1046: /* opt_password_expire_option: INTERVAL_SYM NUM DAY_SYM */
#line 7240 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->account_options.password_expire= PASSWORD_EXPIRE_INTERVAL;
if (!(Lex->account_options.num_expiration_days= atoi((yyvsp[-1].lex_str).str)))
my_yyabort_error((ER_WRONG_VALUE, MYF(0), "DAY", (yyvsp[-1].lex_str).str));
}
#line 36640 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1052: /* ev_alter_on_schedule_completion: %empty */
#line 7256 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0;}
#line 36646 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1053: /* ev_alter_on_schedule_completion: ON SCHEDULE_SYM ev_schedule_time */
#line 7257 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 36652 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1054: /* ev_alter_on_schedule_completion: ev_on_completion */
#line 7258 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 36658 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1055: /* ev_alter_on_schedule_completion: ON SCHEDULE_SYM ev_schedule_time ev_on_completion */
#line 7259 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 36664 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1056: /* opt_ev_rename_to: %empty */
#line 7263 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0;}
#line 36670 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1057: /* opt_ev_rename_to: RENAME TO_SYM sp_name */
#line 7265 "/home/buildbot/git/sql/sql_yacc.yy"
{
/*
Use lex's spname to hold the new name.
The original name is in the Event_parse_data object
*/
Lex->spname= (yyvsp[0].spname);
(yyval.num)= 1;
}
#line 36683 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1058: /* opt_ev_sql_stmt: %empty */
#line 7276 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0;}
#line 36689 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1059: /* opt_ev_sql_stmt: DO_SYM ev_sql_stmt */
#line 7277 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 36695 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1060: /* ident_or_empty: %empty */
#line 7282 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ident_sys)= Lex_ident_sys(); }
#line 36701 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1063: /* alter_commands: DISCARD TABLESPACE */
#line 7289 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->m_sql_cmd= new (thd->mem_root)
Sql_cmd_discard_import_tablespace(
Sql_cmd_discard_import_tablespace::DISCARD_TABLESPACE);
if (unlikely(Lex->m_sql_cmd == NULL))
MYSQL_YYABORT;
}
#line 36713 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1064: /* alter_commands: IMPORT TABLESPACE */
#line 7297 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->m_sql_cmd= new (thd->mem_root)
Sql_cmd_discard_import_tablespace(
Sql_cmd_discard_import_tablespace::IMPORT_TABLESPACE);
if (unlikely(Lex->m_sql_cmd == NULL))
MYSQL_YYABORT;
}
#line 36725 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1070: /* alter_commands: DROP PARTITION_SYM opt_if_exists alt_part_name_list */
#line 7319 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.partition_flags|= ALTER_PARTITION_DROP;
DBUG_ASSERT(!Lex->if_exists());
Lex->create_info.add((yyvsp[-1].object_ddl_options));
}
#line 36735 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1071: /* alter_commands: REBUILD_SYM PARTITION_SYM opt_no_write_to_binlog all_or_alt_part_name_list */
#line 7326 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->alter_info.partition_flags|= ALTER_PARTITION_REBUILD;
lex->no_write_to_binlog= (yyvsp[-1].num);
}
#line 36745 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1072: /* $@107: %empty */
#line 7333 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= thd->lex;
lex->no_write_to_binlog= (yyvsp[-1].num);
lex->check_opt.init();
DBUG_ASSERT(!lex->m_sql_cmd);
lex->m_sql_cmd= new (thd->mem_root)
Sql_cmd_alter_table_optimize_partition();
if (unlikely(lex->m_sql_cmd == NULL))
MYSQL_YYABORT;
}
#line 36760 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1074: /* alter_commands: ANALYZE_SYM PARTITION_SYM opt_no_write_to_binlog all_or_alt_part_name_list */
#line 7346 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= thd->lex;
lex->no_write_to_binlog= (yyvsp[-1].num);
lex->check_opt.init();
DBUG_ASSERT(!lex->m_sql_cmd);
lex->m_sql_cmd= new (thd->mem_root)
Sql_cmd_alter_table_analyze_partition();
if (unlikely(lex->m_sql_cmd == NULL))
MYSQL_YYABORT;
}
#line 36775 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1075: /* $@108: %empty */
#line 7357 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= thd->lex;
lex->check_opt.init();
DBUG_ASSERT(!lex->m_sql_cmd);
lex->m_sql_cmd= new (thd->mem_root)
Sql_cmd_alter_table_check_partition();
if (unlikely(lex->m_sql_cmd == NULL))
MYSQL_YYABORT;
}
#line 36789 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1077: /* $@109: %empty */
#line 7369 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= thd->lex;
lex->no_write_to_binlog= (yyvsp[-1].num);
lex->check_opt.init();
DBUG_ASSERT(!lex->m_sql_cmd);
lex->m_sql_cmd= new (thd->mem_root)
Sql_cmd_alter_table_repair_partition();
if (unlikely(lex->m_sql_cmd == NULL))
MYSQL_YYABORT;
}
#line 36804 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1079: /* alter_commands: COALESCE PARTITION_SYM opt_no_write_to_binlog real_ulong_num */
#line 7381 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->alter_info.partition_flags|= ALTER_PARTITION_COALESCE;
lex->no_write_to_binlog= (yyvsp[-1].num);
lex->alter_info.num_parts= (yyvsp[0].ulong_num);
}
#line 36815 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1080: /* alter_commands: TRUNCATE_SYM PARTITION_SYM all_or_alt_part_name_list */
#line 7388 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= thd->lex;
lex->check_opt.init();
DBUG_ASSERT(!lex->m_sql_cmd);
lex->m_sql_cmd= new (thd->mem_root)
Sql_cmd_alter_table_truncate_partition();
if (unlikely(lex->m_sql_cmd == NULL))
MYSQL_YYABORT;
}
#line 36829 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1082: /* alter_commands: EXCHANGE_SYM PARTITION_SYM alt_part_name_item WITH TABLE_SYM table_ident have_partitioning */
#line 7400 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_alter_table_exchange_partition((yyvsp[-1].table)))
MYSQL_YYABORT;
}
#line 36838 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1083: /* alter_commands: CONVERT_SYM PARTITION_SYM alt_part_name_item TO_SYM TABLE_SYM table_ident have_partitioning */
#line 7406 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (Lex->stmt_alter_table((yyvsp[-1].table)))
MYSQL_YYABORT;
lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_alter_table();
if (unlikely(lex->m_sql_cmd == NULL))
MYSQL_YYABORT;
lex->alter_info.partition_flags|= ALTER_PARTITION_CONVERT_OUT;
}
#line 36852 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1084: /* $@110: %empty */
#line 7416 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (!lex->first_select_lex()->add_table_to_list(thd, (yyvsp[0].table), nullptr, 0,
TL_READ_NO_INSERT,
MDL_SHARED_NO_WRITE))
MYSQL_YYABORT;
/*
This will appear as (new_db, new_name) in alter_ctx.
new_db will be IX-locked and new_name X-locked.
*/
lex->first_select_lex()->db= (yyvsp[0].table)->db;
lex->name= (yyvsp[0].table)->table;
if (lex->first_select_lex()->db.str == NULL &&
lex->copy_db_to(&lex->first_select_lex()->db))
MYSQL_YYABORT;
lex->part_info= new (thd->mem_root) partition_info();
if (unlikely(!lex->part_info))
MYSQL_YYABORT;
lex->part_info->num_parts= 1;
/*
OR-ed with ALTER_PARTITION_ADD because too many checks of
ALTER_PARTITION_ADD required.
*/
lex->alter_info.partition_flags|= ALTER_PARTITION_ADD |
ALTER_PARTITION_CONVERT_IN;
}
#line 36886 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1085: /* alter_commands: CONVERT_SYM TABLE_SYM table_ident $@110 TO_SYM PARTITION_SYM part_definition */
#line 7446 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_alter_table();
if (unlikely(lex->m_sql_cmd == NULL))
MYSQL_YYABORT;
}
#line 36897 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1086: /* remove_partitioning: REMOVE_SYM PARTITIONING_SYM */
#line 7456 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.partition_flags|= ALTER_PARTITION_REMOVE;
}
#line 36905 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1087: /* all_or_alt_part_name_list: ALL */
#line 7463 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.partition_flags|= ALTER_PARTITION_ALL;
}
#line 36913 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1089: /* $@111: %empty */
#line 7472 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->part_info= new (thd->mem_root) partition_info();
if (unlikely(!lex->part_info))
MYSQL_YYABORT;
lex->alter_info.partition_flags|= ALTER_PARTITION_ADD;
DBUG_ASSERT(!Lex->create_info.if_not_exists());
lex->create_info.set((yyvsp[-1].object_ddl_options));
lex->no_write_to_binlog= (yyvsp[0].num);
}
#line 36929 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1090: /* add_partition_rule: ADD PARTITION_SYM opt_if_not_exists opt_no_write_to_binlog $@111 add_part_extra */
#line 7484 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36935 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1092: /* add_part_extra: '(' part_def_list ')' */
#line 7490 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->part_info->num_parts= lex->part_info->partitions.elements;
}
#line 36944 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1093: /* add_part_extra: PARTITIONS_SYM real_ulong_num */
#line 7495 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->part_info->num_parts= (yyvsp[0].ulong_num);
}
#line 36952 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1094: /* $@112: %empty */
#line 7502 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->part_info= new (thd->mem_root) partition_info();
if (unlikely(!lex->part_info))
MYSQL_YYABORT;
lex->no_write_to_binlog= (yyvsp[0].num);
}
#line 36965 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1096: /* reorg_parts_rule: %empty */
#line 7515 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.partition_flags|= ALTER_PARTITION_TABLE_REORG;
}
#line 36973 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1097: /* $@113: %empty */
#line 7519 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.partition_flags|= ALTER_PARTITION_REORGANIZE;
}
#line 36981 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1098: /* reorg_parts_rule: alt_part_name_list $@113 INTO '(' part_def_list ')' */
#line 7523 "/home/buildbot/git/sql/sql_yacc.yy"
{
partition_info *part_info= Lex->part_info;
part_info->num_parts= part_info->partitions.elements;
}
#line 36990 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1099: /* alt_part_name_list: alt_part_name_item */
#line 7530 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36996 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1100: /* alt_part_name_list: alt_part_name_list ',' alt_part_name_item */
#line 7531 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37002 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1101: /* alt_part_name_item: ident */
#line 7536 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->alter_info.partition_names.push_back((yyvsp[0].ident_sys).str,
thd->mem_root)))
MYSQL_YYABORT;
}
#line 37012 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1105: /* alter_list_item: add_column column_def opt_place */
#line 7558 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->create_last_non_select_table= lex->last_table();
lex->alter_info.flags|= ALTER_PARSER_ADD_COLUMN;
(yyvsp[-1].create_field)->after= (yyvsp[0].lex_str);
}
#line 37023 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1106: /* alter_list_item: ADD key_def */
#line 7565 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_last_non_select_table= Lex->last_table();
Lex->alter_info.flags|= ALTER_ADD_INDEX;
}
#line 37032 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1107: /* alter_list_item: ADD period_for_system_time */
#line 7570 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.flags|= ALTER_ADD_PERIOD;
}
#line 37040 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1108: /* alter_list_item: ADD PERIOD_SYM opt_if_not_exists_table_element period_for_application_time */
#line 7575 "/home/buildbot/git/sql/sql_yacc.yy"
{
Table_period_info &period= Lex->create_info.period_info;
period.create_if_not_exists= Lex->check_exists;
Lex->alter_info.flags|= ALTER_ADD_CHECK_CONSTRAINT;
}
#line 37050 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1109: /* alter_list_item: add_column '(' create_field_list ')' */
#line 7581 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->alter_info.flags|= ALTER_PARSER_ADD_COLUMN;
if (!lex->alter_info.key_list.is_empty())
lex->alter_info.flags|= ALTER_ADD_INDEX;
}
#line 37061 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1110: /* alter_list_item: ADD constraint_def */
#line 7588 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.flags|= ALTER_ADD_CHECK_CONSTRAINT;
}
#line 37069 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1111: /* alter_list_item: ADD CONSTRAINT IF_SYM not EXISTS field_ident check_constraint */
#line 7592 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.flags|= ALTER_ADD_CHECK_CONSTRAINT;
Lex->add_constraint((yyvsp[-1].lex_str), (yyvsp[0].virtual_column), TRUE);
}
#line 37078 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1112: /* alter_list_item: CHANGE opt_column opt_if_exists_table_element field_ident field_spec opt_place */
#line 7598 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.flags|= ALTER_CHANGE_COLUMN | ALTER_RENAME_COLUMN;
Lex->create_last_non_select_table= Lex->last_table();
(yyvsp[-1].create_field)->change= (yyvsp[-2].lex_str);
(yyvsp[-1].create_field)->after= (yyvsp[0].lex_str);
}
#line 37089 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1113: /* alter_list_item: MODIFY_SYM opt_column opt_if_exists_table_element field_spec opt_place */
#line 7606 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.flags|= ALTER_CHANGE_COLUMN;
Lex->create_last_non_select_table= Lex->last_table();
(yyvsp[-1].create_field)->change= (yyvsp[-1].create_field)->field_name;
(yyvsp[-1].create_field)->after= (yyvsp[0].lex_str);
}
#line 37100 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1114: /* alter_list_item: DROP opt_column opt_if_exists_table_element field_ident opt_restrict */
#line 7613 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
Alter_drop *ad= (new (thd->mem_root)
Alter_drop(Alter_drop::COLUMN, (yyvsp[-1].lex_str).str, (yyvsp[-2].num)));
if (unlikely(ad == NULL))
MYSQL_YYABORT;
lex->alter_info.drop_list.push_back(ad, thd->mem_root);
lex->alter_info.flags|= ALTER_PARSER_DROP_COLUMN;
}
#line 37114 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1115: /* alter_list_item: DROP CONSTRAINT opt_if_exists_table_element field_ident */
#line 7623 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
Alter_drop *ad= (new (thd->mem_root)
Alter_drop(Alter_drop::CHECK_CONSTRAINT,
(yyvsp[0].lex_str).str, (yyvsp[-1].num)));
if (unlikely(ad == NULL))
MYSQL_YYABORT;
lex->alter_info.drop_list.push_back(ad, thd->mem_root);
lex->alter_info.flags|= ALTER_DROP_CHECK_CONSTRAINT;
}
#line 37129 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1116: /* alter_list_item: DROP FOREIGN KEY_SYM opt_if_exists_table_element field_ident */
#line 7634 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
Alter_drop *ad= (new (thd->mem_root)
Alter_drop(Alter_drop::FOREIGN_KEY, (yyvsp[0].lex_str).str, (yyvsp[-1].num)));
if (unlikely(ad == NULL))
MYSQL_YYABORT;
lex->alter_info.drop_list.push_back(ad, thd->mem_root);
lex->alter_info.flags|= ALTER_DROP_FOREIGN_KEY;
}
#line 37143 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1117: /* alter_list_item: DROP opt_constraint_no_id PRIMARY_SYM KEY_SYM */
#line 7644 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
Alter_drop *ad= (new (thd->mem_root)
Alter_drop(Alter_drop::KEY, primary_key_name.str,
FALSE));
if (unlikely(ad == NULL))
MYSQL_YYABORT;
lex->alter_info.drop_list.push_back(ad, thd->mem_root);
lex->alter_info.flags|= ALTER_DROP_INDEX;
}
#line 37158 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1118: /* alter_list_item: DROP key_or_index opt_if_exists_table_element field_ident */
#line 7655 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
Alter_drop *ad= (new (thd->mem_root)
Alter_drop(Alter_drop::KEY, (yyvsp[0].lex_str).str, (yyvsp[-1].num)));
if (unlikely(ad == NULL))
MYSQL_YYABORT;
lex->alter_info.drop_list.push_back(ad, thd->mem_root);
lex->alter_info.flags|= ALTER_DROP_INDEX;
}
#line 37172 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1119: /* alter_list_item: DISABLE_SYM KEYS */
#line 7665 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->alter_info.keys_onoff= Alter_info::DISABLE;
lex->alter_info.flags|= ALTER_KEYS_ONOFF;
}
#line 37182 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1120: /* alter_list_item: ENABLE_SYM KEYS */
#line 7671 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->alter_info.keys_onoff= Alter_info::ENABLE;
lex->alter_info.flags|= ALTER_KEYS_ONOFF;
}
#line 37192 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1121: /* alter_list_item: ALTER opt_column opt_if_exists_table_element field_ident SET DEFAULT column_default_expr */
#line 7677 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (check_expression((yyvsp[0].virtual_column), &(yyvsp[-3].lex_str), VCOL_DEFAULT))
MYSQL_YYABORT;
if (unlikely(Lex->add_alter_list((yyvsp[-3].lex_str), (yyvsp[0].virtual_column), (yyvsp[-4].num))))
MYSQL_YYABORT;
}
#line 37203 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1122: /* alter_list_item: ALTER key_or_index opt_if_exists_table_element ident ignorability */
#line 7684 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
Alter_index_ignorability *ac= new (thd->mem_root)
Alter_index_ignorability((yyvsp[-1].ident_sys).str, (yyvsp[0].num), (yyvsp[-2].num));
if (ac == NULL)
MYSQL_YYABORT;
lex->alter_info.alter_index_ignorability_list.push_back(ac);
lex->alter_info.flags|= ALTER_INDEX_IGNORABILITY;
}
#line 37217 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1123: /* alter_list_item: ALTER opt_column opt_if_exists_table_element field_ident DROP DEFAULT */
#line 7694 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->add_alter_list((yyvsp[-2].lex_str), (Virtual_column_info*) 0, (yyvsp[-3].num))))
MYSQL_YYABORT;
}
#line 37226 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1124: /* alter_list_item: RENAME opt_to table_ident */
#line 7699 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_alter_table((yyvsp[0].table)))
MYSQL_YYABORT;
Lex->alter_info.flags|= ALTER_RENAME;
}
#line 37236 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1125: /* alter_list_item: RENAME COLUMN_SYM opt_if_exists_table_element ident TO_SYM ident */
#line 7705 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->add_alter_list((yyvsp[-2].ident_sys), (yyvsp[0].ident_sys), (yyvsp[-3].num))))
MYSQL_YYABORT;
}
#line 37245 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1126: /* alter_list_item: RENAME key_or_index opt_if_exists_table_element field_ident TO_SYM field_ident */
#line 7710 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
Alter_rename_key *ak= new (thd->mem_root)
Alter_rename_key((yyvsp[-2].lex_str), (yyvsp[0].lex_str), (yyvsp[-3].num));
if (ak == NULL)
MYSQL_YYABORT;
lex->alter_info.alter_rename_key_list.push_back(ak);
lex->alter_info.flags|= ALTER_RENAME_INDEX;
}
#line 37259 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1127: /* alter_list_item: CONVERT_SYM TO_SYM charset charset_name_or_default */
#line 7720 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->add_alter_list_item_convert_to_charset((yyvsp[0].charset)))
MYSQL_YYABORT;
}
#line 37268 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1128: /* alter_list_item: CONVERT_SYM TO_SYM charset charset_name_or_default COLLATE_SYM collation_name_or_default */
#line 7726 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->add_alter_list_item_convert_to_charset((yyvsp[-2].charset), (yyvsp[0].Lex_extended_collation)))
MYSQL_YYABORT;
}
#line 37277 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1129: /* alter_list_item: create_table_options_space_separated */
#line 7731 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->alter_info.flags|= ALTER_OPTIONS;
}
#line 37286 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1130: /* alter_list_item: FORCE_SYM */
#line 7736 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.flags|= ALTER_RECREATE;
}
#line 37294 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1131: /* alter_list_item: alter_order_clause */
#line 7740 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->alter_info.flags|= ALTER_ORDER;
}
#line 37303 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1134: /* alter_list_item: ADD SYSTEM VERSIONING_SYM */
#line 7747 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.flags|= ALTER_ADD_SYSTEM_VERSIONING;
Lex->create_info.options|= HA_VERSIONED_TABLE;
}
#line 37312 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1135: /* alter_list_item: DROP SYSTEM VERSIONING_SYM */
#line 7752 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.flags|= ALTER_DROP_SYSTEM_VERSIONING;
Lex->create_info.options&= ~HA_VERSIONED_TABLE;
}
#line 37321 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1136: /* alter_list_item: DROP PERIOD_SYM FOR_SYSTEM_TIME_SYM */
#line 7757 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.flags|= ALTER_DROP_PERIOD;
}
#line 37329 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1137: /* alter_list_item: DROP PERIOD_SYM opt_if_exists_table_element FOR_SYM ident */
#line 7761 "/home/buildbot/git/sql/sql_yacc.yy"
{
Alter_drop *ad= new Alter_drop(Alter_drop::PERIOD, (yyvsp[0].ident_sys).str, (yyvsp[-2].num));
if (unlikely(ad == NULL))
MYSQL_YYABORT;
Lex->alter_info.drop_list.push_back(ad, thd->mem_root);
Lex->alter_info.flags|= ALTER_DROP_CHECK_CONSTRAINT;
}
#line 37341 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1143: /* alter_algorithm_option: ALGORITHM_SYM opt_equal DEFAULT */
#line 7780 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.set_requested_algorithm(
Alter_info::ALTER_TABLE_ALGORITHM_DEFAULT);
}
#line 37350 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1144: /* alter_algorithm_option: ALGORITHM_SYM opt_equal ident */
#line 7785 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->alter_info.set_requested_algorithm(&(yyvsp[0].ident_sys))))
my_yyabort_error((ER_UNKNOWN_ALTER_ALGORITHM, MYF(0), (yyvsp[0].ident_sys).str));
}
#line 37359 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1145: /* alter_lock_option: LOCK_SYM opt_equal DEFAULT */
#line 7793 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.requested_lock=
Alter_info::ALTER_TABLE_LOCK_DEFAULT;
}
#line 37368 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1146: /* alter_lock_option: LOCK_SYM opt_equal ident */
#line 7798 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->alter_info.set_requested_lock(&(yyvsp[0].ident_sys))))
my_yyabort_error((ER_UNKNOWN_ALTER_LOCK, MYF(0), (yyvsp[0].ident_sys).str));
}
#line 37377 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1147: /* opt_column: %empty */
#line 7805 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37383 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1148: /* opt_column: COLUMN_SYM */
#line 7806 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37389 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1149: /* opt_ignore: %empty */
#line 7810 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ignore= 0;}
#line 37395 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1150: /* opt_ignore: IGNORE_SYM */
#line 7811 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ignore= 1;}
#line 37401 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1151: /* $@114: %empty */
#line 7815 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ignore= 0;}
#line 37407 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1157: /* alter_option: IGNORE_SYM */
#line 7829 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ignore= 1;}
#line 37413 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1158: /* alter_option: ONLINE_SYM */
#line 7831 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.requested_lock=
Alter_info::ALTER_TABLE_LOCK_NONE;
}
#line 37422 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1159: /* opt_restrict: %empty */
#line 7838 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->drop_mode= DROP_DEFAULT; }
#line 37428 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1160: /* opt_restrict: RESTRICT */
#line 7839 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->drop_mode= DROP_RESTRICT; }
#line 37434 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1161: /* opt_restrict: CASCADE */
#line 7840 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->drop_mode= DROP_CASCADE; }
#line 37440 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1162: /* opt_place: %empty */
#line 7844 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= null_clex_str; }
#line 37446 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1163: /* opt_place: AFTER_SYM ident */
#line 7846 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.lex_str)= (yyvsp[0].ident_sys);
Lex->alter_info.flags |= ALTER_COLUMN_ORDER;
}
#line 37455 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1164: /* opt_place: FIRST_SYM */
#line 7851 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.lex_str).str= first_keyword;
(yyval.lex_str).length= 5; /* Length of "first" */
Lex->alter_info.flags |= ALTER_COLUMN_ORDER;
}
#line 37465 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1165: /* opt_to: %empty */
#line 7859 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37471 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1166: /* opt_to: TO_SYM */
#line 7860 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37477 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1167: /* opt_to: '=' */
#line 7861 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37483 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1168: /* opt_to: AS */
#line 7862 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37489 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1169: /* $@115: %empty */
#line 7867 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command = SQLCOM_SLAVE_START;
lex->type = 0;
/* If you change this code don't forget to update SLAVE START too */
}
#line 37500 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1170: /* slave: START_SYM SLAVE optional_connection_name slave_thread_opts optional_for_channel $@115 slave_until */
#line 7874 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37506 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1171: /* $@116: %empty */
#line 7876 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command = SQLCOM_SLAVE_ALL_START;
lex->type = 0;
/* If you change this code don't forget to update STOP SLAVE too */
}
#line 37517 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1172: /* slave: START_SYM ALL SLAVES slave_thread_opts $@116 */
#line 7882 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37523 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1173: /* slave: STOP_SYM SLAVE optional_connection_name slave_thread_opts optional_for_channel */
#line 7884 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command = SQLCOM_SLAVE_STOP;
lex->type = 0;
/* If you change this code don't forget to update SLAVE STOP too */
}
#line 37534 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1174: /* slave: STOP_SYM ALL SLAVES slave_thread_opts */
#line 7891 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command = SQLCOM_SLAVE_ALL_STOP;
lex->type = 0;
/* If you change this code don't forget to update SLAVE STOP too */
}
#line 37545 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1175: /* start: START_SYM TRANSACTION_SYM opt_start_transaction_option_list */
#line 7901 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_BEGIN;
/* READ ONLY and READ WRITE are mutually exclusive. */
if (unlikely(((yyvsp[0].num) & MYSQL_START_TRANS_OPT_READ_WRITE) &&
((yyvsp[0].num) & MYSQL_START_TRANS_OPT_READ_ONLY)))
{
thd->parse_error();
MYSQL_YYABORT;
}
lex->start_transaction_opt= (yyvsp[0].num);
}
#line 37562 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1176: /* opt_start_transaction_option_list: %empty */
#line 7917 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= 0;
}
#line 37570 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1177: /* opt_start_transaction_option_list: start_transaction_option_list */
#line 7921 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= (yyvsp[0].num);
}
#line 37578 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1178: /* start_transaction_option_list: start_transaction_option */
#line 7928 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= (yyvsp[0].num);
}
#line 37586 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1179: /* start_transaction_option_list: start_transaction_option_list ',' start_transaction_option */
#line 7932 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= (yyvsp[-2].num) | (yyvsp[0].num);
}
#line 37594 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1180: /* start_transaction_option: WITH CONSISTENT_SYM SNAPSHOT_SYM */
#line 7939 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= MYSQL_START_TRANS_OPT_WITH_CONS_SNAPSHOT;
}
#line 37602 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1181: /* start_transaction_option: READ_SYM ONLY_SYM */
#line 7943 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= MYSQL_START_TRANS_OPT_READ_ONLY;
}
#line 37610 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1182: /* start_transaction_option: READ_SYM WRITE_SYM */
#line 7947 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= MYSQL_START_TRANS_OPT_READ_WRITE;
}
#line 37618 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1183: /* $@117: %empty */
#line 7953 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->slave_thd_opt= 0; }
#line 37624 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1184: /* slave_thread_opts: $@117 slave_thread_opt_list */
#line 7955 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37630 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1187: /* slave_thread_opt: %empty */
#line 7964 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37636 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1188: /* slave_thread_opt: SQL_THREAD */
#line 7965 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->slave_thd_opt|=SLAVE_SQL; }
#line 37642 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1189: /* slave_thread_opt: RELAY_THREAD */
#line 7966 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->slave_thd_opt|=SLAVE_IO; }
#line 37648 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1190: /* slave_until: %empty */
#line 7970 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37654 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1191: /* slave_until: UNTIL_SYM slave_until_opts */
#line 7972 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
if (unlikely(((lex->mi.log_file_name || lex->mi.pos) &&
(lex->mi.relay_log_name || lex->mi.relay_log_pos)) ||
!((lex->mi.log_file_name && lex->mi.pos) ||
(lex->mi.relay_log_name && lex->mi.relay_log_pos))))
my_yyabort_error((ER_BAD_SLAVE_UNTIL_COND, MYF(0)));
}
#line 37667 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1192: /* slave_until: UNTIL_SYM MASTER_GTID_POS_SYM '=' TEXT_STRING_sys */
#line 7981 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->mi.gtid_pos_str = (yyvsp[0].lex_str);
}
#line 37675 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1195: /* $@118: %empty */
#line 7993 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command = SQLCOM_CHECKSUM;
/* Will be overridden during execution. */
YYPS->m_lock_type= TL_UNLOCK;
}
#line 37686 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1196: /* checksum: CHECKSUM_SYM table_or_tables $@118 table_list opt_checksum_type */
#line 8000 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37692 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1197: /* opt_checksum_type: %empty */
#line 8004 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags= 0; }
#line 37698 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1198: /* opt_checksum_type: QUICK */
#line 8005 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags= T_QUICK; }
#line 37704 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1199: /* opt_checksum_type: EXTENDED_SYM */
#line 8006 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags= T_EXTEND; }
#line 37710 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1201: /* $@119: %empty */
#line 8012 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->table_type= TABLE_TYPE_VIEW; }
#line 37716 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1203: /* $@120: %empty */
#line 8018 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command = SQLCOM_REPAIR;
lex->no_write_to_binlog= (yyvsp[0].num);
lex->check_opt.init();
lex->alter_info.reset();
/* Will be overridden during execution. */
YYPS->m_lock_type= TL_UNLOCK;
}
#line 37730 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1204: /* repair: REPAIR opt_no_write_to_binlog $@120 repair_table_or_view */
#line 8028 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX* lex= thd->lex;
DBUG_ASSERT(!lex->m_sql_cmd);
lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_repair_table();
if (unlikely(lex->m_sql_cmd == NULL))
MYSQL_YYABORT;
}
#line 37742 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1205: /* opt_mi_repair_type: %empty */
#line 8038 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags = T_MEDIUM; }
#line 37748 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1206: /* opt_mi_repair_type: mi_repair_types */
#line 8039 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37754 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1207: /* mi_repair_types: mi_repair_type */
#line 8043 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37760 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1208: /* mi_repair_types: mi_repair_type mi_repair_types */
#line 8044 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37766 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1209: /* mi_repair_type: QUICK */
#line 8048 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags|= T_QUICK; }
#line 37772 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1210: /* mi_repair_type: EXTENDED_SYM */
#line 8049 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags|= T_EXTEND; }
#line 37778 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1211: /* mi_repair_type: USE_FRM */
#line 8050 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.sql_flags|= TT_USEFRM; }
#line 37784 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1212: /* opt_view_repair_type: %empty */
#line 8054 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 37790 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1213: /* opt_view_repair_type: FOR_SYM UPGRADE_SYM */
#line 8055 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.sql_flags|= TT_FOR_UPGRADE; }
#line 37796 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1214: /* opt_view_repair_type: FROM MYSQL_SYM */
#line 8056 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.sql_flags|= TT_FROM_MYSQL; }
#line 37802 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1215: /* $@121: %empty */
#line 8061 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command = SQLCOM_ANALYZE;
lex->no_write_to_binlog= (yyvsp[-1].num);
lex->check_opt.init();
lex->alter_info.reset();
/* Will be overridden during execution. */
YYPS->m_lock_type= TL_UNLOCK;
}
#line 37816 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1216: /* analyze: ANALYZE_SYM opt_no_write_to_binlog table_or_tables $@121 analyze_table_list */
#line 8071 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX* lex= thd->lex;
DBUG_ASSERT(!lex->m_sql_cmd);
lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_analyze_table();
if (unlikely(lex->m_sql_cmd == NULL))
MYSQL_YYABORT;
}
#line 37828 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1220: /* opt_persistent_stat_clause: %empty */
#line 8091 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37834 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1221: /* opt_persistent_stat_clause: PERSISTENT_SYM FOR_SYM persistent_stat_spec */
#line 8093 "/home/buildbot/git/sql/sql_yacc.yy"
{
thd->lex->with_persistent_for_clause= TRUE;
}
#line 37842 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1222: /* persistent_stat_spec: ALL */
#line 8100 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37848 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1223: /* persistent_stat_spec: COLUMNS persistent_column_stat_spec INDEXES persistent_index_stat_spec */
#line 8102 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37854 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1224: /* persistent_column_stat_spec: ALL */
#line 8106 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37860 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1225: /* $@122: %empty */
#line 8108 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX* lex= thd->lex;
lex->column_list= new (thd->mem_root) List;
if (unlikely(lex->column_list == NULL))
MYSQL_YYABORT;
}
#line 37871 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1226: /* persistent_column_stat_spec: '(' $@122 table_column_list ')' */
#line 8116 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 37877 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1227: /* persistent_index_stat_spec: ALL */
#line 8120 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37883 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1228: /* $@123: %empty */
#line 8122 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX* lex= thd->lex;
lex->index_list= new (thd->mem_root) List;
if (unlikely(lex->index_list == NULL))
MYSQL_YYABORT;
}
#line 37894 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1229: /* persistent_index_stat_spec: '(' $@123 table_index_list ')' */
#line 8130 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 37900 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1230: /* table_column_list: %empty */
#line 8135 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37906 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1231: /* table_column_list: ident */
#line 8137 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->column_list->push_back((LEX_STRING*)
thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_STRING)), thd->mem_root);
}
#line 37915 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1232: /* table_column_list: table_column_list ',' ident */
#line 8142 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->column_list->push_back((LEX_STRING*)
thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_STRING)), thd->mem_root);
}
#line 37924 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1233: /* table_index_list: %empty */
#line 8150 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37930 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1236: /* table_index_name: ident */
#line 8157 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->index_list->push_back((LEX_STRING*)
thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_STRING)),
thd->mem_root);
}
#line 37940 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1237: /* table_index_name: PRIMARY_SYM */
#line 8164 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX_STRING str= {(char*) "PRIMARY", 7};
Lex->index_list->push_back((LEX_STRING*)
thd->memdup(&str, sizeof(LEX_STRING)),
thd->mem_root);
}
#line 37951 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1238: /* binlog_base64_event: BINLOG_SYM TEXT_STRING_sys */
#line 8174 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_BINLOG_BASE64_EVENT;
Lex->comment= (yyvsp[0].lex_str);
Lex->ident.str= NULL;
Lex->ident.length= 0;
}
#line 37962 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1239: /* binlog_base64_event: BINLOG_SYM '@' ident_or_text ',' '@' ident_or_text */
#line 8182 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_BINLOG_BASE64_EVENT;
Lex->comment= (yyvsp[-3].lex_str);
Lex->ident= (yyvsp[0].lex_str);
}
#line 37972 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1241: /* $@124: %empty */
#line 8192 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->table_type= TABLE_TYPE_VIEW; }
#line 37978 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1243: /* $@125: %empty */
#line 8197 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command = SQLCOM_CHECK;
lex->check_opt.init();
lex->alter_info.reset();
/* Will be overridden during execution. */
YYPS->m_lock_type= TL_UNLOCK;
}
#line 37992 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1244: /* check: CHECK_SYM $@125 check_view_or_table */
#line 8207 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX* lex= thd->lex;
if (unlikely(lex->sphead))
my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "CHECK"));
DBUG_ASSERT(!lex->m_sql_cmd);
lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_check_table();
if (unlikely(lex->m_sql_cmd == NULL))
MYSQL_YYABORT;
}
#line 38006 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1245: /* opt_mi_check_type: %empty */
#line 8219 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags = T_MEDIUM; }
#line 38012 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1246: /* opt_mi_check_type: mi_check_types */
#line 8220 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38018 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1247: /* mi_check_types: mi_check_type */
#line 8224 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38024 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1248: /* mi_check_types: mi_check_type mi_check_types */
#line 8225 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38030 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1249: /* mi_check_type: QUICK */
#line 8229 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags|= T_QUICK; }
#line 38036 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1250: /* mi_check_type: FAST_SYM */
#line 8230 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags|= T_FAST; }
#line 38042 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1251: /* mi_check_type: MEDIUM_SYM */
#line 8231 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags|= T_MEDIUM; }
#line 38048 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1252: /* mi_check_type: EXTENDED_SYM */
#line 8232 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags|= T_EXTEND; }
#line 38054 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1253: /* mi_check_type: CHANGED */
#line 8233 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags|= T_CHECK_ONLY_CHANGED; }
#line 38060 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1254: /* mi_check_type: FOR_SYM UPGRADE_SYM */
#line 8234 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.sql_flags|= TT_FOR_UPGRADE; }
#line 38066 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1255: /* opt_view_check_type: %empty */
#line 8238 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 38072 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1256: /* opt_view_check_type: FOR_SYM UPGRADE_SYM */
#line 8239 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.sql_flags|= TT_FOR_UPGRADE; }
#line 38078 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1257: /* $@126: %empty */
#line 8244 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command = SQLCOM_OPTIMIZE;
lex->no_write_to_binlog= (yyvsp[-1].num);
lex->check_opt.init();
lex->alter_info.reset();
/* Will be overridden during execution. */
YYPS->m_lock_type= TL_UNLOCK;
}
#line 38092 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1258: /* optimize: OPTIMIZE opt_no_write_to_binlog table_or_tables $@126 table_list opt_lock_wait_timeout */
#line 8254 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX* lex= thd->lex;
DBUG_ASSERT(!lex->m_sql_cmd);
lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_optimize_table();
if (unlikely(lex->m_sql_cmd == NULL))
MYSQL_YYABORT;
}
#line 38104 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1259: /* opt_no_write_to_binlog: %empty */
#line 8264 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 38110 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1260: /* opt_no_write_to_binlog: NO_WRITE_TO_BINLOG */
#line 8265 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 38116 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1261: /* opt_no_write_to_binlog: LOCAL_SYM */
#line 8266 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 38122 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1262: /* $@127: %empty */
#line 8271 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command= SQLCOM_RENAME_TABLE;
Lex->create_info.set((yyvsp[0].object_ddl_options));
if (Lex->main_select_push())
MYSQL_YYABORT;
}
#line 38133 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1263: /* rename: RENAME table_or_tables opt_if_exists $@127 table_to_table_list */
#line 8278 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->pop_select(); //main select
}
#line 38141 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1264: /* rename: RENAME USER_SYM clear_privileges rename_list */
#line 8282 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_RENAME_USER;
}
#line 38149 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1265: /* rename_list: user TO_SYM user */
#line 8289 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->users_list.push_back((yyvsp[-2].lex_user), thd->mem_root) ||
Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
MYSQL_YYABORT;
}
#line 38159 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1266: /* rename_list: rename_list ',' user TO_SYM user */
#line 8295 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->users_list.push_back((yyvsp[-2].lex_user), thd->mem_root) ||
Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
MYSQL_YYABORT;
}
#line 38169 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1269: /* table_to_table: table_ident opt_lock_wait_timeout TO_SYM table_ident */
#line 8309 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
SELECT_LEX *sl= lex->current_select;
if (unlikely(!sl->add_table_to_list(thd, (yyvsp[-3].table),NULL,
TL_OPTION_UPDATING,
TL_IGNORE, MDL_EXCLUSIVE)) ||
unlikely(!sl->add_table_to_list(thd, (yyvsp[0].table), NULL,
TL_OPTION_UPDATING,
TL_IGNORE, MDL_EXCLUSIVE)))
MYSQL_YYABORT;
}
#line 38185 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1270: /* $@128: %empty */
#line 8324 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.reset();
}
#line 38193 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1271: /* keycache: CACHE_SYM INDEX_SYM $@128 keycache_list_or_parts IN_SYM key_cache_name */
#line 8328 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_ASSIGN_TO_KEYCACHE;
lex->ident= (yyvsp[0].lex_str);
}
#line 38203 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1276: /* assign_to_keycache: table_ident cache_keys_spec */
#line 8347 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!Select->add_table_to_list(thd, (yyvsp[-1].table), NULL, 0, TL_READ,
MDL_SHARED_READ,
Select->
pop_index_hints())))
MYSQL_YYABORT;
}
#line 38215 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1277: /* assign_to_keycache_parts: table_ident adm_partition cache_keys_spec */
#line 8358 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!Select->add_table_to_list(thd, (yyvsp[-2].table), NULL, 0, TL_READ,
MDL_SHARED_READ,
Select->
pop_index_hints())))
MYSQL_YYABORT;
}
#line 38227 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1278: /* key_cache_name: ident */
#line 8368 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= (yyvsp[0].ident_sys); }
#line 38233 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1279: /* key_cache_name: DEFAULT */
#line 8369 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str) = default_key_cache_base; }
#line 38239 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1280: /* $@129: %empty */
#line 8374 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command=SQLCOM_PRELOAD_KEYS;
lex->alter_info.reset();
if (lex->main_select_push())
MYSQL_YYABORT;
}
#line 38251 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1281: /* preload: LOAD INDEX_SYM INTO CACHE_SYM $@129 preload_list_or_parts */
#line 8382 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->pop_select(); //main select
}
#line 38259 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1286: /* preload_keys: table_ident cache_keys_spec opt_ignore_leaves */
#line 8399 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!Select->add_table_to_list(thd, (yyvsp[-2].table), NULL, (yyvsp[0].num), TL_READ,
MDL_SHARED_READ,
Select->
pop_index_hints())))
MYSQL_YYABORT;
}
#line 38271 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1287: /* preload_keys_parts: table_ident adm_partition cache_keys_spec opt_ignore_leaves */
#line 8410 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!Select->add_table_to_list(thd, (yyvsp[-3].table), NULL, (yyvsp[0].num), TL_READ,
MDL_SHARED_READ,
Select->
pop_index_hints())))
MYSQL_YYABORT;
}
#line 38283 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1288: /* $@130: %empty */
#line 8421 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.partition_flags|= ALTER_PARTITION_ADMIN;
}
#line 38291 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1290: /* $@131: %empty */
#line 8428 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->first_select_lex()->alloc_index_hints(thd);
Select->set_index_hint_type(INDEX_HINT_USE,
INDEX_HINT_MASK_ALL);
}
#line 38301 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1292: /* cache_key_list_or_empty: %empty */
#line 8437 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 38307 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1294: /* opt_ignore_leaves: %empty */
#line 8443 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 38313 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1295: /* opt_ignore_leaves: IGNORE_SYM LEAVES */
#line 8444 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= TL_OPTION_IGNORE_LEAVES; }
#line 38319 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1296: /* $@132: %empty */
#line 8454 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->push_select((yyvsp[0].select_lex_unit)->fake_select_lex ?
(yyvsp[0].select_lex_unit)->fake_select_lex :
(yyvsp[0].select_lex_unit)->first_select()))
MYSQL_YYABORT;
}
#line 38330 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1297: /* select: query_expression_no_with_clause $@132 opt_procedure_or_into */
#line 8461 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->pop_select();
(yyvsp[-2].select_lex_unit)->set_with_clause(NULL);
if (Lex->select_finalize((yyvsp[-2].select_lex_unit), (yyvsp[0].select_lock)))
MYSQL_YYABORT;
}
#line 38341 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1298: /* $@133: %empty */
#line 8468 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->push_select((yyvsp[0].select_lex_unit)->fake_select_lex ?
(yyvsp[0].select_lex_unit)->fake_select_lex :
(yyvsp[0].select_lex_unit)->first_select()))
MYSQL_YYABORT;
}
#line 38352 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1299: /* select: with_clause query_expression_no_with_clause $@133 opt_procedure_or_into */
#line 8475 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->pop_select();
(yyvsp[-2].select_lex_unit)->set_with_clause((yyvsp[-3].with_clause));
(yyvsp[-3].with_clause)->attach_to((yyvsp[-2].select_lex_unit)->first_select());
if (Lex->select_finalize((yyvsp[-2].select_lex_unit), (yyvsp[0].select_lock)))
MYSQL_YYABORT;
}
#line 38364 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1300: /* $@134: %empty */
#line 8486 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->push_select((yyvsp[0].select_lex)))
MYSQL_YYABORT;
}
#line 38373 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1301: /* select_into: select_into_query_specification $@134 opt_order_limit_lock */
#line 8491 "/home/buildbot/git/sql/sql_yacc.yy"
{
SELECT_LEX_UNIT *unit;
if (!(unit = Lex->create_unit((yyvsp[-2].select_lex))))
MYSQL_YYABORT;
if ((yyvsp[0].order_limit_lock))
unit= Lex->add_tail_to_query_expression_body(unit, (yyvsp[0].order_limit_lock));
if (Lex->select_finalize(unit))
MYSQL_YYABORT;
}
#line 38387 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1302: /* $@135: %empty */
#line 8502 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->push_select((yyvsp[0].select_lex)))
MYSQL_YYABORT;
}
#line 38396 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1303: /* select_into: with_clause select_into_query_specification $@135 opt_order_limit_lock */
#line 8507 "/home/buildbot/git/sql/sql_yacc.yy"
{
SELECT_LEX_UNIT *unit;
if (!(unit = Lex->create_unit((yyvsp[-2].select_lex))))
MYSQL_YYABORT;
if ((yyvsp[0].order_limit_lock))
unit= Lex->add_tail_to_query_expression_body(unit, (yyvsp[0].order_limit_lock));
unit->set_with_clause((yyvsp[-3].with_clause));
(yyvsp[-3].with_clause)->attach_to((yyvsp[-2].select_lex));
if (Lex->select_finalize(unit))
MYSQL_YYABORT;
}
#line 38412 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1304: /* simple_table: query_specification */
#line 8521 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_lex)= (yyvsp[0].select_lex); }
#line 38418 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1305: /* simple_table: table_value_constructor */
#line 8522 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_lex)= (yyvsp[0].select_lex); }
#line 38424 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1306: /* $@136: %empty */
#line 8527 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->parsed_TVC_start())
MYSQL_YYABORT;
}
#line 38433 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1307: /* table_value_constructor: VALUES $@136 values_list */
#line 8532 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.select_lex)= Lex->parsed_TVC_end()))
MYSQL_YYABORT;
}
#line 38442 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1308: /* $@137: %empty */
#line 8540 "/home/buildbot/git/sql/sql_yacc.yy"
{
SELECT_LEX *sel;
LEX *lex= Lex;
if (!(sel= lex->alloc_select(TRUE)) || lex->push_select(sel))
MYSQL_YYABORT;
sel->init_select();
sel->braces= FALSE;
}
#line 38455 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1309: /* $@138: %empty */
#line 8549 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->parsing_place= SELECT_LIST;
}
#line 38463 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1310: /* query_specification_start: SELECT_SYM $@137 select_options $@138 select_item_list */
#line 8553 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->parsing_place= NO_MATTER;
}
#line 38471 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1311: /* query_specification: query_specification_start opt_from_clause opt_where_clause opt_group_clause opt_having_clause opt_window_clause */
#line 8565 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lex)= Lex->pop_select();
}
#line 38479 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1312: /* select_into_query_specification: query_specification_start into opt_from_clause opt_where_clause opt_group_clause opt_having_clause opt_window_clause */
#line 8578 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lex)= Lex->pop_select();
}
#line 38487 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1313: /* query_expression: query_expression_no_with_clause */
#line 8636 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[0].select_lex_unit)->set_with_clause(NULL);
(yyval.select_lex_unit)= (yyvsp[0].select_lex_unit);
}
#line 38496 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1314: /* query_expression: with_clause query_expression_no_with_clause */
#line 8642 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[0].select_lex_unit)->set_with_clause((yyvsp[-1].with_clause));
(yyvsp[-1].with_clause)->attach_to((yyvsp[0].select_lex_unit)->first_select());
(yyval.select_lex_unit)= (yyvsp[0].select_lex_unit);
}
#line 38506 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1315: /* query_expression_no_with_clause: query_expression_body_ext */
#line 8655 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_lex_unit)= (yyvsp[0].select_lex_unit); }
#line 38512 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1316: /* query_expression_no_with_clause: query_expression_body_ext_parens */
#line 8656 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_lex_unit)= (yyvsp[0].select_lex_unit); }
#line 38518 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1317: /* $@139: %empty */
#line 8671 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyvsp[0].select_lex_unit)->first_select()->next_select())
{
if (Lex->parsed_multi_operand_query_expression_body((yyvsp[0].select_lex_unit)))
MYSQL_YYABORT;
}
}
#line 38530 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1318: /* query_expression_body_ext: query_expression_body $@139 opt_query_expression_tail */
#line 8679 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!(yyvsp[0].order_limit_lock))
(yyval.select_lex_unit)= (yyvsp[-2].select_lex_unit);
else
(yyval.select_lex_unit)= Lex->add_tail_to_query_expression_body((yyvsp[-2].select_lex_unit), (yyvsp[0].order_limit_lock));
}
#line 38541 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1319: /* $@140: %empty */
#line 8686 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->push_select(!(yyvsp[0].select_lex_unit)->first_select()->next_select() ?
(yyvsp[0].select_lex_unit)->first_select() : (yyvsp[0].select_lex_unit)->fake_select_lex);
}
#line 38550 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1320: /* query_expression_body_ext: query_expression_body_ext_parens $@140 query_expression_tail */
#line 8691 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.select_lex_unit)= Lex->add_tail_to_query_expression_body_ext_parens((yyvsp[-2].select_lex_unit), (yyvsp[0].order_limit_lock))))
MYSQL_YYABORT;
}
#line 38559 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1321: /* query_expression_body_ext_parens: '(' query_expression_body_ext_parens ')' */
#line 8699 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_lex_unit)= (yyvsp[-1].select_lex_unit); }
#line 38565 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1322: /* query_expression_body_ext_parens: '(' query_expression_body_ext ')' */
#line 8701 "/home/buildbot/git/sql/sql_yacc.yy"
{
SELECT_LEX *sel= (yyvsp[-1].select_lex_unit)->first_select()->next_select() ?
(yyvsp[-1].select_lex_unit)->fake_select_lex : (yyvsp[-1].select_lex_unit)->first_select();
sel->braces= true;
(yyval.select_lex_unit)= (yyvsp[-1].select_lex_unit);
}
#line 38576 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1323: /* query_expression_body: query_simple */
#line 8716 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->push_select((yyvsp[0].select_lex));
if (!((yyval.select_lex_unit)= Lex->create_unit((yyvsp[0].select_lex))))
MYSQL_YYABORT;
}
#line 38586 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1324: /* $@141: %empty */
#line 8723 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!(yyvsp[-1].select_lex_unit)->first_select()->next_select())
{
Lex->pop_select();
}
}
#line 38597 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1325: /* query_expression_body: query_expression_body unit_type_decl $@141 query_primary */
#line 8730 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.select_lex_unit)= Lex->add_primary_to_query_expression_body((yyvsp[-3].select_lex_unit), (yyvsp[0].select_lex),
(yyvsp[-2].unit_operation).unit_type,
(yyvsp[-2].unit_operation).distinct)))
MYSQL_YYABORT;
}
#line 38608 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1326: /* query_expression_body: query_expression_body_ext_parens unit_type_decl query_primary */
#line 8739 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.select_lex_unit)= Lex->add_primary_to_query_expression_body_ext_parens(
(yyvsp[-2].select_lex_unit), (yyvsp[0].select_lex),
(yyvsp[-1].unit_operation).unit_type,
(yyvsp[-1].unit_operation).distinct)))
MYSQL_YYABORT;
}
#line 38620 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1327: /* query_primary: query_simple */
#line 8755 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_lex)= (yyvsp[0].select_lex); }
#line 38626 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1328: /* query_primary: query_expression_body_ext_parens */
#line 8757 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_lex)= (yyvsp[0].select_lex_unit)->first_select(); }
#line 38632 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1329: /* query_simple: simple_table */
#line 8766 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_lex)= (yyvsp[0].select_lex);}
#line 38638 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1330: /* subselect: query_expression */
#line 8771 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.select_lex)= Lex->parsed_subselect((yyvsp[0].select_lex_unit))))
MYSQL_YYABORT;
}
#line 38647 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1331: /* subquery: query_expression_body_ext_parens */
#line 8812 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!(yyvsp[0].select_lex_unit)->fake_select_lex)
(yyvsp[0].select_lex_unit)->first_select()->braces= false;
else
(yyvsp[0].select_lex_unit)->fake_select_lex->braces= false;
if (!((yyval.select_lex)= Lex->parsed_subselect((yyvsp[0].select_lex_unit))))
MYSQL_YYABORT;
}
#line 38660 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1332: /* subquery: '(' with_clause query_expression_no_with_clause ')' */
#line 8821 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[-1].select_lex_unit)->set_with_clause((yyvsp[-2].with_clause));
(yyvsp[-2].with_clause)->attach_to((yyvsp[-1].select_lex_unit)->first_select());
if (!((yyval.select_lex)= Lex->parsed_subselect((yyvsp[-1].select_lex_unit))))
MYSQL_YYABORT;
}
#line 38671 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1336: /* table_reference_list: join_table_list */
#line 8840 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->context.table_list=
Select->context.first_name_resolution_table=
Select->table_list.first;
}
#line 38681 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1339: /* select_options: select_option_list */
#line 8855 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((Select->options & SELECT_DISTINCT) &&
(Select->options & SELECT_ALL)))
my_yyabort_error((ER_WRONG_USAGE, MYF(0), "ALL", "DISTINCT"));
}
#line 38691 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1340: /* opt_history_unit: %empty */
#line 8864 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.vers_range_unit)= VERS_TIMESTAMP;
}
#line 38699 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1341: /* opt_history_unit: TRANSACTION_SYM */
#line 8868 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.vers_range_unit)= VERS_TRX_ID;
}
#line 38707 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1342: /* opt_history_unit: TIMESTAMP */
#line 8872 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.vers_range_unit)= VERS_TIMESTAMP;
}
#line 38715 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1343: /* history_point: TIMESTAMP TEXT_STRING */
#line 8879 "/home/buildbot/git/sql/sql_yacc.yy"
{
Item *item;
if (!(item= type_handler_datetime.create_literal_item(thd,
(yyvsp[0].lex_string_with_metadata).str, (yyvsp[0].lex_string_with_metadata).length,
YYCSCL, true)))
MYSQL_YYABORT;
(yyval.vers_history_point)= Vers_history_point(VERS_TIMESTAMP, item);
}
#line 38728 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1344: /* history_point: function_call_keyword_timestamp */
#line 8888 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.vers_history_point)= Vers_history_point(VERS_TIMESTAMP, (yyvsp[0].item));
}
#line 38736 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1345: /* history_point: opt_history_unit bit_expr */
#line 8892 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.vers_history_point)= Vers_history_point((yyvsp[-1].vers_range_unit), (yyvsp[0].item));
}
#line 38744 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1346: /* for_portion_of_time_clause: FOR_SYM PORTION_SYM OF_SYM remember_tok_start ident FROM bit_expr TO_SYM bit_expr */
#line 8900 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(0 == strcasecmp((yyvsp[-4].ident_sys).str, "SYSTEM_TIME")))
{
thd->parse_error(ER_SYNTAX_ERROR, (yyvsp[-5].simple_string));
MYSQL_YYABORT;
}
Lex->period_conditions.init(SYSTEM_TIME_FROM_TO,
Vers_history_point(VERS_TIMESTAMP, (yyvsp[-2].item)),
Vers_history_point(VERS_TIMESTAMP, (yyvsp[0].item)),
(yyvsp[-4].ident_sys));
}
#line 38760 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1347: /* opt_for_portion_of_time_clause: %empty */
#line 8915 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= false;
}
#line 38768 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1348: /* opt_for_portion_of_time_clause: for_portion_of_time_clause */
#line 8919 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= true;
}
#line 38776 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1349: /* opt_for_system_time_clause: %empty */
#line 8926 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= false;
}
#line 38784 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1350: /* opt_for_system_time_clause: FOR_SYSTEM_TIME_SYM system_time_expr */
#line 8930 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= true;
}
#line 38792 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1351: /* system_time_expr: AS OF_SYM history_point */
#line 8937 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->vers_conditions.init(SYSTEM_TIME_AS_OF, (yyvsp[0].vers_history_point));
}
#line 38800 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1352: /* system_time_expr: ALL */
#line 8941 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->vers_conditions.init(SYSTEM_TIME_ALL);
}
#line 38808 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1353: /* system_time_expr: FROM history_point TO_SYM history_point */
#line 8945 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->vers_conditions.init(SYSTEM_TIME_FROM_TO, (yyvsp[-2].vers_history_point), (yyvsp[0].vers_history_point));
}
#line 38816 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1354: /* system_time_expr: BETWEEN_SYM history_point AND_SYM history_point */
#line 8949 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->vers_conditions.init(SYSTEM_TIME_BETWEEN, (yyvsp[-2].vers_history_point), (yyvsp[0].vers_history_point));
}
#line 38824 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1358: /* select_option: SQL_NO_CACHE_SYM */
#line 8962 "/home/buildbot/git/sql/sql_yacc.yy"
{
/*
Allow this flag once per query.
*/
if (Select->options & OPTION_NO_QUERY_CACHE)
my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "SQL_NO_CACHE"));
Select->options|= OPTION_NO_QUERY_CACHE;
}
#line 38837 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1359: /* select_option: SQL_CACHE_SYM */
#line 8971 "/home/buildbot/git/sql/sql_yacc.yy"
{
/*
Allow this flag once per query.
*/
if (Select->options & OPTION_TO_QUERY_CACHE)
my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "SQL_CACHE"));
Select->options|= OPTION_TO_QUERY_CACHE;
}
#line 38850 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1360: /* select_lock_type: FOR_SYM UPDATE_SYM opt_lock_wait_timeout_new */
#line 8984 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lock)= (yyvsp[0].select_lock);
(yyval.select_lock).defined_lock= TRUE;
(yyval.select_lock).update_lock= TRUE;
}
#line 38860 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1361: /* select_lock_type: LOCK_SYM IN_SYM SHARE_SYM MODE_SYM opt_lock_wait_timeout_new */
#line 8990 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lock)= (yyvsp[0].select_lock);
(yyval.select_lock).defined_lock= TRUE;
(yyval.select_lock).update_lock= FALSE;
}
#line 38870 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1362: /* opt_select_lock_type: %empty */
#line 9000 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lock).empty();
}
#line 38878 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1363: /* opt_select_lock_type: select_lock_type */
#line 9004 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lock)= (yyvsp[0].select_lock);
}
#line 38886 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1364: /* opt_lock_wait_timeout_new: %empty */
#line 9011 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lock).empty();
}
#line 38894 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1365: /* opt_lock_wait_timeout_new: WAIT_SYM ulong_num */
#line 9015 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lock).empty();
(yyval.select_lock).defined_timeout= TRUE;
(yyval.select_lock).timeout= (yyvsp[0].ulong_num);
}
#line 38904 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1366: /* opt_lock_wait_timeout_new: NOWAIT_SYM */
#line 9021 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lock).empty();
(yyval.select_lock).defined_timeout= TRUE;
(yyval.select_lock).timeout= 0;
}
#line 38914 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1367: /* opt_lock_wait_timeout_new: SKIP_SYM LOCKED_SYM */
#line 9027 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lock).empty();
(yyval.select_lock).skip_locked= 1;
Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SKIP_LOCKED);
}
#line 38924 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1370: /* select_item_list: '*' */
#line 9038 "/home/buildbot/git/sql/sql_yacc.yy"
{
bool is_parsing_returning=
thd->lex->current_select->parsing_place ==
IN_RETURNING;
SELECT_LEX *correct_select= is_parsing_returning ?
thd->lex->returning() :
thd->lex->current_select;
Item *item= new (thd->mem_root)
Item_field(thd, &correct_select->context,
star_clex_str);
if (unlikely(item == NULL))
MYSQL_YYABORT;
if (unlikely(add_item_to_list(thd, item)))
MYSQL_YYABORT;
correct_select->with_wild++;
}
#line 38945 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1371: /* select_item: remember_name select_sublist_qualified_asterisk remember_end */
#line 9058 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(add_item_to_list(thd, (yyvsp[-1].item))))
MYSQL_YYABORT;
}
#line 38954 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1372: /* select_item: remember_name expr remember_end select_alias */
#line 9063 "/home/buildbot/git/sql/sql_yacc.yy"
{
DBUG_ASSERT((yyvsp[-3].simple_string) < (yyvsp[-1].simple_string));
if (unlikely(add_item_to_list(thd, (yyvsp[-2].item))))
MYSQL_YYABORT;
if ((yyvsp[0].lex_str).str)
{
if (unlikely(Lex->sql_command == SQLCOM_CREATE_VIEW &&
check_column_name((yyvsp[0].lex_str).str)))
my_yyabort_error((ER_WRONG_COLUMN_NAME, MYF(0), (yyvsp[0].lex_str).str));
(yyvsp[-2].item)->base_flags|= item_base_t::IS_EXPLICIT_NAME;
(yyvsp[-2].item)->set_name(thd, (yyvsp[0].lex_str));
}
else if (!(yyvsp[-2].item)->name.str || (yyvsp[-2].item)->name.str == item_empty_name)
{
(yyvsp[-2].item)->set_name(thd, (yyvsp[-3].simple_string), (uint) ((yyvsp[-1].simple_string) - (yyvsp[-3].simple_string)), thd->charset());
}
}
#line 38977 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1373: /* remember_tok_start: %empty */
#line 9084 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.simple_string)= (char*) YYLIP->get_tok_start();
}
#line 38985 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1374: /* remember_name: %empty */
#line 9090 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.simple_string)= (char*) YYLIP->get_cpp_tok_start();
}
#line 38993 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1375: /* remember_end: %empty */
#line 9096 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.simple_string)= (char*) YYLIP->get_cpp_tok_end_rtrim();
}
#line 39001 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1376: /* select_alias: %empty */
#line 9102 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=null_clex_str;}
#line 39007 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1377: /* select_alias: AS ident */
#line 9103 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].ident_sys); }
#line 39013 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1378: /* select_alias: AS TEXT_STRING_sys */
#line 9104 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].lex_str); }
#line 39019 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1379: /* select_alias: ident */
#line 9105 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].ident_sys); }
#line 39025 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1380: /* select_alias: TEXT_STRING_sys */
#line 9106 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].lex_str); }
#line 39031 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1381: /* opt_default_time_precision: %empty */
#line 9110 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= NOT_FIXED_DEC; }
#line 39037 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1382: /* opt_default_time_precision: '(' ')' */
#line 9111 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= NOT_FIXED_DEC; }
#line 39043 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1383: /* opt_default_time_precision: '(' real_ulong_num ')' */
#line 9112 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= (yyvsp[-1].ulong_num); }
#line 39049 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1384: /* opt_time_precision: %empty */
#line 9116 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 39055 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1385: /* opt_time_precision: '(' ')' */
#line 9117 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 39061 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1386: /* opt_time_precision: '(' real_ulong_num ')' */
#line 9118 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= (yyvsp[-1].ulong_num); }
#line 39067 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1387: /* optional_braces: %empty */
#line 9122 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 39073 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1388: /* optional_braces: '(' ')' */
#line 9123 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 39079 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1389: /* expr: expr or expr */
#line 9129 "/home/buildbot/git/sql/sql_yacc.yy"
{
/*
Design notes:
Do not use a manually maintained stack like thd->lex->xxx_list,
but use the internal bison stack ($$, $1 and $3) instead.
Using the bison stack is:
- more robust to changes in the grammar,
- guaranteed to be in sync with the parser state,
- better for performances (no memory allocation).
*/
Item_cond_or *item1;
Item_cond_or *item3;
if (is_cond_or((yyvsp[-2].item)))
{
item1= (Item_cond_or*) (yyvsp[-2].item);
if (is_cond_or((yyvsp[0].item)))
{
item3= (Item_cond_or*) (yyvsp[0].item);
/*
(X1 OR X2) OR (Y1 OR Y2) ==> OR (X1, X2, Y1, Y2)
*/
item3->add_at_head(item1->argument_list());
(yyval.item) = (yyvsp[0].item);
}
else
{
/*
(X1 OR X2) OR Y ==> OR (X1, X2, Y)
*/
item1->add((yyvsp[0].item), thd->mem_root);
(yyval.item) = (yyvsp[-2].item);
}
}
else if (is_cond_or((yyvsp[0].item)))
{
item3= (Item_cond_or*) (yyvsp[0].item);
/*
X OR (Y1 OR Y2) ==> OR (X, Y1, Y2)
*/
item3->add_at_head((yyvsp[-2].item), thd->mem_root);
(yyval.item) = (yyvsp[0].item);
}
else
{
/* X OR Y */
(yyval.item)= new (thd->mem_root) Item_cond_or(thd, (yyvsp[-2].item), (yyvsp[0].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
}
#line 39134 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1390: /* expr: expr XOR expr */
#line 9180 "/home/buildbot/git/sql/sql_yacc.yy"
{
/* XOR is a proprietary extension */
(yyval.item)= new (thd->mem_root) Item_func_xor(thd, (yyvsp[-2].item), (yyvsp[0].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39145 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1391: /* expr: expr and expr */
#line 9187 "/home/buildbot/git/sql/sql_yacc.yy"
{
/* See comments in rule expr: expr or expr */
Item_cond_and *item1;
Item_cond_and *item3;
if (is_cond_and((yyvsp[-2].item)))
{
item1= (Item_cond_and*) (yyvsp[-2].item);
if (is_cond_and((yyvsp[0].item)))
{
item3= (Item_cond_and*) (yyvsp[0].item);
/*
(X1 AND X2) AND (Y1 AND Y2) ==> AND (X1, X2, Y1, Y2)
*/
item3->add_at_head(item1->argument_list());
(yyval.item) = (yyvsp[0].item);
}
else
{
/*
(X1 AND X2) AND Y ==> AND (X1, X2, Y)
*/
item1->add((yyvsp[0].item), thd->mem_root);
(yyval.item) = (yyvsp[-2].item);
}
}
else if (is_cond_and((yyvsp[0].item)))
{
item3= (Item_cond_and*) (yyvsp[0].item);
/*
X AND (Y1 AND Y2) ==> AND (X, Y1, Y2)
*/
item3->add_at_head((yyvsp[-2].item), thd->mem_root);
(yyval.item) = (yyvsp[0].item);
}
else
{
/* X AND Y */
(yyval.item)= new (thd->mem_root) Item_cond_and(thd, (yyvsp[-2].item), (yyvsp[0].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
}
#line 39192 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1392: /* expr: NOT_SYM expr */
#line 9230 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= negate_expression(thd, (yyvsp[0].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39202 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1394: /* boolean_test: boolean_test IS TRUE_SYM */
#line 9240 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_istrue(thd, (yyvsp[-2].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39212 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1395: /* boolean_test: boolean_test IS not TRUE_SYM */
#line 9246 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_isnottrue(thd, (yyvsp[-3].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39222 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1396: /* boolean_test: boolean_test IS FALSE_SYM */
#line 9252 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_isfalse(thd, (yyvsp[-2].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39232 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1397: /* boolean_test: boolean_test IS not FALSE_SYM */
#line 9258 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_isnotfalse(thd, (yyvsp[-3].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39242 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1398: /* boolean_test: boolean_test IS UNKNOWN_SYM */
#line 9264 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_isnull(thd, (yyvsp[-2].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39252 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1399: /* boolean_test: boolean_test IS not UNKNOWN_SYM */
#line 9270 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_isnotnull(thd, (yyvsp[-3].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39262 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1400: /* boolean_test: boolean_test IS NULL_SYM */
#line 9276 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_isnull(thd, (yyvsp[-2].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39272 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1401: /* boolean_test: boolean_test IS not NULL_SYM */
#line 9282 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_isnotnull(thd, (yyvsp[-3].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39282 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1402: /* boolean_test: boolean_test EQUAL_SYM predicate */
#line 9288 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_equal(thd, (yyvsp[-2].item), (yyvsp[0].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39292 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1403: /* boolean_test: boolean_test comp_op predicate */
#line 9294 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= (*(yyvsp[-1].boolfunc2creator))(0)->create(thd, (yyvsp[-2].item), (yyvsp[0].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39302 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1404: /* boolean_test: boolean_test comp_op all_or_any '(' subselect ')' */
#line 9300 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= all_any_subquery_creator(thd, (yyvsp[-5].item), (yyvsp[-4].boolfunc2creator), (yyvsp[-3].num), (yyvsp[-1].select_lex));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39312 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1406: /* predicate: predicate IN_SYM subquery */
#line 9310 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_in_subselect(thd, (yyvsp[-2].item), (yyvsp[0].select_lex));
if (unlikely(!(yyval.item)))
MYSQL_YYABORT;
}
#line 39322 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1407: /* predicate: predicate not IN_SYM subquery */
#line 9316 "/home/buildbot/git/sql/sql_yacc.yy"
{
Item *item= new (thd->mem_root) Item_in_subselect(thd, (yyvsp[-3].item), (yyvsp[0].select_lex));
if (unlikely(!item))
MYSQL_YYABORT;
(yyval.item)= negate_expression(thd, item);
if (unlikely(!(yyval.item)))
MYSQL_YYABORT;
}
#line 39335 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1408: /* predicate: predicate IN_SYM '(' expr ')' */
#line 9325 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= handle_sql2003_note184_exception(thd, (yyvsp[-4].item), true, (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39345 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1409: /* predicate: predicate IN_SYM '(' expr ',' expr_list ')' */
#line 9331 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[-1].item_list)->push_front((yyvsp[-3].item), thd->mem_root);
(yyvsp[-1].item_list)->push_front((yyvsp[-6].item), thd->mem_root);
(yyval.item)= new (thd->mem_root) Item_func_in(thd, *(yyvsp[-1].item_list));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39357 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1410: /* predicate: predicate not IN_SYM '(' expr ')' */
#line 9339 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= handle_sql2003_note184_exception(thd, (yyvsp[-5].item), false, (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39367 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1411: /* predicate: predicate not IN_SYM '(' expr ',' expr_list ')' */
#line 9345 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[-1].item_list)->push_front((yyvsp[-3].item), thd->mem_root);
(yyvsp[-1].item_list)->push_front((yyvsp[-7].item), thd->mem_root);
Item_func_in *item= new (thd->mem_root) Item_func_in(thd, *(yyvsp[-1].item_list));
if (unlikely(item == NULL))
MYSQL_YYABORT;
(yyval.item)= item->neg_transformer(thd);
}
#line 39380 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1412: /* predicate: predicate BETWEEN_SYM predicate AND_SYM predicate */
#line 9354 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_between(thd, (yyvsp[-4].item), (yyvsp[-2].item), (yyvsp[0].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39390 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1413: /* predicate: predicate not BETWEEN_SYM predicate AND_SYM predicate */
#line 9360 "/home/buildbot/git/sql/sql_yacc.yy"
{
Item_func_between *item;
item= new (thd->mem_root) Item_func_between(thd, (yyvsp[-5].item), (yyvsp[-2].item), (yyvsp[0].item));
if (unlikely(item == NULL))
MYSQL_YYABORT;
(yyval.item)= item->neg_transformer(thd);
}
#line 39402 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1414: /* predicate: predicate SOUNDS_SYM LIKE predicate */
#line 9368 "/home/buildbot/git/sql/sql_yacc.yy"
{
Item *item1= new (thd->mem_root) Item_func_soundex(thd, (yyvsp[-3].item));
Item *item4= new (thd->mem_root) Item_func_soundex(thd, (yyvsp[0].item));
if (unlikely(item1 == NULL) || unlikely(item4 == NULL))
MYSQL_YYABORT;
(yyval.item)= new (thd->mem_root) Item_func_eq(thd, item1, item4);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39416 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1415: /* predicate: predicate LIKE predicate */
#line 9378 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_like(thd, (yyvsp[-2].item), (yyvsp[0].item), escape(thd), false);
if (unlikely(!(yyval.item)))
MYSQL_YYABORT;
}
#line 39426 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1416: /* predicate: predicate LIKE predicate ESCAPE_SYM predicate */
#line 9384 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->escape_used= true;
(yyval.item)= new (thd->mem_root) Item_func_like(thd, (yyvsp[-4].item), (yyvsp[-2].item), (yyvsp[0].item), true);
if (unlikely(!(yyval.item)))
MYSQL_YYABORT;
}
#line 39437 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1417: /* predicate: predicate not LIKE predicate */
#line 9391 "/home/buildbot/git/sql/sql_yacc.yy"
{
Item *item= new (thd->mem_root) Item_func_like(thd, (yyvsp[-3].item), (yyvsp[0].item), escape(thd), false);
if (unlikely(!item))
MYSQL_YYABORT;
(yyval.item)= item->neg_transformer(thd);
}
#line 39448 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1418: /* predicate: predicate not LIKE predicate ESCAPE_SYM predicate */
#line 9398 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->escape_used= true;
Item *item= new (thd->mem_root) Item_func_like(thd, (yyvsp[-5].item), (yyvsp[-2].item), (yyvsp[0].item), true);
if (unlikely(!item))
MYSQL_YYABORT;
(yyval.item)= item->neg_transformer(thd);
}
#line 39460 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1419: /* predicate: predicate REGEXP predicate */
#line 9406 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_regex(thd, (yyvsp[-2].item), (yyvsp[0].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39470 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1420: /* predicate: predicate not REGEXP predicate */
#line 9412 "/home/buildbot/git/sql/sql_yacc.yy"
{
Item *item= new (thd->mem_root) Item_func_regex(thd, (yyvsp[-3].item), (yyvsp[0].item));
if (unlikely(item == NULL))
MYSQL_YYABORT;
(yyval.item)= negate_expression(thd, item);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39483 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1422: /* bit_expr: bit_expr '|' bit_expr */
#line 9425 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_bit_or(thd, (yyvsp[-2].item), (yyvsp[0].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39493 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1423: /* bit_expr: bit_expr '&' bit_expr */
#line 9431 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_bit_and(thd, (yyvsp[-2].item), (yyvsp[0].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39503 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1424: /* bit_expr: bit_expr SHIFT_LEFT bit_expr */
#line 9437 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_shift_left(thd, (yyvsp[-2].item), (yyvsp[0].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39513 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1425: /* bit_expr: bit_expr SHIFT_RIGHT bit_expr */
#line 9443 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_shift_right(thd, (yyvsp[-2].item), (yyvsp[0].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39523 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1426: /* bit_expr: bit_expr ORACLE_CONCAT_SYM bit_expr */
#line 9449 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_concat_operator_oracle(thd,
(yyvsp[-2].item), (yyvsp[0].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39534 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1427: /* bit_expr: bit_expr '+' bit_expr */
#line 9456 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_plus(thd, (yyvsp[-2].item), (yyvsp[0].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39544 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1428: /* bit_expr: bit_expr '-' bit_expr */
#line 9462 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_minus(thd, (yyvsp[-2].item), (yyvsp[0].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39554 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1429: /* bit_expr: bit_expr '+' INTERVAL_SYM expr interval */
#line 9468 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-4].item), (yyvsp[-1].item), (yyvsp[0].interval), 0);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39564 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1430: /* bit_expr: bit_expr '-' INTERVAL_SYM expr interval */
#line 9474 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-4].item), (yyvsp[-1].item), (yyvsp[0].interval), 1);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39574 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1431: /* bit_expr: INTERVAL_SYM expr interval '+' expr */
#line 9481 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[0].item), (yyvsp[-3].item), (yyvsp[-2].interval), 0);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39584 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1432: /* bit_expr: '+' INTERVAL_SYM expr interval '+' expr */
#line 9487 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[0].item), (yyvsp[-3].item), (yyvsp[-2].interval), 0);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39594 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1433: /* bit_expr: '-' INTERVAL_SYM expr interval '+' expr */
#line 9493 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[0].item), (yyvsp[-3].item), (yyvsp[-2].interval), 1);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39604 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1434: /* bit_expr: bit_expr '*' bit_expr */
#line 9499 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_mul(thd, (yyvsp[-2].item), (yyvsp[0].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39614 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1435: /* bit_expr: bit_expr '/' bit_expr */
#line 9505 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_div(thd, (yyvsp[-2].item), (yyvsp[0].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39624 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1436: /* bit_expr: bit_expr '%' bit_expr */
#line 9511 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_mod(thd, (yyvsp[-2].item), (yyvsp[0].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39634 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1437: /* bit_expr: bit_expr DIV_SYM bit_expr */
#line 9517 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_int_div(thd, (yyvsp[-2].item), (yyvsp[0].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39644 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1438: /* bit_expr: bit_expr MOD_SYM bit_expr */
#line 9523 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_mod(thd, (yyvsp[-2].item), (yyvsp[0].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39654 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1439: /* bit_expr: bit_expr '^' bit_expr */
#line 9529 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_bit_xor(thd, (yyvsp[-2].item), (yyvsp[0].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39664 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1449: /* comp_op: '=' */
#line 9558 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.boolfunc2creator) = &comp_eq_creator; }
#line 39670 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1450: /* comp_op: GE */
#line 9559 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.boolfunc2creator) = &comp_ge_creator; }
#line 39676 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1451: /* comp_op: '>' */
#line 9560 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.boolfunc2creator) = &comp_gt_creator; }
#line 39682 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1452: /* comp_op: LE */
#line 9561 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.boolfunc2creator) = &comp_le_creator; }
#line 39688 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1453: /* comp_op: '<' */
#line 9562 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.boolfunc2creator) = &comp_lt_creator; }
#line 39694 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1454: /* comp_op: NE */
#line 9563 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.boolfunc2creator) = &comp_ne_creator; }
#line 39700 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1455: /* all_or_any: ALL */
#line 9567 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 1; }
#line 39706 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1456: /* all_or_any: ANY_SYM */
#line 9568 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 0; }
#line 39712 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1457: /* opt_dyncol_type: %empty */
#line 9573 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_dyncol_type).set(DYN_COL_NULL); /* automatic type */
}
#line 39720 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1458: /* opt_dyncol_type: AS dyncol_type */
#line 9576 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type)= (yyvsp[0].Lex_dyncol_type); }
#line 39726 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1462: /* numeric_dyncol_type: INT_SYM */
#line 9586 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type).set(DYN_COL_INT); }
#line 39732 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1463: /* numeric_dyncol_type: UNSIGNED INT_SYM */
#line 9587 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type).set(DYN_COL_UINT); }
#line 39738 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1464: /* numeric_dyncol_type: DOUBLE_SYM */
#line 9588 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type).set(DYN_COL_DOUBLE); }
#line 39744 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1465: /* numeric_dyncol_type: REAL */
#line 9589 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type).set(DYN_COL_DOUBLE); }
#line 39750 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1466: /* numeric_dyncol_type: FLOAT_SYM */
#line 9590 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type).set(DYN_COL_DOUBLE); }
#line 39756 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1467: /* numeric_dyncol_type: DECIMAL_SYM float_options */
#line 9591 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type).set(DYN_COL_DECIMAL, (yyvsp[0].Lex_length_and_dec)); }
#line 39762 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1468: /* temporal_dyncol_type: DATE_SYM */
#line 9595 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type).set(DYN_COL_DATE); }
#line 39768 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1469: /* temporal_dyncol_type: TIME_SYM opt_field_scale */
#line 9596 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type).set(DYN_COL_TIME, (yyvsp[0].Lex_length_and_dec)); }
#line 39774 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1470: /* temporal_dyncol_type: DATETIME opt_field_scale */
#line 9597 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type).set(DYN_COL_DATETIME, (yyvsp[0].Lex_length_and_dec)); }
#line 39780 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1471: /* string_dyncol_type: char opt_binary */
#line 9602 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyval.Lex_dyncol_type).set(DYN_COL_STRING, (yyvsp[0].Lex_exact_charset_extended_collation_attrs), thd->variables.collation_connection))
MYSQL_YYABORT;
}
#line 39789 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1472: /* string_dyncol_type: nchar */
#line 9607 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_dyncol_type).set(DYN_COL_STRING, national_charset_info);
}
#line 39797 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1473: /* dyncall_create_element: expr ',' expr opt_dyncol_type */
#line 9614 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.dyncol_def)= (DYNCALL_CREATE_DEF *)
alloc_root(thd->mem_root, sizeof(DYNCALL_CREATE_DEF));
if (unlikely((yyval.dyncol_def) == NULL))
MYSQL_YYABORT;
(yyval.dyncol_def)->key= (yyvsp[-3].item);
(yyval.dyncol_def)->value= (yyvsp[-1].item);
(yyval.dyncol_def)->type= (DYNAMIC_COLUMN_TYPE)(yyvsp[0].Lex_dyncol_type).dyncol_type();
(yyval.dyncol_def)->cs= (yyvsp[0].Lex_dyncol_type).charset_collation();
if ((yyvsp[0].Lex_dyncol_type).has_explicit_length())
(yyval.dyncol_def)->len= (yyvsp[0].Lex_dyncol_type).length();
else
(yyval.dyncol_def)->len= 0;
if ((yyvsp[0].Lex_dyncol_type).has_explicit_dec())
(yyval.dyncol_def)->frac= (yyvsp[0].Lex_dyncol_type).dec();
else
(yyval.dyncol_def)->len= 0;
}
#line 39820 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1474: /* dyncall_create_list: dyncall_create_element */
#line 9636 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.dyncol_def_list)= new (thd->mem_root) List;
if (unlikely((yyval.dyncol_def_list) == NULL))
MYSQL_YYABORT;
(yyval.dyncol_def_list)->push_back((yyvsp[0].dyncol_def), thd->mem_root);
}
#line 39831 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1475: /* dyncall_create_list: dyncall_create_list ',' dyncall_create_element */
#line 9643 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[-2].dyncol_def_list)->push_back((yyvsp[0].dyncol_def), thd->mem_root);
(yyval.dyncol_def_list)= (yyvsp[-2].dyncol_def_list);
}
#line 39840 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1476: /* plsql_cursor_attr: ISOPEN_SYM */
#line 9651 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.plsql_cursor_attr)= PLSQL_CURSOR_ATTR_ISOPEN; }
#line 39846 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1477: /* plsql_cursor_attr: FOUND_SYM */
#line 9652 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.plsql_cursor_attr)= PLSQL_CURSOR_ATTR_FOUND; }
#line 39852 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1478: /* plsql_cursor_attr: NOTFOUND_SYM */
#line 9653 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.plsql_cursor_attr)= PLSQL_CURSOR_ATTR_NOTFOUND; }
#line 39858 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1479: /* plsql_cursor_attr: ROWCOUNT_SYM */
#line 9654 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.plsql_cursor_attr)= PLSQL_CURSOR_ATTR_ROWCOUNT; }
#line 39864 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1480: /* explicit_cursor_attr: ident PERCENT_ORACLE_SYM plsql_cursor_attr */
#line 9659 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->make_item_plsql_cursor_attr(thd, &(yyvsp[-2].ident_sys), (yyvsp[0].plsql_cursor_attr)))))
MYSQL_YYABORT;
}
#line 39873 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1483: /* trim_operands_regular: expr */
#line 9672 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.trim).set(TRIM_BOTH, (yyvsp[0].item)); }
#line 39879 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1484: /* trim_operands_special: LEADING expr FROM expr */
#line 9676 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.trim).set(TRIM_LEADING, (yyvsp[-2].item), (yyvsp[0].item)); }
#line 39885 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1485: /* trim_operands_special: TRAILING expr FROM expr */
#line 9677 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.trim).set(TRIM_TRAILING, (yyvsp[-2].item), (yyvsp[0].item)); }
#line 39891 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1486: /* trim_operands_special: BOTH expr FROM expr */
#line 9678 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.trim).set(TRIM_BOTH, (yyvsp[-2].item), (yyvsp[0].item)); }
#line 39897 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1487: /* trim_operands_special: LEADING FROM expr */
#line 9679 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.trim).set(TRIM_LEADING, (yyvsp[0].item)); }
#line 39903 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1488: /* trim_operands_special: TRAILING FROM expr */
#line 9680 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.trim).set(TRIM_TRAILING, (yyvsp[0].item)); }
#line 39909 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1489: /* trim_operands_special: BOTH FROM expr */
#line 9681 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.trim).set(TRIM_BOTH, (yyvsp[0].item)); }
#line 39915 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1490: /* trim_operands_special: expr FROM expr */
#line 9682 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.trim).set(TRIM_BOTH, (yyvsp[-2].item), (yyvsp[0].item)); }
#line 39921 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1497: /* column_default_non_parenthesized_expr: param_marker */
#line 9720 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)= (yyvsp[0].item_param); }
#line 39927 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1499: /* column_default_non_parenthesized_expr: sum_expr */
#line 9723 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!Lex->select_stack_top || Lex->json_table)
{
my_error(ER_INVALID_GROUP_FUNC_USE, MYF(0));
MYSQL_YYABORT;
}
}
#line 39939 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1500: /* column_default_non_parenthesized_expr: window_func_expr */
#line 9731 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!Lex->select_stack_top)
{
my_error(ER_WRONG_PLACEMENT_OF_WINDOW_FUNCTION, MYF(0));
MYSQL_YYABORT;
}
}
#line 39951 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1502: /* column_default_non_parenthesized_expr: ROW_SYM '(' expr ',' expr_list ')' */
#line 9740 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[-1].item_list)->push_front((yyvsp[-3].item), thd->mem_root);
(yyval.item)= new (thd->mem_root) Item_row(thd, *(yyvsp[-1].item_list));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39962 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1503: /* column_default_non_parenthesized_expr: EXISTS '(' subselect ')' */
#line 9747 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_exists_subselect(thd, (yyvsp[-1].select_lex));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39972 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1504: /* column_default_non_parenthesized_expr: '{' ident expr '}' */
#line 9753 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= (yyvsp[-1].item)->make_odbc_literal(thd, &(yyvsp[-2].ident_sys)))))
MYSQL_YYABORT;
}
#line 39981 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1505: /* column_default_non_parenthesized_expr: MATCH ident_list_arg AGAINST '(' bit_expr fulltext_options ')' */
#line 9758 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[-5].item_list)->push_front((yyvsp[-2].item), thd->mem_root);
Item_func_match *i1= new (thd->mem_root) Item_func_match(thd, *(yyvsp[-5].item_list),
(yyvsp[-1].num));
if (unlikely(i1 == NULL))
MYSQL_YYABORT;
Select->add_ftfunc_to_list(thd, i1);
(yyval.item)= i1;
}
#line 39995 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1506: /* column_default_non_parenthesized_expr: CAST_SYM '(' expr AS cast_type ')' */
#line 9768 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= (yyvsp[-1].Lex_cast_type).create_typecast_item_or_error(thd, (yyvsp[-3].item)))))
MYSQL_YYABORT;
}
#line 40004 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1507: /* column_default_non_parenthesized_expr: CASE_SYM when_list_opt_else END */
#line 9773 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= new(thd->mem_root) Item_func_case_searched(thd, *(yyvsp[-1].item_list)))))
MYSQL_YYABORT;
}
#line 40013 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1508: /* column_default_non_parenthesized_expr: CASE_SYM expr when_list_opt_else END */
#line 9778 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[-1].item_list)->push_front((yyvsp[-2].item), thd->mem_root);
if (unlikely(!((yyval.item)= new (thd->mem_root) Item_func_case_simple(thd, *(yyvsp[-1].item_list)))))
MYSQL_YYABORT;
}
#line 40023 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1509: /* column_default_non_parenthesized_expr: CONVERT_SYM '(' expr ',' cast_type ')' */
#line 9784 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= (yyvsp[-1].Lex_cast_type).create_typecast_item_or_error(thd, (yyvsp[-3].item)))))
MYSQL_YYABORT;
}
#line 40032 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1510: /* column_default_non_parenthesized_expr: CONVERT_SYM '(' expr USING charset_name ')' */
#line 9789 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_conv_charset(thd, (yyvsp[-3].item), (yyvsp[-1].charset));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40042 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1511: /* column_default_non_parenthesized_expr: DEFAULT '(' simple_ident ')' */
#line 9795 "/home/buildbot/git/sql/sql_yacc.yy"
{
Item_splocal *il= (yyvsp[-1].item)->get_item_splocal();
if (unlikely(il))
my_yyabort_error((ER_WRONG_COLUMN_NAME, MYF(0), il->my_name()->str));
(yyval.item)= new (thd->mem_root) Item_default_value(thd, Lex->current_context(),
(yyvsp[-1].item), 0);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
Lex->default_used= TRUE;
}
#line 40057 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1512: /* column_default_non_parenthesized_expr: VALUE_SYM '(' simple_ident_nospvar ')' */
#line 9806 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_insert_value(thd, Lex->current_context(),
(yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40068 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1513: /* column_default_non_parenthesized_expr: NEXT_SYM VALUE_SYM FOR_SYM table_ident */
#line 9813 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_func_nextval(thd, (yyvsp[0].table)))))
MYSQL_YYABORT;
}
#line 40077 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1514: /* column_default_non_parenthesized_expr: NEXTVAL_SYM '(' table_ident ')' */
#line 9818 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_func_nextval(thd, (yyvsp[-1].table)))))
MYSQL_YYABORT;
}
#line 40086 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1515: /* column_default_non_parenthesized_expr: PREVIOUS_SYM VALUE_SYM FOR_SYM table_ident */
#line 9823 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_func_lastval(thd, (yyvsp[0].table)))))
MYSQL_YYABORT;
}
#line 40095 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1516: /* column_default_non_parenthesized_expr: LASTVAL_SYM '(' table_ident ')' */
#line 9828 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_func_lastval(thd, (yyvsp[-1].table)))))
MYSQL_YYABORT;
}
#line 40104 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1517: /* column_default_non_parenthesized_expr: SETVAL_SYM '(' table_ident ',' longlong_num ')' */
#line 9833 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_func_setval(thd, (yyvsp[-3].table), (yyvsp[-1].longlong_number), 0, 1))))
MYSQL_YYABORT;
}
#line 40113 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1518: /* column_default_non_parenthesized_expr: SETVAL_SYM '(' table_ident ',' longlong_num ',' bool ')' */
#line 9838 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_func_setval(thd, (yyvsp[-5].table), (yyvsp[-3].longlong_number), 0, (yyvsp[-1].ulong_num)))))
MYSQL_YYABORT;
}
#line 40122 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1519: /* column_default_non_parenthesized_expr: SETVAL_SYM '(' table_ident ',' longlong_num ',' bool ',' ulonglong_num ')' */
#line 9843 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_func_setval(thd, (yyvsp[-7].table), (yyvsp[-5].longlong_number), (yyvsp[-1].ulonglong_number), (yyvsp[-3].ulong_num)))))
MYSQL_YYABORT;
}
#line 40131 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1522: /* primary_expr: '(' parenthesized_expr ')' */
#line 9852 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)= (yyvsp[-1].item); }
#line 40137 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1523: /* primary_expr: subquery */
#line 9854 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.item)= Lex->create_item_query_expression(thd, (yyvsp[0].select_lex)->master_unit())))
MYSQL_YYABORT;
}
#line 40146 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1525: /* string_factor_expr: string_factor_expr COLLATE_SYM collation_name */
#line 9863 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= new (thd->mem_root)
Item_func_set_collation(thd, (yyvsp[-2].item), (yyvsp[0].Lex_extended_collation)))))
MYSQL_YYABORT;
}
#line 40156 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1527: /* simple_expr: BINARY simple_expr */
#line 9873 "/home/buildbot/git/sql/sql_yacc.yy"
{
Type_cast_attributes at(&my_charset_bin);
if (unlikely(!((yyval.item)= type_handler_long_blob.create_typecast_item(thd, (yyvsp[0].item), at))))
MYSQL_YYABORT;
}
#line 40166 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1528: /* simple_expr: '+' simple_expr */
#line 9879 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= (yyvsp[0].item);
}
#line 40174 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1529: /* simple_expr: '-' simple_expr */
#line 9883 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= (yyvsp[0].item)->neg(thd);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40184 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1530: /* simple_expr: '~' simple_expr */
#line 9889 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_bit_neg(thd, (yyvsp[0].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40194 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1531: /* simple_expr: not2 simple_expr */
#line 9895 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= negate_expression(thd, (yyvsp[0].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40204 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1533: /* mysql_concatenation_expr: mysql_concatenation_expr MYSQL_CONCAT_SYM simple_expr */
#line 9905 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_concat(thd, (yyvsp[-2].item), (yyvsp[0].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40214 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1534: /* function_call_keyword_timestamp: TIMESTAMP '(' expr ')' */
#line 9914 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_datetime_typecast(thd, (yyvsp[-1].item),
AUTO_SEC_PART_DIGITS);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40225 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1535: /* function_call_keyword_timestamp: TIMESTAMP '(' expr ',' expr ')' */
#line 9921 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_timestamp(thd, (yyvsp[-3].item), (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40235 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1536: /* function_call_keyword: CHAR_SYM '(' expr_list ')' */
#line 9935 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_char(thd, *(yyvsp[-1].item_list));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40245 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1537: /* function_call_keyword: CHAR_SYM '(' expr_list USING charset_name ')' */
#line 9941 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_char(thd, *(yyvsp[-3].item_list), (yyvsp[-1].charset));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40255 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1538: /* function_call_keyword: CURRENT_USER optional_braces */
#line 9947 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_current_user(thd,
Lex->current_context());
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
Lex->safe_to_cache_query= 0;
}
#line 40268 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1539: /* function_call_keyword: CURRENT_ROLE optional_braces */
#line 9956 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_current_role(thd,
Lex->current_context());
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
Lex->safe_to_cache_query= 0;
}
#line 40281 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1540: /* function_call_keyword: DATE_SYM '(' expr ')' */
#line 9965 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_date_typecast(thd, (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40291 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1541: /* function_call_keyword: DAY_SYM '(' expr ')' */
#line 9971 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_dayofmonth(thd, (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40301 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1542: /* function_call_keyword: HOUR_SYM '(' expr ')' */
#line 9977 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_hour(thd, (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40311 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1543: /* function_call_keyword: INSERT '(' expr ',' expr ',' expr ',' expr ')' */
#line 9983 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_insert(thd, (yyvsp[-7].item), (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40321 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1544: /* function_call_keyword: INTERVAL_SYM '(' expr ',' expr ')' */
#line 9989 "/home/buildbot/git/sql/sql_yacc.yy"
{
List- *list= new (thd->mem_root) List
- ;
if (unlikely(list == NULL))
MYSQL_YYABORT;
if (unlikely(list->push_front((yyvsp[-1].item), thd->mem_root)) ||
unlikely(list->push_front((yyvsp[-3].item), thd->mem_root)))
MYSQL_YYABORT;
Item_row *item= new (thd->mem_root) Item_row(thd, *list);
if (unlikely(item == NULL))
MYSQL_YYABORT;
(yyval.item)= new (thd->mem_root) Item_func_interval(thd, item);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40340 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1545: /* function_call_keyword: INTERVAL_SYM '(' expr ',' expr ',' expr_list ')' */
#line 10004 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[-1].item_list)->push_front((yyvsp[-3].item), thd->mem_root);
(yyvsp[-1].item_list)->push_front((yyvsp[-5].item), thd->mem_root);
Item_row *item= new (thd->mem_root) Item_row(thd, *(yyvsp[-1].item_list));
if (unlikely(item == NULL))
MYSQL_YYABORT;
(yyval.item)= new (thd->mem_root) Item_func_interval(thd, item);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40355 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1546: /* function_call_keyword: LEFT '(' expr ',' expr ')' */
#line 10015 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_left(thd, (yyvsp[-3].item), (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40365 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1547: /* function_call_keyword: MINUTE_SYM '(' expr ')' */
#line 10021 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_minute(thd, (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40375 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1548: /* function_call_keyword: MONTH_SYM '(' expr ')' */
#line 10027 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_month(thd, (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40385 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1549: /* function_call_keyword: RIGHT '(' expr ',' expr ')' */
#line 10033 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_right(thd, (yyvsp[-3].item), (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40395 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1550: /* function_call_keyword: SECOND_SYM '(' expr ')' */
#line 10039 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_second(thd, (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40405 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1551: /* function_call_keyword: SQL_SYM PERCENT_ORACLE_SYM ROWCOUNT_SYM */
#line 10045 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_oracle_sql_rowcount(thd);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
Lex->safe_to_cache_query= 0;
}
#line 40417 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1552: /* function_call_keyword: TIME_SYM '(' expr ')' */
#line 10053 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_time_typecast(thd, (yyvsp[-1].item),
AUTO_SEC_PART_DIGITS);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40428 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1553: /* function_call_keyword: function_call_keyword_timestamp */
#line 10060 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= (yyvsp[0].item);
}
#line 40436 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1554: /* function_call_keyword: TRIM '(' trim_operands ')' */
#line 10064 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Schema::find_implied(thd)->
make_item_func_trim(thd, (yyvsp[-1].trim)))))
MYSQL_YYABORT;
}
#line 40446 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1555: /* function_call_keyword: USER_SYM '(' ')' */
#line 10070 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_user(thd);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
Lex->safe_to_cache_query=0;
}
#line 40458 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1556: /* function_call_keyword: YEAR_SYM '(' expr ')' */
#line 10078 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_year(thd, (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40468 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1559: /* substring_operands_regular: expr ',' expr ',' expr */
#line 10092 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.substring_spec)= Lex_substring_spec_st::init((yyvsp[-4].item), (yyvsp[-2].item), (yyvsp[0].item));
}
#line 40476 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1560: /* substring_operands_regular: expr ',' expr */
#line 10096 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.substring_spec)= Lex_substring_spec_st::init((yyvsp[-2].item), (yyvsp[0].item));
}
#line 40484 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1561: /* substring_operands_special: expr FROM expr FOR_SYM expr */
#line 10103 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.substring_spec)= Lex_substring_spec_st::init((yyvsp[-4].item), (yyvsp[-2].item), (yyvsp[0].item));
}
#line 40492 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1562: /* substring_operands_special: expr FROM expr */
#line 10107 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.substring_spec)= Lex_substring_spec_st::init((yyvsp[-2].item), (yyvsp[0].item));
}
#line 40500 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1563: /* function_call_nonkeyword: ADDDATE_SYM '(' expr ',' expr ')' */
#line 10127 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-3].item), (yyvsp[-1].item),
INTERVAL_DAY, 0);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40511 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1564: /* function_call_nonkeyword: ADDDATE_SYM '(' expr ',' INTERVAL_SYM expr interval ')' */
#line 10134 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-5].item), (yyvsp[-2].item), (yyvsp[-1].interval), 0);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40521 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1565: /* function_call_nonkeyword: CURDATE optional_braces */
#line 10140 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_curdate_local(thd);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
Lex->safe_to_cache_query=0;
}
#line 40532 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1566: /* function_call_nonkeyword: CURTIME opt_time_precision */
#line 10147 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_curtime_local(thd, (yyvsp[0].num));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
Lex->safe_to_cache_query=0;
}
#line 40543 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1567: /* function_call_nonkeyword: DATE_ADD_INTERVAL '(' expr ',' INTERVAL_SYM expr interval ')' */
#line 10154 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-5].item), (yyvsp[-2].item), (yyvsp[-1].interval), 0);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40553 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1568: /* function_call_nonkeyword: DATE_SUB_INTERVAL '(' expr ',' INTERVAL_SYM expr interval ')' */
#line 10160 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-5].item), (yyvsp[-2].item), (yyvsp[-1].interval), 1);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40563 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1569: /* function_call_nonkeyword: EXTRACT_SYM '(' interval FROM expr ')' */
#line 10166 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)=new (thd->mem_root) Item_extract(thd, (yyvsp[-3].interval), (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40573 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1570: /* function_call_nonkeyword: GET_FORMAT '(' date_time_type ',' expr ')' */
#line 10172 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_get_format(thd, (yyvsp[-3].date_time_type), (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40583 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1571: /* function_call_nonkeyword: NOW_SYM opt_time_precision */
#line 10178 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_now_local(thd, (yyvsp[0].num));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
Lex->safe_to_cache_query=0;
}
#line 40594 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1572: /* function_call_nonkeyword: POSITION_SYM '(' bit_expr IN_SYM expr ')' */
#line 10185 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_locate(thd, (yyvsp[-1].item), (yyvsp[-3].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40604 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1573: /* function_call_nonkeyword: ROWNUM_SYM optional_braces */
#line 10196 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_rownum(thd);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40614 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1574: /* function_call_nonkeyword: SUBDATE_SYM '(' expr ',' expr ')' */
#line 10202 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-3].item), (yyvsp[-1].item),
INTERVAL_DAY, 1);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40625 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1575: /* function_call_nonkeyword: SUBDATE_SYM '(' expr ',' INTERVAL_SYM expr interval ')' */
#line 10209 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-5].item), (yyvsp[-2].item), (yyvsp[-1].interval), 1);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40635 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1576: /* function_call_nonkeyword: SUBSTRING '(' substring_operands ')' */
#line 10215 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Schema::find_implied(thd)->
make_item_func_substr(thd, (yyvsp[-1].substring_spec)))))
MYSQL_YYABORT;
}
#line 40645 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1577: /* function_call_nonkeyword: SYSDATE */
#line 10222 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->make_item_func_sysdate(thd, 0))))
MYSQL_YYABORT;
}
#line 40654 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1578: /* function_call_nonkeyword: SYSDATE '(' ')' */
#line 10228 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->make_item_func_sysdate(thd, 0))))
MYSQL_YYABORT;
}
#line 40663 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1579: /* function_call_nonkeyword: SYSDATE '(' real_ulong_num ')' */
#line 10233 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->make_item_func_sysdate(thd, (uint) (yyvsp[-1].ulong_num)))))
MYSQL_YYABORT;
}
#line 40672 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1580: /* function_call_nonkeyword: TIMESTAMP_ADD '(' interval_time_stamp ',' expr ',' expr ')' */
#line 10238 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-1].item), (yyvsp[-3].item), (yyvsp[-5].interval_time_st), 0);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40682 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1581: /* function_call_nonkeyword: TIMESTAMP_DIFF '(' interval_time_stamp ',' expr ',' expr ')' */
#line 10244 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_timestamp_diff(thd, (yyvsp[-3].item), (yyvsp[-1].item), (yyvsp[-5].interval_time_st));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40692 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1582: /* function_call_nonkeyword: TRIM_ORACLE '(' trim_operands ')' */
#line 10250 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= (yyvsp[-1].trim).make_item_func_trim_oracle(thd))))
MYSQL_YYABORT;
}
#line 40701 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1583: /* function_call_nonkeyword: UTC_DATE_SYM optional_braces */
#line 10255 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_curdate_utc(thd);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
Lex->safe_to_cache_query=0;
}
#line 40712 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1584: /* function_call_nonkeyword: UTC_TIME_SYM opt_time_precision */
#line 10262 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_curtime_utc(thd, (yyvsp[0].num));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
Lex->safe_to_cache_query=0;
}
#line 40723 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1585: /* function_call_nonkeyword: UTC_TIMESTAMP_SYM opt_time_precision */
#line 10269 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_now_utc(thd, (yyvsp[0].num));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
Lex->safe_to_cache_query=0;
}
#line 40734 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1586: /* function_call_nonkeyword: COLUMN_ADD_SYM '(' expr ',' dyncall_create_list ')' */
#line 10277 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= create_func_dyncol_add(thd, (yyvsp[-3].item), *(yyvsp[-1].dyncol_def_list));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40744 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1587: /* function_call_nonkeyword: COLUMN_DELETE_SYM '(' expr ',' expr_list ')' */
#line 10284 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= create_func_dyncol_delete(thd, (yyvsp[-3].item), *(yyvsp[-1].item_list));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40754 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1588: /* function_call_nonkeyword: COLUMN_CREATE_SYM '(' dyncall_create_list ')' */
#line 10291 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= create_func_dyncol_create(thd, *(yyvsp[-1].dyncol_def_list));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40764 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1589: /* function_call_nonkeyword: COLUMN_GET_SYM '(' expr ',' expr AS cast_type ')' */
#line 10298 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= create_func_dyncol_get(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].Lex_cast_type).type_handler(),
(yyvsp[-1].Lex_cast_type), (yyvsp[-1].Lex_cast_type).charset());
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40775 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1590: /* function_call_conflict: ASCII_SYM '(' expr ')' */
#line 10313 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_ascii(thd, (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40785 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1591: /* function_call_conflict: CHARSET '(' expr ')' */
#line 10319 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_charset(thd, (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40795 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1592: /* function_call_conflict: IF_SYM '(' expr ',' expr ',' expr ')' */
#line 10325 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_if(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40805 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1593: /* function_call_conflict: LAST_VALUE '(' expr ')' */
#line 10334 "/home/buildbot/git/sql/sql_yacc.yy"
{
List
- *list= new (thd->mem_root) List
- ;
if (unlikely(list == NULL))
MYSQL_YYABORT;
list->push_back((yyvsp[-1].item), thd->mem_root);
(yyval.item)= new (thd->mem_root) Item_func_last_value(thd, *list);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40820 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1594: /* function_call_conflict: LAST_VALUE '(' expr_list ',' expr ')' */
#line 10345 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[-3].item_list)->push_back((yyvsp[-1].item), thd->mem_root);
(yyval.item)= new (thd->mem_root) Item_func_last_value(thd, *(yyvsp[-3].item_list));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40831 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1595: /* function_call_conflict: MOD_SYM '(' expr ',' expr ')' */
#line 10352 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_mod(thd, (yyvsp[-3].item), (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40841 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1596: /* function_call_conflict: PASSWORD_SYM '(' expr ')' */
#line 10358 "/home/buildbot/git/sql/sql_yacc.yy"
{
Item* i1;
i1= new (thd->mem_root) Item_func_password(thd, (yyvsp[-1].item));
if (unlikely(i1 == NULL))
MYSQL_YYABORT;
(yyval.item)= i1;
}
#line 40853 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1597: /* function_call_conflict: REPEAT_SYM '(' expr ',' expr ')' */
#line 10366 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_repeat(thd, (yyvsp[-3].item), (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40863 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1598: /* function_call_conflict: REPLACE '(' expr ',' expr ',' expr ')' */
#line 10372 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Schema::find_implied(thd)->
make_item_func_replace(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item)))))
MYSQL_YYABORT;
}
#line 40873 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1599: /* function_call_conflict: TRUNCATE_SYM '(' expr ',' expr ')' */
#line 10378 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_round(thd, (yyvsp[-3].item), (yyvsp[-1].item), 1);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40883 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1600: /* function_call_conflict: WEIGHT_STRING_SYM '(' expr opt_ws_levels ')' */
#line 10384 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_weight_string(thd, (yyvsp[-2].item), 0, 0, (yyvsp[-1].ulong_num));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40893 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1601: /* function_call_conflict: WEIGHT_STRING_SYM '(' expr AS CHAR_SYM ws_nweights opt_ws_levels ')' */
#line 10390 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root)
Item_func_weight_string(thd, (yyvsp[-5].item), 0, (yyvsp[-2].ulong_num),
(yyvsp[-1].ulong_num) | MY_STRXFRM_PAD_WITH_SPACE);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40905 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1602: /* function_call_conflict: WEIGHT_STRING_SYM '(' expr AS BINARY ws_nweights ')' */
#line 10398 "/home/buildbot/git/sql/sql_yacc.yy"
{
Item *item= new (thd->mem_root) Item_char_typecast(thd, (yyvsp[-4].item), (yyvsp[-1].ulong_num),
&my_charset_bin);
if (unlikely(item == NULL))
MYSQL_YYABORT;
(yyval.item)= new (thd->mem_root)
Item_func_weight_string(thd, item, 0, (yyvsp[-1].ulong_num),
MY_STRXFRM_PAD_WITH_SPACE);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40921 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1603: /* function_call_conflict: WEIGHT_STRING_SYM '(' expr ',' ulong_num ',' ulong_num ',' ulong_num ')' */
#line 10410 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_weight_string(thd, (yyvsp[-7].item), (yyvsp[-5].ulong_num), (yyvsp[-3].ulong_num),
(yyvsp[-1].ulong_num));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40932 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1604: /* @142: %empty */
#line 10429 "/home/buildbot/git/sql/sql_yacc.yy"
{
#ifdef HAVE_DLOPEN
udf_func *udf= 0;
LEX *lex= Lex;
if (using_udf_functions &&
(udf= find_udf((yyvsp[-1].ident_sys).str, (yyvsp[-1].ident_sys).length)) &&
udf->type == UDFTYPE_AGGREGATE)
{
if (unlikely(lex->current_select->inc_in_sum_expr()))
{
thd->parse_error();
MYSQL_YYABORT;
}
}
/* Temporary placing the result of find_udf in $3 */
(yyval.udf)= udf;
#endif
}
#line 40955 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1605: /* function_call_generic: ident_func '(' @142 opt_udf_expr_list ')' */
#line 10448 "/home/buildbot/git/sql/sql_yacc.yy"
{
const Type_handler *h;
Create_func *builder;
Item *item= NULL;
if (unlikely(check_routine_name(&(yyvsp[-4].ident_sys))))
MYSQL_YYABORT;
/*
Implementation note:
names are resolved with the following order:
- MySQL native functions,
- User Defined Functions,
- Constructors, like POINT(1,1)
- Stored Functions (assuming the current
database)
This will be revised with WL#2128 (SQL PATH)
*/
builder= Schema::find_implied(thd)->
find_native_function_builder(thd, (yyvsp[-4].ident_sys));
if (builder)
{
item= builder->create_func(thd, &(yyvsp[-4].ident_sys), (yyvsp[-1].item_list));
}
else if ((h= Type_handler::handler_by_name(thd, (yyvsp[-4].ident_sys))) &&
(item= h->make_constructor_item(thd, (yyvsp[-1].item_list))))
{
// Found a constructor with a proper argument count
}
else
{
#ifdef HAVE_DLOPEN
/* Retrieving the result of find_udf */
udf_func *udf= (yyvsp[-2].udf);
if (udf)
{
if (udf->type == UDFTYPE_AGGREGATE)
{
Select->in_sum_expr--;
}
item= Create_udf_func::s_singleton.create(thd, udf, (yyvsp[-1].item_list));
}
else
#endif
{
builder= find_qualified_function_builder(thd);
DBUG_ASSERT(builder);
item= builder->create_func(thd, &(yyvsp[-4].ident_sys), (yyvsp[-1].item_list));
}
}
if (unlikely(! ((yyval.item)= item)))
MYSQL_YYABORT;
}
#line 41016 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1606: /* function_call_generic: CONTAINS_SYM '(' opt_expr_list ')' */
#line 10505 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.item)= Lex->make_item_func_call_native_or_parse_error(thd,
(yyvsp[-3].kwd), (yyvsp[-1].item_list))))
MYSQL_YYABORT;
}
#line 41026 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1607: /* function_call_generic: OVERLAPS_SYM '(' opt_expr_list ')' */
#line 10511 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.item)= Lex->make_item_func_call_native_or_parse_error(thd,
(yyvsp[-3].kwd), (yyvsp[-1].item_list))))
MYSQL_YYABORT;
}
#line 41036 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1608: /* function_call_generic: WITHIN '(' opt_expr_list ')' */
#line 10517 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.item)= Lex->make_item_func_call_native_or_parse_error(thd,
(yyvsp[-3].kwd), (yyvsp[-1].item_list))))
MYSQL_YYABORT;
}
#line 41046 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1609: /* function_call_generic: ident_cli '.' ident_cli '(' opt_expr_list ')' */
#line 10523 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->make_item_func_call_generic(thd, &(yyvsp[-5].ident_cli), &(yyvsp[-3].ident_cli), (yyvsp[-1].item_list)))))
MYSQL_YYABORT;
}
#line 41055 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1610: /* function_call_generic: ident_cli '.' ident_cli '.' ident_cli '(' opt_expr_list ')' */
#line 10528 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->make_item_func_call_generic(thd, &(yyvsp[-7].ident_cli), &(yyvsp[-5].ident_cli), &(yyvsp[-3].ident_cli), (yyvsp[-1].item_list)))))
MYSQL_YYABORT;
}
#line 41064 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1611: /* function_call_generic: ident_cli '.' REPLACE '(' opt_expr_list ')' */
#line 10533 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->make_item_func_replace(thd, (yyvsp[-5].ident_cli), (yyvsp[-3].kwd), (yyvsp[-1].item_list)))))
MYSQL_YYABORT;
}
#line 41073 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1612: /* function_call_generic: ident_cli '.' SUBSTRING '(' opt_expr_list ')' */
#line 10538 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->make_item_func_substr(thd, (yyvsp[-5].ident_cli), (yyvsp[-3].kwd), (yyvsp[-1].item_list)))))
MYSQL_YYABORT;
}
#line 41082 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1613: /* function_call_generic: ident_cli '.' SUBSTRING '(' substring_operands_special ')' */
#line 10543 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->make_item_func_substr(thd, (yyvsp[-5].ident_cli), (yyvsp[-3].kwd), (yyvsp[-1].substring_spec)))))
MYSQL_YYABORT;
}
#line 41091 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1614: /* function_call_generic: ident_cli '.' TRIM '(' opt_expr_list ')' */
#line 10548 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->make_item_func_trim(thd, (yyvsp[-5].ident_cli), (yyvsp[-3].kwd), (yyvsp[-1].item_list)))))
MYSQL_YYABORT;
}
#line 41100 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1615: /* function_call_generic: ident_cli '.' TRIM '(' trim_operands_special ')' */
#line 10553 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->make_item_func_trim(thd, (yyvsp[-5].ident_cli), (yyvsp[-3].kwd), (yyvsp[-1].trim)))))
MYSQL_YYABORT;
}
#line 41109 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1616: /* fulltext_options: opt_natural_language_mode opt_query_expansion */
#line 10573 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= (yyvsp[-1].num) | (yyvsp[0].num); }
#line 41115 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1617: /* fulltext_options: IN_SYM BOOLEAN_SYM MODE_SYM */
#line 10575 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= FT_BOOL; }
#line 41121 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1618: /* opt_natural_language_mode: %empty */
#line 10579 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= FT_NL; }
#line 41127 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1619: /* opt_natural_language_mode: IN_SYM NATURAL LANGUAGE_SYM MODE_SYM */
#line 10580 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= FT_NL; }
#line 41133 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1620: /* opt_query_expansion: %empty */
#line 10584 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 41139 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1621: /* opt_query_expansion: WITH QUERY_SYM EXPANSION_SYM */
#line 10585 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= FT_EXPAND; }
#line 41145 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1622: /* opt_udf_expr_list: %empty */
#line 10589 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item_list)= NULL; }
#line 41151 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1623: /* opt_udf_expr_list: udf_expr_list */
#line 10590 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item_list)= (yyvsp[0].item_list); }
#line 41157 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1624: /* udf_expr_list: udf_expr */
#line 10595 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item_list)= new (thd->mem_root) List- ;
if (unlikely((yyval.item_list) == NULL))
MYSQL_YYABORT;
(yyval.item_list)->push_back((yyvsp[0].item), thd->mem_root);
}
#line 41168 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1625: /* udf_expr_list: udf_expr_list ',' udf_expr */
#line 10602 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[-2].item_list)->push_back((yyvsp[0].item), thd->mem_root);
(yyval.item_list)= (yyvsp[-2].item_list);
}
#line 41177 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1626: /* udf_expr: remember_name expr remember_end select_alias */
#line 10610 "/home/buildbot/git/sql/sql_yacc.yy"
{
/*
Use Item::name as a storage for the attribute value of user
defined function argument. It is safe to use Item::name
because the syntax will not allow having an explicit name here.
See WL#1017 re. udf attributes.
*/
if ((yyvsp[0].lex_str).str)
{
(yyvsp[-2].item)->base_flags|= item_base_t::IS_EXPLICIT_NAME;
(yyvsp[-2].item)->set_name(thd, (yyvsp[0].lex_str));
}
/*
A field has to have its proper name in order for name
resolution to work, something we are only guaranteed if we
parse it out. If we hijack the input stream with
remember_name we may get quoted or escaped names.
*/
else if ((yyvsp[-2].item)->type() != Item::FIELD_ITEM &&
(yyvsp[-2].item)->type() != Item::REF_ITEM /* For HAVING */ )
(yyvsp[-2].item)->set_name(thd, (yyvsp[-3].simple_string), (uint) ((yyvsp[-1].simple_string) - (yyvsp[-3].simple_string)), thd->charset());
(yyval.item)= (yyvsp[-2].item);
}
#line 41205 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1627: /* sum_expr: AVG_SYM '(' in_sum_expr ')' */
#line 10637 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_sum_avg(thd, (yyvsp[-1].item), FALSE);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41215 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1628: /* sum_expr: AVG_SYM '(' DISTINCT in_sum_expr ')' */
#line 10643 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_sum_avg(thd, (yyvsp[-1].item), TRUE);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41225 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1629: /* sum_expr: BIT_AND '(' in_sum_expr ')' */
#line 10649 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_sum_and(thd, (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41235 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1630: /* sum_expr: BIT_OR '(' in_sum_expr ')' */
#line 10655 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_sum_or(thd, (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41245 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1631: /* sum_expr: BIT_XOR '(' in_sum_expr ')' */
#line 10661 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_sum_xor(thd, (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41255 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1632: /* sum_expr: COUNT_SYM '(' opt_all '*' ')' */
#line 10667 "/home/buildbot/git/sql/sql_yacc.yy"
{
Item *item= new (thd->mem_root) Item_int(thd, (int32) 0L, 1);
if (unlikely(item == NULL))
MYSQL_YYABORT;
(yyval.item)= new (thd->mem_root) Item_sum_count(thd, item);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41268 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1633: /* sum_expr: COUNT_SYM '(' in_sum_expr ')' */
#line 10676 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_sum_count(thd, (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41278 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1634: /* $@143: %empty */
#line 10682 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->in_sum_expr++; }
#line 41284 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1635: /* $@144: %empty */
#line 10684 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->in_sum_expr--; }
#line 41290 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1636: /* sum_expr: COUNT_SYM '(' DISTINCT $@143 expr_list $@144 ')' */
#line 10686 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_sum_count(thd, *(yyvsp[-2].item_list));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41300 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1637: /* sum_expr: MIN_SYM '(' in_sum_expr ')' */
#line 10692 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_sum_min(thd, (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41310 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1638: /* sum_expr: MIN_SYM '(' DISTINCT in_sum_expr ')' */
#line 10703 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_sum_min(thd, (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41320 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1639: /* sum_expr: MAX_SYM '(' in_sum_expr ')' */
#line 10709 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_sum_max(thd, (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41330 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1640: /* sum_expr: MAX_SYM '(' DISTINCT in_sum_expr ')' */
#line 10715 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_sum_max(thd, (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41340 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1641: /* sum_expr: STD_SYM '(' in_sum_expr ')' */
#line 10721 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_sum_std(thd, (yyvsp[-1].item), 0);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41350 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1642: /* sum_expr: VARIANCE_SYM '(' in_sum_expr ')' */
#line 10727 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_sum_variance(thd, (yyvsp[-1].item), 0);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41360 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1643: /* sum_expr: STDDEV_SAMP_SYM '(' in_sum_expr ')' */
#line 10733 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_sum_std(thd, (yyvsp[-1].item), 1);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41370 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1644: /* sum_expr: VAR_SAMP_SYM '(' in_sum_expr ')' */
#line 10739 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_sum_variance(thd, (yyvsp[-1].item), 1);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41380 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1645: /* sum_expr: SUM_SYM '(' in_sum_expr ')' */
#line 10745 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_sum_sum(thd, (yyvsp[-1].item), FALSE);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41390 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1646: /* sum_expr: SUM_SYM '(' DISTINCT in_sum_expr ')' */
#line 10751 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_sum_sum(thd, (yyvsp[-1].item), TRUE);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41400 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1647: /* $@145: %empty */
#line 10757 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->in_sum_expr++; }
#line 41406 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1648: /* sum_expr: GROUP_CONCAT_SYM '(' opt_distinct $@145 expr_list opt_gorder_clause opt_gconcat_separator opt_glimit_clause ')' */
#line 10761 "/home/buildbot/git/sql/sql_yacc.yy"
{
SELECT_LEX *sel= Select;
sel->in_sum_expr--;
(yyval.item)= new (thd->mem_root)
Item_func_group_concat(thd, Lex->current_context(),
(yyvsp[-6].num), (yyvsp[-4].item_list),
sel->gorder_list, (yyvsp[-2].string), (yyvsp[-1].num),
sel->limit_params.select_limit,
sel->limit_params.offset_limit);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
sel->limit_params.clear();
(yyvsp[-4].item_list)->empty();
sel->gorder_list.empty();
}
#line 41426 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1649: /* $@146: %empty */
#line 10777 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->in_sum_expr++; }
#line 41432 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1650: /* sum_expr: JSON_ARRAYAGG_SYM '(' opt_distinct $@146 expr_list opt_gorder_clause opt_glimit_clause ')' */
#line 10780 "/home/buildbot/git/sql/sql_yacc.yy"
{
SELECT_LEX *sel= Select;
List
- *args= (yyvsp[-3].item_list);
sel->in_sum_expr--;
if (args && args->elements > 1)
{
/* JSON_ARRAYAGG supports only one parameter */
my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), "JSON_ARRAYAGG");
MYSQL_YYABORT;
}
String* s= new (thd->mem_root) String(",", 1, &my_charset_latin1);
if (unlikely(s == NULL))
MYSQL_YYABORT;
(yyval.item)= new (thd->mem_root)
Item_func_json_arrayagg(thd, Lex->current_context(),
(yyvsp[-5].num), args,
sel->gorder_list, s, (yyvsp[-1].num),
sel->limit_params.select_limit,
sel->limit_params.offset_limit);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
sel->limit_params.clear();
(yyvsp[-3].item_list)->empty();
sel->gorder_list.empty();
}
#line 41463 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1651: /* $@147: %empty */
#line 10807 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->in_sum_expr++; }
#line 41469 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1652: /* sum_expr: JSON_OBJECTAGG_SYM '(' $@147 expr ',' expr ')' */
#line 10809 "/home/buildbot/git/sql/sql_yacc.yy"
{
SELECT_LEX *sel= Select;
sel->in_sum_expr--;
(yyval.item)= new (thd->mem_root) Item_func_json_objectagg(thd, (yyvsp[-3].item), (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41482 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1653: /* window_func_expr: window_func OVER_SYM window_name */
#line 10821 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_window_func(thd, (Item_sum *) (yyvsp[-2].item), (yyvsp[0].lex_str_ptr));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
if (unlikely(Select->add_window_func((Item_window_func *) (yyval.item))))
MYSQL_YYABORT;
}
#line 41494 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1654: /* window_func_expr: window_func OVER_SYM window_spec */
#line 10830 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (unlikely(Select->add_window_spec(thd, lex->win_ref,
Select->group_list,
Select->order_list,
lex->win_frame)))
MYSQL_YYABORT;
(yyval.item)= new (thd->mem_root) Item_window_func(thd, (Item_sum *) (yyvsp[-2].item),
thd->lex->win_spec);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
if (unlikely(Select->add_window_func((Item_window_func *) (yyval.item))))
MYSQL_YYABORT;
}
#line 41513 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1657: /* window_func: function_call_generic */
#line 10852 "/home/buildbot/git/sql/sql_yacc.yy"
{
Item* item = (Item*)(yyvsp[0].item);
/* Only UDF aggregate here possible */
if ((item == NULL) ||
(item->type() != Item::SUM_FUNC_ITEM)
|| (((Item_sum *)item)->sum_func() != Item_sum::UDF_SUM_FUNC))
{
thd->parse_error();
MYSQL_YYABORT;
}
}
#line 41529 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1658: /* simple_window_func: ROW_NUMBER_SYM '(' ')' */
#line 10867 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_sum_row_number(thd);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41539 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1659: /* simple_window_func: RANK_SYM '(' ')' */
#line 10874 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_sum_rank(thd);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41549 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1660: /* simple_window_func: DENSE_RANK_SYM '(' ')' */
#line 10881 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_sum_dense_rank(thd);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41559 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1661: /* simple_window_func: PERCENT_RANK_SYM '(' ')' */
#line 10888 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_sum_percent_rank(thd);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41569 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1662: /* simple_window_func: CUME_DIST_SYM '(' ')' */
#line 10895 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_sum_cume_dist(thd);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41579 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1663: /* simple_window_func: NTILE_SYM '(' expr ')' */
#line 10902 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_sum_ntile(thd, (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41589 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1664: /* simple_window_func: FIRST_VALUE_SYM '(' expr ')' */
#line 10909 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_sum_first_value(thd, (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41599 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1665: /* simple_window_func: LAST_VALUE '(' expr ')' */
#line 10916 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_sum_last_value(thd, (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41609 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1666: /* simple_window_func: NTH_VALUE_SYM '(' expr ',' expr ')' */
#line 10923 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_sum_nth_value(thd, (yyvsp[-3].item), (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41619 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1667: /* simple_window_func: LEAD_SYM '(' expr ')' */
#line 10930 "/home/buildbot/git/sql/sql_yacc.yy"
{
/* No second argument defaults to 1. */
Item* item_offset= new (thd->mem_root) Item_uint(thd, 1);
if (unlikely(item_offset == NULL))
MYSQL_YYABORT;
(yyval.item)= new (thd->mem_root) Item_sum_lead(thd, (yyvsp[-1].item), item_offset);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41633 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1668: /* simple_window_func: LEAD_SYM '(' expr ',' expr ')' */
#line 10941 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_sum_lead(thd, (yyvsp[-3].item), (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41643 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1669: /* simple_window_func: LAG_SYM '(' expr ')' */
#line 10948 "/home/buildbot/git/sql/sql_yacc.yy"
{
/* No second argument defaults to 1. */
Item* item_offset= new (thd->mem_root) Item_uint(thd, 1);
if (unlikely(item_offset == NULL))
MYSQL_YYABORT;
(yyval.item)= new (thd->mem_root) Item_sum_lag(thd, (yyvsp[-1].item), item_offset);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41657 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1670: /* simple_window_func: LAG_SYM '(' expr ',' expr ')' */
#line 10959 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_sum_lag(thd, (yyvsp[-3].item), (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41667 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1671: /* inverse_distribution_function: percentile_function OVER_SYM '(' opt_window_partition_clause ')' */
#line 10971 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (unlikely(Select->add_window_spec(thd, lex->win_ref,
Select->group_list,
Select->order_list,
NULL)))
MYSQL_YYABORT;
(yyval.item)= new (thd->mem_root) Item_window_func(thd, (Item_sum *) (yyvsp[-4].item),
thd->lex->win_spec);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
if (unlikely(Select->add_window_func((Item_window_func *) (yyval.item))))
MYSQL_YYABORT;
}
#line 41686 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1672: /* $@148: %empty */
#line 10989 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->prepare_add_window_spec(thd); }
#line 41692 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1673: /* percentile_function: inverse_distribution_function_def WITHIN GROUP_SYM '(' $@148 order_by_single_element_list ')' */
#line 10991 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= (yyvsp[-6].item);
}
#line 41700 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1674: /* percentile_function: MEDIAN_SYM '(' expr ')' */
#line 10995 "/home/buildbot/git/sql/sql_yacc.yy"
{
Item *args= new (thd->mem_root) Item_decimal(thd, "0.5", 3,
thd->charset());
if (unlikely(args == NULL) || unlikely(thd->is_error()))
MYSQL_YYABORT;
Select->prepare_add_window_spec(thd);
if (unlikely(add_order_to_list(thd, (yyvsp[-1].item),FALSE)))
MYSQL_YYABORT;
(yyval.item)= new (thd->mem_root) Item_sum_percentile_cont(thd, args);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41718 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1675: /* inverse_distribution_function_def: PERCENTILE_CONT_SYM '(' expr ')' */
#line 11012 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_sum_percentile_cont(thd, (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41728 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1676: /* inverse_distribution_function_def: PERCENTILE_DISC_SYM '(' expr ')' */
#line 11018 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_sum_percentile_disc(thd, (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41738 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1677: /* order_by_single_element_list: ORDER_SYM BY order_ident order_dir */
#line 11027 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(add_order_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
MYSQL_YYABORT;
}
#line 41747 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1678: /* window_name: ident */
#line 11036 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.lex_str_ptr)= (LEX_CSTRING *) thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_CSTRING));
if (unlikely((yyval.lex_str_ptr) == NULL))
MYSQL_YYABORT;
}
#line 41757 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1679: /* $@149: %empty */
#line 11045 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(! Lex->parsing_options.allows_variable))
my_yyabort_error((ER_VIEW_SELECT_VARIABLE, MYF(0)));
}
#line 41766 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1680: /* variable: '@' $@149 variable_aux */
#line 11050 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= (yyvsp[0].item);
}
#line 41774 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1681: /* variable_aux: ident_or_text SET_VAR expr */
#line 11057 "/home/buildbot/git/sql/sql_yacc.yy"
{
Item_func_set_user_var *item;
if (!(yyvsp[-2].lex_str).length)
{
thd->parse_error();
MYSQL_YYABORT;
}
(yyval.item)= item= new (thd->mem_root) Item_func_set_user_var(thd, &(yyvsp[-2].lex_str), (yyvsp[0].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
LEX *lex= Lex;
lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
lex->set_var_list.push_back(item, thd->mem_root);
}
#line 41793 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1682: /* variable_aux: ident_or_text */
#line 11072 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!(yyvsp[0].lex_str).length)
{
thd->parse_error();
MYSQL_YYABORT;
}
(yyval.item)= new (thd->mem_root) Item_func_get_user_var(thd, &(yyvsp[0].lex_str));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
LEX *lex= Lex;
lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
}
#line 41810 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1683: /* variable_aux: '@' opt_var_ident_type ident_sysvar_name */
#line 11085 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->make_item_sysvar(thd, (yyvsp[-1].var_type), &(yyvsp[0].ident_sys)))))
MYSQL_YYABORT;
}
#line 41819 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1684: /* variable_aux: '@' opt_var_ident_type ident_sysvar_name '.' ident */
#line 11090 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->make_item_sysvar(thd, (yyvsp[-3].var_type), &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
MYSQL_YYABORT;
}
#line 41828 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1685: /* opt_distinct: %empty */
#line 11097 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 0; }
#line 41834 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1686: /* opt_distinct: DISTINCT */
#line 11098 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 1; }
#line 41840 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1687: /* opt_gconcat_separator: %empty */
#line 11103 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.string)= new (thd->mem_root) String(",", 1, &my_charset_latin1);
if (unlikely((yyval.string) == NULL))
MYSQL_YYABORT;
}
#line 41850 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1688: /* opt_gconcat_separator: SEPARATOR_SYM text_string */
#line 11108 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.string) = (yyvsp[0].string); }
#line 41856 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1691: /* gorder_list: gorder_list ',' order_ident order_dir */
#line 11118 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(add_gorder_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
MYSQL_YYABORT;
}
#line 41865 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1692: /* gorder_list: order_ident order_dir */
#line 11123 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(add_gorder_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
MYSQL_YYABORT;
}
#line 41874 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1693: /* opt_glimit_clause: %empty */
#line 11130 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 0; }
#line 41880 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1694: /* opt_glimit_clause: glimit_clause */
#line 11131 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 1; }
#line 41886 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1695: /* glimit_clause: LIMIT glimit_options */
#line 11137 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
}
#line 41894 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1696: /* glimit_options: limit_options */
#line 11144 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->limit_params= (yyvsp[0].select_limit);
}
#line 41902 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1697: /* $@150: %empty */
#line 11153 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (unlikely(lex->current_select->inc_in_sum_expr()))
{
thd->parse_error();
MYSQL_YYABORT;
}
}
#line 41915 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1698: /* in_sum_expr: opt_all $@150 expr */
#line 11162 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->in_sum_expr--;
(yyval.item)= (yyvsp[0].item);
}
#line 41924 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1699: /* cast_type: BINARY opt_field_length */
#line 11170 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_long_blob, (yyvsp[0].Lex_length_and_dec), &my_charset_bin); }
#line 41930 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1700: /* cast_type: CHAR_SYM opt_field_length opt_binary */
#line 11172 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyval.Lex_cast_type).set(&type_handler_long_blob, (yyvsp[-1].Lex_length_and_dec), (yyvsp[0].Lex_exact_charset_extended_collation_attrs),
thd->variables.collation_connection))
MYSQL_YYABORT;
}
#line 41940 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1701: /* cast_type: VARCHAR field_length opt_binary */
#line 11178 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyval.Lex_cast_type).set(&type_handler_long_blob, (yyvsp[-1].Lex_length_and_dec), (yyvsp[0].Lex_exact_charset_extended_collation_attrs),
thd->variables.collation_connection))
MYSQL_YYABORT;
}
#line 41950 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1702: /* cast_type: VARCHAR2_ORACLE_SYM field_length opt_binary */
#line 11184 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyval.Lex_cast_type).set(&type_handler_long_blob, (yyvsp[-1].Lex_length_and_dec), (yyvsp[0].Lex_exact_charset_extended_collation_attrs),
thd->variables.collation_connection))
MYSQL_YYABORT;
}
#line 41960 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1703: /* cast_type: NCHAR_SYM opt_field_length */
#line 11190 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_cast_type).set(&type_handler_long_blob, (yyvsp[0].Lex_length_and_dec), national_charset_info);
}
#line 41968 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1704: /* cast_type: cast_type_numeric */
#line 11193 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type)= (yyvsp[0].Lex_cast_type); }
#line 41974 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1705: /* cast_type: cast_type_temporal */
#line 11194 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type)= (yyvsp[0].Lex_cast_type); }
#line 41980 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1706: /* cast_type: udt_name */
#line 11196 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->set_cast_type_udt(&(yyval.Lex_cast_type), (yyvsp[0].lex_str)))
MYSQL_YYABORT;
}
#line 41989 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1707: /* cast_type_numeric: INT_SYM */
#line 11203 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_slonglong); }
#line 41995 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1708: /* cast_type_numeric: SIGNED_SYM */
#line 11204 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_slonglong); }
#line 42001 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1709: /* cast_type_numeric: SIGNED_SYM INT_SYM */
#line 11205 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_slonglong); }
#line 42007 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1710: /* cast_type_numeric: UNSIGNED */
#line 11206 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_ulonglong); }
#line 42013 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1711: /* cast_type_numeric: UNSIGNED INT_SYM */
#line 11207 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_ulonglong); }
#line 42019 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1712: /* cast_type_numeric: DECIMAL_SYM float_options */
#line 11208 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_newdecimal, (yyvsp[0].Lex_length_and_dec)); }
#line 42025 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1713: /* cast_type_numeric: FLOAT_SYM */
#line 11209 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_float); }
#line 42031 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1714: /* cast_type_numeric: DOUBLE_SYM opt_precision */
#line 11210 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_double, (yyvsp[0].Lex_length_and_dec)); }
#line 42037 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1715: /* cast_type_temporal: DATE_SYM */
#line 11214 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_newdate); }
#line 42043 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1716: /* cast_type_temporal: TIME_SYM opt_field_scale */
#line 11215 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_time2, (yyvsp[0].Lex_length_and_dec)); }
#line 42049 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1717: /* cast_type_temporal: DATETIME opt_field_scale */
#line 11216 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_datetime2, (yyvsp[0].Lex_length_and_dec)); }
#line 42055 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1718: /* cast_type_temporal: INTERVAL_SYM DAY_SECOND_SYM field_scale */
#line 11218 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_cast_type).set(&type_handler_interval_DDhhmmssff, (yyvsp[0].Lex_length_and_dec));
}
#line 42063 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1719: /* opt_expr_list: %empty */
#line 11224 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item_list)= NULL; }
#line 42069 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1720: /* opt_expr_list: expr_list */
#line 11225 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item_list)= (yyvsp[0].item_list);}
#line 42075 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1721: /* expr_list: expr */
#line 11230 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item_list)= List
- ::make(thd->mem_root, (yyvsp[0].item)))))
MYSQL_YYABORT;
}
#line 42084 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1722: /* expr_list: expr_list ',' expr */
#line 11235 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[-2].item_list)->push_back((yyvsp[0].item), thd->mem_root);
(yyval.item_list)= (yyvsp[-2].item_list);
}
#line 42093 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1723: /* ident_list_arg: ident_list */
#line 11242 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item_list)= (yyvsp[0].item_list); }
#line 42099 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1724: /* ident_list_arg: '(' ident_list ')' */
#line 11243 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item_list)= (yyvsp[-1].item_list); }
#line 42105 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1725: /* ident_list: simple_ident */
#line 11248 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item_list)= new (thd->mem_root) List
- ;
if (unlikely((yyval.item_list) == NULL) ||
unlikely((yyval.item_list)->push_back((yyvsp[0].item), thd->mem_root)))
MYSQL_YYABORT;
}
#line 42116 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1726: /* ident_list: ident_list ',' simple_ident */
#line 11255 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[-2].item_list)->push_back((yyvsp[0].item), thd->mem_root);
(yyval.item_list)= (yyvsp[-2].item_list);
}
#line 42125 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1727: /* when_list: WHEN_SYM expr THEN_SYM expr */
#line 11263 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item_list)= new (thd->mem_root) List
- ;
if (unlikely((yyval.item_list) == NULL))
MYSQL_YYABORT;
if (unlikely((yyval.item_list)->push_back((yyvsp[-2].item), thd->mem_root) ||
(yyval.item_list)->push_back((yyvsp[0].item), thd->mem_root)))
MYSQL_YYABORT;
}
#line 42138 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1728: /* when_list: when_list WHEN_SYM expr THEN_SYM expr */
#line 11272 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyvsp[-4].item_list)->push_back((yyvsp[-2].item), thd->mem_root) ||
(yyvsp[-4].item_list)->push_back((yyvsp[0].item), thd->mem_root)))
MYSQL_YYABORT;
(yyval.item_list)= (yyvsp[-4].item_list);
}
#line 42149 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1730: /* when_list_opt_else: when_list ELSE expr */
#line 11283 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyvsp[-2].item_list)->push_back((yyvsp[0].item), thd->mem_root)))
MYSQL_YYABORT;
(yyval.item_list)= (yyvsp[-2].item_list);
}
#line 42159 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1731: /* table_ref: table_factor */
#line 11293 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)= (yyvsp[0].table_list); }
#line 42165 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1732: /* table_ref: join_table */
#line 11295 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (unlikely(!((yyval.table_list)= lex->current_select->nest_last_join(thd))))
{
thd->parse_error();
MYSQL_YYABORT;
}
}
#line 42178 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1733: /* json_text_literal: TEXT_STRING */
#line 11307 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->json_table->m_text_literal_cs= NULL;
}
#line 42186 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1734: /* json_text_literal: NCHAR_STRING */
#line 11311 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->json_table->m_text_literal_cs= national_charset_info;
}
#line 42194 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1735: /* json_text_literal: UNDERSCORE_CHARSET TEXT_STRING */
#line 11315 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->json_table->m_text_literal_cs= (yyvsp[-1].charset);
(yyval.lex_string_with_metadata)= (yyvsp[0].lex_string_with_metadata);
}
#line 42203 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1737: /* json_text_literal_or_num: NUM */
#line 11324 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->json_table->m_text_literal_cs= NULL;
}
#line 42211 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1738: /* json_text_literal_or_num: LONG_NUM */
#line 11328 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->json_table->m_text_literal_cs= NULL;
}
#line 42219 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1739: /* json_text_literal_or_num: DECIMAL_NUM */
#line 11332 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->json_table->m_text_literal_cs= NULL;
}
#line 42227 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1740: /* json_text_literal_or_num: FLOAT_NUM */
#line 11336 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->json_table->m_text_literal_cs= NULL;
}
#line 42235 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1741: /* join_table_list: derived_table_list */
#line 11342 "/home/buildbot/git/sql/sql_yacc.yy"
{ MYSQL_YYABORT_UNLESS((yyval.table_list)=(yyvsp[0].table_list)); }
#line 42241 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1742: /* json_table_columns_clause: COLUMNS '(' json_table_columns_list ')' */
#line 11347 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 42247 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1744: /* json_table_columns_list: json_table_columns_list ',' json_table_column */
#line 11353 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 42253 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1745: /* $@151: %empty */
#line 11358 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
Create_field *f= new (thd->mem_root) Create_field();
if (unlikely(check_string_char_length(&(yyvsp[0].ident_sys), 0, NAME_CHAR_LEN,
system_charset_info, 1)))
my_yyabort_error((ER_TOO_LONG_IDENT, MYF(0), (yyvsp[0].ident_sys).str));
lex->json_table->m_cur_json_table_column=
new (thd->mem_root) Json_table_column(f,
lex->json_table->get_cur_nested_path());
if (unlikely(!f ||
!lex->json_table->m_cur_json_table_column))
MYSQL_YYABORT;
lex->init_last_field(f, &(yyvsp[0].ident_sys));
}
#line 42276 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1746: /* json_table_column: ident $@151 json_table_column_type */
#line 11377 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
if (unlikely(lex->json_table->
m_cur_json_table_column->m_field->check(thd)))
MYSQL_YYABORT;
lex->json_table->m_columns.push_back(
lex->json_table->m_cur_json_table_column, thd->mem_root);
}
#line 42289 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1747: /* $@152: %empty */
#line 11386 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
Json_table_nested_path *np= new (thd->mem_root)
Json_table_nested_path();
np->set_path(thd, (yyvsp[0].lex_string_with_metadata));
lex->json_table->start_nested_path(np);
}
#line 42301 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1748: /* json_table_column: NESTED_SYM PATH_SYM json_text_literal $@152 json_table_columns_clause */
#line 11394 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->json_table->end_nested_path();
}
#line 42310 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1749: /* json_table_column_type: FOR_SYM ORDINALITY_SYM */
#line 11402 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex_field_type_st type;
type.set(&type_handler_slong);
Lex->last_field->set_attributes(thd, type,
COLUMN_DEFINITION_TABLE_FIELD);
Lex->json_table->m_cur_json_table_column->
set(Json_table_column::FOR_ORDINALITY);
}
#line 42323 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1750: /* json_table_column_type: json_table_field_type PATH_SYM json_text_literal json_opt_on_empty_or_error */
#line 11412 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->set_attributes(thd, (yyvsp[-3].Lex_field_type),
COLUMN_DEFINITION_TABLE_FIELD);
if (Lex->json_table->m_cur_json_table_column->
set(thd, Json_table_column::PATH, (yyvsp[-1].lex_string_with_metadata),
(yyvsp[-3].Lex_field_type).charset_collation_attrs()))
{
MYSQL_YYABORT;
}
}
#line 42338 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1751: /* json_table_column_type: json_table_field_type EXISTS PATH_SYM json_text_literal */
#line 11423 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->set_attributes(thd, (yyvsp[-3].Lex_field_type),
COLUMN_DEFINITION_TABLE_FIELD);
if (Lex->json_table->m_cur_json_table_column->
set(thd, Json_table_column::EXISTS_PATH, (yyvsp[0].lex_string_with_metadata),
(yyvsp[-3].Lex_field_type).charset_collation_attrs()))
MYSQL_YYABORT;
}
#line 42351 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1756: /* json_opt_on_empty_or_error: %empty */
#line 11442 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 42357 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1761: /* json_on_response: ERROR_SYM */
#line 11451 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.json_on_response).m_response= Json_table_column::RESPONSE_ERROR;
}
#line 42365 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1762: /* json_on_response: NULL_SYM */
#line 11455 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.json_on_response).m_response= Json_table_column::RESPONSE_NULL;
}
#line 42373 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1763: /* json_on_response: DEFAULT json_text_literal_or_num */
#line 11459 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.json_on_response).m_response= Json_table_column::RESPONSE_DEFAULT;
(yyval.json_on_response).m_default= (yyvsp[0].lex_string_with_metadata);
Lex->json_table->m_cur_json_table_column->m_defaults_cs=
thd->variables.collation_connection;
}
#line 42384 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1764: /* json_on_error_response: json_on_response ON ERROR_SYM */
#line 11469 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->json_table->m_cur_json_table_column->m_on_error= (yyvsp[-2].json_on_response);
}
#line 42392 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1765: /* json_on_empty_response: json_on_response ON EMPTY_SYM */
#line 11476 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->json_table->m_cur_json_table_column->m_on_empty= (yyvsp[-2].json_on_response);
}
#line 42400 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1766: /* $@153: %empty */
#line 11483 "/home/buildbot/git/sql/sql_yacc.yy"
{
push_table_function_arg_context(Lex, thd->mem_root);
//TODO: introduce IN_TABLE_FUNC_ARGUMENT?
Select->parsing_place= IN_ON;
}
#line 42410 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1767: /* $@154: %empty */
#line 11489 "/home/buildbot/git/sql/sql_yacc.yy"
{
Table_function_json_table *jt=
new (thd->mem_root) Table_function_json_table((yyvsp[-1].item));
if (unlikely(!jt))
MYSQL_YYABORT;
/* See comment for class Table_function_json_table: */
Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
Lex->json_table= jt;
Select->parsing_place= NO_MATTER;
jt->set_name_resolution_context(Lex->pop_context());
}
#line 42427 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1768: /* table_function: JSON_TABLE_SYM '(' $@153 expr ',' $@154 json_text_literal json_table_columns_clause ')' opt_table_alias_clause */
#line 11502 "/home/buildbot/git/sql/sql_yacc.yy"
{
SELECT_LEX *sel= Select;
if (unlikely((yyvsp[0].lex_str_ptr) == NULL))
{
/* Alias is not optional. */
my_error(ER_JSON_TABLE_ALIAS_REQUIRED, MYF(0));
MYSQL_YYABORT;
}
if (unlikely(Lex->json_table->m_nested_path.set_path(thd, (yyvsp[-3].lex_string_with_metadata))))
MYSQL_YYABORT;
if (!((yyval.table_list)= sel->add_table_to_list(thd,
new (thd->mem_root) Table_ident(thd, &any_db,
(yyvsp[0].lex_str_ptr), TRUE),
NULL,
TL_OPTION_TABLE_FUNCTION,
YYPS->m_lock_type,
YYPS->m_mdl_type,
0,0,0)))
MYSQL_YYABORT;
(yyval.table_list)->table_function= Lex->json_table;
Lex->json_table= 0;
status_var_increment(thd->status_var.feature_json);
}
#line 42455 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1769: /* esc_table_ref: table_ref */
#line 11535 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)=(yyvsp[0].table_list); }
#line 42461 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1770: /* esc_table_ref: '{' ident table_ref '}' */
#line 11536 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)=(yyvsp[-1].table_list); }
#line 42467 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1771: /* derived_table_list: esc_table_ref */
#line 11543 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.table_list)=(yyvsp[0].table_list);
Select->add_joined_table((yyvsp[0].table_list));
}
#line 42476 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1772: /* derived_table_list: derived_table_list ',' esc_table_ref */
#line 11548 "/home/buildbot/git/sql/sql_yacc.yy"
{
MYSQL_YYABORT_UNLESS((yyvsp[-2].table_list) && ((yyval.table_list)=(yyvsp[0].table_list)));
Select->add_joined_table((yyvsp[0].table_list));
}
#line 42485 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1773: /* join_table: table_ref normal_join table_ref */
#line 11562 "/home/buildbot/git/sql/sql_yacc.yy"
{
MYSQL_YYABORT_UNLESS((yyvsp[-2].table_list) && ((yyval.table_list)=(yyvsp[0].table_list)));
if (unlikely(Select->add_cross_joined_table((yyvsp[-2].table_list), (yyvsp[0].table_list), (yyvsp[-1].num))))
MYSQL_YYABORT;
}
#line 42495 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1774: /* $@155: %empty */
#line 11569 "/home/buildbot/git/sql/sql_yacc.yy"
{
MYSQL_YYABORT_UNLESS((yyvsp[-3].table_list) && (yyvsp[-1].table_list));
Select->add_joined_table((yyvsp[-3].table_list));
Select->add_joined_table((yyvsp[-1].table_list));
/* Change the current name resolution context to a local context. */
if (unlikely(push_new_name_resolution_context(thd, (yyvsp[-3].table_list), (yyvsp[-1].table_list))))
MYSQL_YYABORT;
Select->parsing_place= IN_ON;
}
#line 42509 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1775: /* join_table: table_ref normal_join table_ref ON $@155 expr */
#line 11579 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[-3].table_list)->straight=(yyvsp[-4].num);
add_join_on(thd, (yyvsp[-3].table_list), (yyvsp[0].item));
(yyvsp[-3].table_list)->on_context= Lex->pop_context();
Select->parsing_place= NO_MATTER;
}
#line 42520 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1776: /* $@156: %empty */
#line 11587 "/home/buildbot/git/sql/sql_yacc.yy"
{
MYSQL_YYABORT_UNLESS((yyvsp[-3].table_list) && (yyvsp[-1].table_list));
Select->add_joined_table((yyvsp[-3].table_list));
Select->add_joined_table((yyvsp[-1].table_list));
}
#line 42530 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1777: /* join_table: table_ref normal_join table_ref USING $@156 '(' using_list ')' */
#line 11593 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[-5].table_list)->straight=(yyvsp[-6].num);
add_join_natural((yyvsp[-7].table_list),(yyvsp[-5].table_list),(yyvsp[-1].string_list),Select);
(yyval.table_list)=(yyvsp[-5].table_list);
}
#line 42540 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1778: /* join_table: table_ref NATURAL inner_join table_factor */
#line 11599 "/home/buildbot/git/sql/sql_yacc.yy"
{
MYSQL_YYABORT_UNLESS((yyvsp[-3].table_list) && ((yyval.table_list)=(yyvsp[0].table_list)));
Select->add_joined_table((yyvsp[-3].table_list));
Select->add_joined_table((yyvsp[0].table_list));
(yyvsp[0].table_list)->straight=(yyvsp[-1].num);
add_join_natural((yyvsp[-3].table_list),(yyvsp[0].table_list),NULL,Select);
}
#line 42552 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1779: /* $@157: %empty */
#line 11610 "/home/buildbot/git/sql/sql_yacc.yy"
{
MYSQL_YYABORT_UNLESS((yyvsp[-5].table_list) && (yyvsp[-1].table_list));
Select->add_joined_table((yyvsp[-5].table_list));
Select->add_joined_table((yyvsp[-1].table_list));
/* Change the current name resolution context to a local context. */
if (unlikely(push_new_name_resolution_context(thd, (yyvsp[-5].table_list), (yyvsp[-1].table_list))))
MYSQL_YYABORT;
Select->parsing_place= IN_ON;
}
#line 42566 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1780: /* join_table: table_ref LEFT opt_outer JOIN_SYM table_ref ON $@157 expr */
#line 11620 "/home/buildbot/git/sql/sql_yacc.yy"
{
add_join_on(thd, (yyvsp[-3].table_list), (yyvsp[0].item));
(yyvsp[-3].table_list)->on_context= Lex->pop_context();
(yyvsp[-3].table_list)->outer_join|=JOIN_TYPE_LEFT;
(yyval.table_list)=(yyvsp[-3].table_list);
Select->parsing_place= NO_MATTER;
}
#line 42578 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1781: /* $@158: %empty */
#line 11628 "/home/buildbot/git/sql/sql_yacc.yy"
{
MYSQL_YYABORT_UNLESS((yyvsp[-4].table_list) && (yyvsp[0].table_list));
Select->add_joined_table((yyvsp[-4].table_list));
Select->add_joined_table((yyvsp[0].table_list));
}
#line 42588 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1782: /* join_table: table_ref LEFT opt_outer JOIN_SYM table_factor $@158 USING '(' using_list ')' */
#line 11634 "/home/buildbot/git/sql/sql_yacc.yy"
{
add_join_natural((yyvsp[-9].table_list),(yyvsp[-5].table_list),(yyvsp[-1].string_list),Select);
(yyvsp[-5].table_list)->outer_join|=JOIN_TYPE_LEFT;
(yyval.table_list)=(yyvsp[-5].table_list);
}
#line 42598 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1783: /* join_table: table_ref NATURAL LEFT opt_outer JOIN_SYM table_factor */
#line 11640 "/home/buildbot/git/sql/sql_yacc.yy"
{
MYSQL_YYABORT_UNLESS((yyvsp[-5].table_list) && (yyvsp[0].table_list));
Select->add_joined_table((yyvsp[-5].table_list));
Select->add_joined_table((yyvsp[0].table_list));
add_join_natural((yyvsp[-5].table_list),(yyvsp[0].table_list),NULL,Select);
(yyvsp[0].table_list)->outer_join|=JOIN_TYPE_LEFT;
(yyval.table_list)=(yyvsp[0].table_list);
}
#line 42611 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1784: /* $@159: %empty */
#line 11652 "/home/buildbot/git/sql/sql_yacc.yy"
{
MYSQL_YYABORT_UNLESS((yyvsp[-5].table_list) && (yyvsp[-1].table_list));
Select->add_joined_table((yyvsp[-5].table_list));
Select->add_joined_table((yyvsp[-1].table_list));
/* Change the current name resolution context to a local context. */
if (unlikely(push_new_name_resolution_context(thd, (yyvsp[-5].table_list), (yyvsp[-1].table_list))))
MYSQL_YYABORT;
Select->parsing_place= IN_ON;
}
#line 42625 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1785: /* join_table: table_ref RIGHT opt_outer JOIN_SYM table_ref ON $@159 expr */
#line 11662 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (unlikely(!((yyval.table_list)= lex->current_select->convert_right_join())))
MYSQL_YYABORT;
add_join_on(thd, (yyval.table_list), (yyvsp[0].item));
(yyvsp[-7].table_list)->on_context= Lex->pop_context();
Select->parsing_place= NO_MATTER;
}
#line 42638 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1786: /* $@160: %empty */
#line 11671 "/home/buildbot/git/sql/sql_yacc.yy"
{
MYSQL_YYABORT_UNLESS((yyvsp[-4].table_list) && (yyvsp[0].table_list));
Select->add_joined_table((yyvsp[-4].table_list));
Select->add_joined_table((yyvsp[0].table_list));
}
#line 42648 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1787: /* join_table: table_ref RIGHT opt_outer JOIN_SYM table_factor $@160 USING '(' using_list ')' */
#line 11677 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (unlikely(!((yyval.table_list)= lex->current_select->convert_right_join())))
MYSQL_YYABORT;
add_join_natural((yyval.table_list),(yyvsp[-5].table_list),(yyvsp[-1].string_list),Select);
}
#line 42659 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1788: /* join_table: table_ref NATURAL RIGHT opt_outer JOIN_SYM table_factor */
#line 11684 "/home/buildbot/git/sql/sql_yacc.yy"
{
MYSQL_YYABORT_UNLESS((yyvsp[-5].table_list) && (yyvsp[0].table_list));
Select->add_joined_table((yyvsp[-5].table_list));
Select->add_joined_table((yyvsp[0].table_list));
add_join_natural((yyvsp[0].table_list),(yyvsp[-5].table_list),NULL,Select);
LEX *lex= Lex;
if (unlikely(!((yyval.table_list)= lex->current_select->convert_right_join())))
MYSQL_YYABORT;
}
#line 42673 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1789: /* inner_join: JOIN_SYM */
#line 11697 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 0; }
#line 42679 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1790: /* inner_join: INNER_SYM JOIN_SYM */
#line 11698 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 0; }
#line 42685 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1791: /* inner_join: STRAIGHT_JOIN */
#line 11699 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 1; }
#line 42691 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1792: /* normal_join: inner_join */
#line 11703 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = (yyvsp[0].num); }
#line 42697 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1793: /* normal_join: CROSS JOIN_SYM */
#line 11704 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 0; }
#line 42703 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1794: /* opt_use_partition: %empty */
#line 11712 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.string_list)= 0;}
#line 42709 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1796: /* use_partition: PARTITION_SYM '(' using_list ')' have_partitioning */
#line 11718 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.string_list)= (yyvsp[-2].string_list);
Select->parsing_place= Select->save_parsing_place;
Select->save_parsing_place= NO_MATTER;
}
#line 42719 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1797: /* table_factor: table_primary_ident_opt_parens */
#line 11726 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)= (yyvsp[0].table_list); }
#line 42725 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1798: /* table_factor: table_primary_derived_opt_parens */
#line 11727 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)= (yyvsp[0].table_list); }
#line 42731 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1799: /* table_factor: join_table_parens */
#line 11729 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[0].table_list)->nested_join->nest_type= 0;
(yyval.table_list)= (yyvsp[0].table_list);
}
#line 42740 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1800: /* table_factor: table_reference_list_parens */
#line 11733 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)= (yyvsp[0].table_list); }
#line 42746 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1801: /* table_factor: table_function */
#line 11734 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)= (yyvsp[0].table_list); }
#line 42752 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1802: /* table_primary_ident_opt_parens: table_primary_ident */
#line 11738 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)= (yyvsp[0].table_list); }
#line 42758 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1803: /* table_primary_ident_opt_parens: '(' table_primary_ident_opt_parens ')' */
#line 11739 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)= (yyvsp[-1].table_list); }
#line 42764 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1804: /* table_primary_derived_opt_parens: table_primary_derived */
#line 11743 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)= (yyvsp[0].table_list); }
#line 42770 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1805: /* table_primary_derived_opt_parens: '(' table_primary_derived_opt_parens ')' */
#line 11744 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)= (yyvsp[-1].table_list); }
#line 42776 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1806: /* table_reference_list_parens: '(' table_reference_list_parens ')' */
#line 11748 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)= (yyvsp[-1].table_list); }
#line 42782 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1807: /* table_reference_list_parens: '(' nested_table_reference_list ')' */
#line 11750 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.table_list)= Select->end_nested_join(thd)))
MYSQL_YYABORT;
}
#line 42791 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1808: /* nested_table_reference_list: table_ref ',' table_ref */
#line 11758 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Select->init_nested_join(thd))
MYSQL_YYABORT;
Select->add_joined_table((yyvsp[-2].table_list));
Select->add_joined_table((yyvsp[0].table_list));
(yyval.table_list)= (yyvsp[-2].table_list)->embedding;
}
#line 42803 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1809: /* nested_table_reference_list: nested_table_reference_list ',' table_ref */
#line 11766 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->add_joined_table((yyvsp[0].table_list));
(yyval.table_list)= (yyvsp[-2].table_list);
}
#line 42812 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1810: /* join_table_parens: '(' join_table_parens ')' */
#line 11773 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)= (yyvsp[-1].table_list); }
#line 42818 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1811: /* join_table_parens: '(' join_table ')' */
#line 11775 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (!((yyval.table_list)= lex->current_select->nest_last_join(thd)))
{
thd->parse_error();
MYSQL_YYABORT;
}
}
#line 42831 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1812: /* table_primary_ident: table_ident opt_use_partition opt_for_system_time_clause opt_table_alias_clause opt_key_definition */
#line 11789 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.table_list)= Select->add_table_to_list(thd, (yyvsp[-4].table), (yyvsp[-1].lex_str_ptr),
0,
YYPS->m_lock_type,
YYPS->m_mdl_type,
Select->pop_index_hints(),
(yyvsp[-3].string_list))))
MYSQL_YYABORT;
if ((yyvsp[-2].num))
(yyval.table_list)->vers_conditions= Lex->vers_conditions;
}
#line 42847 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1813: /* table_primary_derived: subquery opt_for_system_time_clause table_alias_clause */
#line 11805 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.table_list)= Lex->parsed_derived_table((yyvsp[-2].select_lex)->master_unit(), (yyvsp[-1].num), (yyvsp[0].lex_str_ptr))))
MYSQL_YYABORT;
}
#line 42856 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1814: /* table_primary_derived: subquery opt_for_system_time_clause */
#line 11812 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX_CSTRING alias;
if ((yyvsp[-1].select_lex)->make_unique_derived_name(thd, &alias) ||
!((yyval.table_list)= Lex->parsed_derived_table((yyvsp[-1].select_lex)->master_unit(), (yyvsp[0].num), &alias)))
MYSQL_YYABORT;
}
#line 42867 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1815: /* opt_outer: %empty */
#line 11822 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 42873 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1816: /* opt_outer: OUTER */
#line 11823 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 42879 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1817: /* index_hint_clause: %empty */
#line 11828 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= (thd->variables.old_behavior & OLD_MODE_IGNORE_INDEX_ONLY_FOR_JOIN) ?
INDEX_HINT_MASK_JOIN : INDEX_HINT_MASK_ALL;
}
#line 42888 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1818: /* index_hint_clause: FOR_SYM JOIN_SYM */
#line 11832 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= INDEX_HINT_MASK_JOIN; }
#line 42894 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1819: /* index_hint_clause: FOR_SYM ORDER_SYM BY */
#line 11833 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= INDEX_HINT_MASK_ORDER; }
#line 42900 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1820: /* index_hint_clause: FOR_SYM GROUP_SYM BY */
#line 11834 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= INDEX_HINT_MASK_GROUP; }
#line 42906 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1821: /* index_hint_type: FORCE_SYM */
#line 11838 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.index_hint)= INDEX_HINT_FORCE; }
#line 42912 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1822: /* index_hint_type: IGNORE_SYM */
#line 11839 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.index_hint)= INDEX_HINT_IGNORE; }
#line 42918 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1823: /* $@161: %empty */
#line 11844 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->set_index_hint_type((yyvsp[-2].index_hint), (yyvsp[0].num));
}
#line 42926 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1825: /* $@162: %empty */
#line 11849 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->set_index_hint_type(INDEX_HINT_USE, (yyvsp[0].num));
}
#line 42934 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1830: /* $@163: %empty */
#line 11862 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->alloc_index_hints(thd); }
#line 42940 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1832: /* $@164: %empty */
#line 11866 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->clear_index_hints(); }
#line 42946 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1834: /* opt_key_usage_list: %empty */
#line 11871 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->add_index_hint(thd, NULL, 0); }
#line 42952 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1835: /* opt_key_usage_list: key_usage_list */
#line 11872 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 42958 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1836: /* key_usage_element: ident */
#line 11877 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->add_index_hint(thd, (yyvsp[0].ident_sys).str, (yyvsp[0].ident_sys).length); }
#line 42964 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1837: /* key_usage_element: PRIMARY_SYM */
#line 11879 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->add_index_hint(thd, "PRIMARY", 7); }
#line 42970 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1840: /* using_list: ident */
#line 11889 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.string_list)= new (thd->mem_root) List
)))
MYSQL_YYABORT;
String *s= new (thd->mem_root) String((const char*) (yyvsp[0].ident_sys).str,
(yyvsp[0].ident_sys).length,
system_charset_info);
if (unlikely(unlikely(s == NULL)))
MYSQL_YYABORT;
(yyval.string_list)->push_back(s, thd->mem_root);
}
#line 42985 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1841: /* using_list: using_list ',' ident */
#line 11900 "/home/buildbot/git/sql/sql_yacc.yy"
{
String *s= new (thd->mem_root) String((const char*) (yyvsp[0].ident_sys).str,
(yyvsp[0].ident_sys).length,
system_charset_info);
if (unlikely(unlikely(s == NULL)))
MYSQL_YYABORT;
if (unlikely((yyvsp[-2].string_list)->push_back(s, thd->mem_root)))
MYSQL_YYABORT;
(yyval.string_list)= (yyvsp[-2].string_list);
}
#line 43000 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1842: /* interval: interval_time_stamp */
#line 11913 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 43006 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1843: /* interval: DAY_HOUR_SYM */
#line 11914 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_DAY_HOUR; }
#line 43012 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1844: /* interval: DAY_MICROSECOND_SYM */
#line 11915 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_DAY_MICROSECOND; }
#line 43018 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1845: /* interval: DAY_MINUTE_SYM */
#line 11916 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_DAY_MINUTE; }
#line 43024 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1846: /* interval: DAY_SECOND_SYM */
#line 11917 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_DAY_SECOND; }
#line 43030 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1847: /* interval: HOUR_MICROSECOND_SYM */
#line 11918 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_HOUR_MICROSECOND; }
#line 43036 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1848: /* interval: HOUR_MINUTE_SYM */
#line 11919 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_HOUR_MINUTE; }
#line 43042 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1849: /* interval: HOUR_SECOND_SYM */
#line 11920 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_HOUR_SECOND; }
#line 43048 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1850: /* interval: MINUTE_MICROSECOND_SYM */
#line 11921 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_MINUTE_MICROSECOND; }
#line 43054 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1851: /* interval: MINUTE_SECOND_SYM */
#line 11922 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_MINUTE_SECOND; }
#line 43060 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1852: /* interval: SECOND_MICROSECOND_SYM */
#line 11923 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_SECOND_MICROSECOND; }
#line 43066 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1853: /* interval: YEAR_MONTH_SYM */
#line 11924 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_YEAR_MONTH; }
#line 43072 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1854: /* interval_time_stamp: DAY_SYM */
#line 11928 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval_time_st)=INTERVAL_DAY; }
#line 43078 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1855: /* interval_time_stamp: WEEK_SYM */
#line 11929 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval_time_st)=INTERVAL_WEEK; }
#line 43084 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1856: /* interval_time_stamp: HOUR_SYM */
#line 11930 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval_time_st)=INTERVAL_HOUR; }
#line 43090 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1857: /* interval_time_stamp: MINUTE_SYM */
#line 11931 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval_time_st)=INTERVAL_MINUTE; }
#line 43096 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1858: /* interval_time_stamp: MONTH_SYM */
#line 11932 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval_time_st)=INTERVAL_MONTH; }
#line 43102 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1859: /* interval_time_stamp: QUARTER_SYM */
#line 11933 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval_time_st)=INTERVAL_QUARTER; }
#line 43108 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1860: /* interval_time_stamp: SECOND_SYM */
#line 11934 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval_time_st)=INTERVAL_SECOND; }
#line 43114 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1861: /* interval_time_stamp: MICROSECOND_SYM */
#line 11935 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval_time_st)=INTERVAL_MICROSECOND; }
#line 43120 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1862: /* interval_time_stamp: YEAR_SYM */
#line 11936 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval_time_st)=INTERVAL_YEAR; }
#line 43126 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1863: /* date_time_type: DATE_SYM */
#line 11940 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.date_time_type)=MYSQL_TIMESTAMP_DATE;}
#line 43132 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1864: /* date_time_type: TIME_SYM */
#line 11941 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.date_time_type)=MYSQL_TIMESTAMP_TIME;}
#line 43138 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1865: /* date_time_type: DATETIME */
#line 11942 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.date_time_type)=MYSQL_TIMESTAMP_DATETIME;}
#line 43144 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1866: /* date_time_type: TIMESTAMP */
#line 11943 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.date_time_type)=MYSQL_TIMESTAMP_DATETIME;}
#line 43150 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1870: /* opt_table_alias_clause: %empty */
#line 11953 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str_ptr)=0; }
#line 43156 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1871: /* opt_table_alias_clause: table_alias_clause */
#line 11954 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str_ptr)= (yyvsp[0].lex_str_ptr); }
#line 43162 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1872: /* table_alias_clause: table_alias ident_table_alias */
#line 11959 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.lex_str_ptr)= (LEX_CSTRING*) thd->memdup(&(yyvsp[0].ident_sys),sizeof(LEX_STRING));
if (unlikely((yyval.lex_str_ptr) == NULL))
MYSQL_YYABORT;
}
#line 43172 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1875: /* opt_where_clause: %empty */
#line 11972 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->where= 0; }
#line 43178 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1876: /* $@165: %empty */
#line 11974 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->parsing_place= IN_WHERE;
}
#line 43186 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1877: /* opt_where_clause: WHERE $@165 expr */
#line 11978 "/home/buildbot/git/sql/sql_yacc.yy"
{
SELECT_LEX *select= Select;
select->where= normalize_cond(thd, (yyvsp[0].item));
select->parsing_place= NO_MATTER;
if ((yyvsp[0].item))
(yyvsp[0].item)->top_level_item();
}
#line 43198 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1879: /* $@166: %empty */
#line 11990 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->parsing_place= IN_HAVING;
}
#line 43206 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1880: /* opt_having_clause: HAVING $@166 expr */
#line 11994 "/home/buildbot/git/sql/sql_yacc.yy"
{
SELECT_LEX *sel= Select;
sel->having= normalize_cond(thd, (yyvsp[0].item));
sel->parsing_place= NO_MATTER;
if ((yyvsp[0].item))
(yyvsp[0].item)->top_level_item();
}
#line 43218 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1883: /* group_list: group_list ',' order_ident order_dir */
#line 12014 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(add_group_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
MYSQL_YYABORT;
}
#line 43227 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1884: /* group_list: order_ident order_dir */
#line 12019 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(add_group_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
MYSQL_YYABORT;
}
#line 43236 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1885: /* olap_opt: %empty */
#line 12026 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 43242 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1886: /* olap_opt: WITH_CUBE_SYM */
#line 12028 "/home/buildbot/git/sql/sql_yacc.yy"
{
/*
'WITH CUBE' is reserved in the MySQL syntax, but not implemented,
and cause LALR(2) conflicts.
This syntax is not standard.
MySQL syntax: GROUP BY col1, col2, col3 WITH CUBE
SQL-2003: GROUP BY ... CUBE(col1, col2, col3)
*/
LEX *lex=Lex;
if (unlikely(lex->current_select->get_linkage() == GLOBAL_OPTIONS_TYPE))
my_yyabort_error((ER_WRONG_USAGE, MYF(0), "WITH CUBE",
"global union parameters"));
lex->current_select->olap= CUBE_TYPE;
my_yyabort_error((ER_NOT_SUPPORTED_YET, MYF(0), "CUBE"));
}
#line 43263 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1887: /* olap_opt: WITH_ROLLUP_SYM */
#line 12045 "/home/buildbot/git/sql/sql_yacc.yy"
{
/*
'WITH ROLLUP' is needed for backward compatibility,
and cause LALR(2) conflicts.
This syntax is not standard.
MySQL syntax: GROUP BY col1, col2, col3 WITH ROLLUP
SQL-2003: GROUP BY ... ROLLUP(col1, col2, col3)
*/
LEX *lex= Lex;
if (unlikely(lex->current_select->get_linkage() == GLOBAL_OPTIONS_TYPE))
my_yyabort_error((ER_WRONG_USAGE, MYF(0), "WITH ROLLUP",
"global union parameters"));
lex->current_select->olap= ROLLUP_TYPE;
}
#line 43282 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1888: /* opt_window_clause: %empty */
#line 12067 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 43288 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1889: /* opt_window_clause: WINDOW_SYM window_def_list */
#line 12070 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 43294 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1892: /* window_def: window_name AS window_spec */
#line 12080 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (unlikely(Select->add_window_def(thd, (yyvsp[-2].lex_str_ptr), lex->win_ref,
Select->group_list,
Select->order_list,
lex->win_frame)))
MYSQL_YYABORT;
}
#line 43307 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1893: /* $@167: %empty */
#line 12092 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->prepare_add_window_spec(thd); }
#line 43313 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1894: /* window_spec: '(' $@167 opt_window_ref opt_window_partition_clause opt_window_order_clause opt_window_frame_clause ')' */
#line 12096 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 43319 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1895: /* opt_window_ref: %empty */
#line 12100 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 43325 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1896: /* opt_window_ref: ident */
#line 12102 "/home/buildbot/git/sql/sql_yacc.yy"
{
thd->lex->win_ref= (LEX_CSTRING *) thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_CSTRING));
if (unlikely(thd->lex->win_ref == NULL))
MYSQL_YYABORT;
}
#line 43335 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1897: /* opt_window_partition_clause: %empty */
#line 12110 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 43341 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1899: /* opt_window_order_clause: %empty */
#line 12115 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 43347 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1900: /* opt_window_order_clause: ORDER_SYM BY order_list */
#line 12116 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->order_list= *((yyvsp[0].select_order)); }
#line 43353 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1901: /* opt_window_frame_clause: %empty */
#line 12120 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 43359 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1902: /* opt_window_frame_clause: window_frame_units window_frame_extent opt_window_frame_exclusion */
#line 12122 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->win_frame=
new (thd->mem_root) Window_frame((yyvsp[-2].frame_units),
lex->frame_top_bound,
lex->frame_bottom_bound,
(yyvsp[0].frame_exclusion));
if (unlikely(lex->win_frame == NULL))
MYSQL_YYABORT;
}
#line 43374 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1903: /* window_frame_units: ROWS_SYM */
#line 12135 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.frame_units)= Window_frame::UNITS_ROWS; }
#line 43380 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1904: /* window_frame_units: RANGE_SYM */
#line 12136 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.frame_units)= Window_frame::UNITS_RANGE; }
#line 43386 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1905: /* window_frame_extent: window_frame_start */
#line 12141 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->frame_top_bound= (yyvsp[0].window_frame_bound);
lex->frame_bottom_bound=
new (thd->mem_root)
Window_frame_bound(Window_frame_bound::CURRENT, NULL);
if (unlikely(lex->frame_bottom_bound == NULL))
MYSQL_YYABORT;
}
#line 43400 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1906: /* window_frame_extent: BETWEEN_SYM window_frame_bound AND_SYM window_frame_bound */
#line 12151 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->frame_top_bound= (yyvsp[-2].window_frame_bound);
lex->frame_bottom_bound= (yyvsp[0].window_frame_bound);
}
#line 43410 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1907: /* window_frame_start: UNBOUNDED_SYM PRECEDING_SYM */
#line 12160 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.window_frame_bound)= new (thd->mem_root)
Window_frame_bound(Window_frame_bound::PRECEDING, NULL);
if (unlikely((yyval.window_frame_bound) == NULL))
MYSQL_YYABORT;
}
#line 43421 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1908: /* window_frame_start: CURRENT_SYM ROW_SYM */
#line 12167 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.window_frame_bound)= new (thd->mem_root)
Window_frame_bound(Window_frame_bound::CURRENT, NULL);
if (unlikely((yyval.window_frame_bound) == NULL))
MYSQL_YYABORT;
}
#line 43432 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1909: /* window_frame_start: literal PRECEDING_SYM */
#line 12174 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.window_frame_bound)= new (thd->mem_root)
Window_frame_bound(Window_frame_bound::PRECEDING, (yyvsp[-1].item));
if (unlikely((yyval.window_frame_bound) == NULL))
MYSQL_YYABORT;
}
#line 43443 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1910: /* window_frame_bound: window_frame_start */
#line 12183 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.window_frame_bound)= (yyvsp[0].window_frame_bound); }
#line 43449 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1911: /* window_frame_bound: UNBOUNDED_SYM FOLLOWING_SYM */
#line 12185 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.window_frame_bound)= new (thd->mem_root)
Window_frame_bound(Window_frame_bound::FOLLOWING, NULL);
if (unlikely((yyval.window_frame_bound) == NULL))
MYSQL_YYABORT;
}
#line 43460 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1912: /* window_frame_bound: literal FOLLOWING_SYM */
#line 12192 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.window_frame_bound)= new (thd->mem_root)
Window_frame_bound(Window_frame_bound::FOLLOWING, (yyvsp[-1].item));
if (unlikely((yyval.window_frame_bound) == NULL))
MYSQL_YYABORT;
}
#line 43471 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1913: /* opt_window_frame_exclusion: %empty */
#line 12201 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.frame_exclusion)= Window_frame::EXCL_NONE; }
#line 43477 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1914: /* opt_window_frame_exclusion: EXCLUDE_SYM CURRENT_SYM ROW_SYM */
#line 12203 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.frame_exclusion)= Window_frame::EXCL_CURRENT_ROW; }
#line 43483 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1915: /* opt_window_frame_exclusion: EXCLUDE_SYM GROUP_SYM */
#line 12205 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.frame_exclusion)= Window_frame::EXCL_GROUP; }
#line 43489 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1916: /* opt_window_frame_exclusion: EXCLUDE_SYM TIES_SYM */
#line 12207 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.frame_exclusion)= Window_frame::EXCL_TIES; }
#line 43495 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1917: /* opt_window_frame_exclusion: EXCLUDE_SYM NO_SYM OTHERS_MARIADB_SYM */
#line 12209 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.frame_exclusion)= Window_frame::EXCL_NONE; }
#line 43501 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1918: /* opt_window_frame_exclusion: EXCLUDE_SYM NO_SYM OTHERS_ORACLE_SYM */
#line 12211 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.frame_exclusion)= Window_frame::EXCL_NONE; }
#line 43507 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1922: /* alter_order_item: simple_ident_nospvar order_dir */
#line 12229 "/home/buildbot/git/sql/sql_yacc.yy"
{
bool ascending= ((yyvsp[0].num) == 1) ? true : false;
if (unlikely(add_order_to_list(thd, (yyvsp[-1].item), ascending)))
MYSQL_YYABORT;
}
#line 43517 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1923: /* opt_order_clause: %empty */
#line 12242 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_order)= NULL; }
#line 43523 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1924: /* opt_order_clause: order_clause */
#line 12244 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_order)= (yyvsp[0].select_order); }
#line 43529 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1925: /* $@168: %empty */
#line 12249 "/home/buildbot/git/sql/sql_yacc.yy"
{
thd->where= "ORDER clause";
}
#line 43537 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1926: /* order_clause: ORDER_SYM BY $@168 order_list */
#line 12253 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_order)= (yyvsp[0].select_order);
}
#line 43545 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1927: /* order_list: order_list ',' order_ident order_dir */
#line 12260 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_order)= (yyvsp[-3].select_order);
if (add_to_list(thd, *(yyval.select_order), (yyvsp[-1].item),(bool) (yyvsp[0].num)))
MYSQL_YYABORT;
}
#line 43555 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1928: /* order_list: order_ident order_dir */
#line 12266 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_order)= new (thd->mem_root) SQL_I_List();
if (add_to_list(thd, *(yyval.select_order), (yyvsp[-1].item), (bool) (yyvsp[0].num)))
MYSQL_YYABORT;
}
#line 43565 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1929: /* order_dir: %empty */
#line 12274 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 43571 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1930: /* order_dir: ASC */
#line 12275 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 43577 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1931: /* order_dir: DESC */
#line 12276 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 43583 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1932: /* opt_limit_clause: %empty */
#line 12282 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_limit).clear(); }
#line 43589 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1933: /* opt_limit_clause: limit_clause */
#line 12284 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_limit)= (yyvsp[0].select_limit); }
#line 43595 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1934: /* limit_clause: LIMIT limit_options */
#line 12289 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_limit)= (yyvsp[0].select_limit);
if (!(yyval.select_limit).select_limit->basic_const_item() ||
(yyval.select_limit).select_limit->val_int() > 0)
Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
}
#line 43606 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1935: /* limit_clause: LIMIT limit_options ROWS_SYM EXAMINED_SYM limit_rows_option */
#line 12297 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_limit)= (yyvsp[-3].select_limit);
Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
}
#line 43615 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1936: /* limit_clause: LIMIT ROWS_SYM EXAMINED_SYM limit_rows_option */
#line 12302 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_limit).clear();
Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
}
#line 43624 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1937: /* limit_clause: fetch_first_clause */
#line 12307 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_limit)= (yyvsp[0].select_limit);
if (!(yyval.select_limit).select_limit ||
!(yyval.select_limit).select_limit->basic_const_item() ||
(yyval.select_limit).select_limit->val_int() > 0)
Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
}
#line 43636 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1938: /* fetch_first_clause: FETCH_SYM first_or_next row_or_rows only_or_with_ties */
#line 12318 "/home/buildbot/git/sql/sql_yacc.yy"
{
Item *one= new (thd->mem_root) Item_int(thd, (int32) 1);
if (unlikely(one == NULL))
MYSQL_YYABORT;
(yyval.select_limit).select_limit= one;
(yyval.select_limit).offset_limit= 0;
(yyval.select_limit).explicit_limit= true;
(yyval.select_limit).with_ties= (yyvsp[0].num);
}
#line 43650 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1939: /* fetch_first_clause: OFFSET_SYM limit_option row_or_rows FETCH_SYM first_or_next row_or_rows only_or_with_ties */
#line 12329 "/home/buildbot/git/sql/sql_yacc.yy"
{
Item *one= new (thd->mem_root) Item_int(thd, (int32) 1);
if (unlikely(one == NULL))
MYSQL_YYABORT;
(yyval.select_limit).select_limit= one;
(yyval.select_limit).offset_limit= (yyvsp[-5].item);
(yyval.select_limit).explicit_limit= true;
(yyval.select_limit).with_ties= (yyvsp[0].num);
}
#line 43664 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1940: /* fetch_first_clause: FETCH_SYM first_or_next limit_option row_or_rows only_or_with_ties */
#line 12339 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_limit).select_limit= (yyvsp[-2].item);
(yyval.select_limit).offset_limit= 0;
(yyval.select_limit).explicit_limit= true;
(yyval.select_limit).with_ties= (yyvsp[0].num);
}
#line 43675 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1941: /* fetch_first_clause: OFFSET_SYM limit_option row_or_rows FETCH_SYM first_or_next limit_option row_or_rows only_or_with_ties */
#line 12347 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_limit).select_limit= (yyvsp[-2].item);
(yyval.select_limit).offset_limit= (yyvsp[-6].item);
(yyval.select_limit).explicit_limit= true;
(yyval.select_limit).with_ties= (yyvsp[0].num);
}
#line 43686 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1942: /* fetch_first_clause: OFFSET_SYM limit_option row_or_rows */
#line 12354 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_limit).select_limit= 0;
(yyval.select_limit).offset_limit= (yyvsp[-1].item);
(yyval.select_limit).explicit_limit= true;
(yyval.select_limit).with_ties= false;
}
#line 43697 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1947: /* only_or_with_ties: ONLY_SYM */
#line 12373 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 43703 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1948: /* only_or_with_ties: WITH TIES_SYM */
#line 12374 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 43709 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1949: /* opt_global_limit_clause: opt_limit_clause */
#line 12380 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->limit_params= (yyvsp[0].select_limit);
}
#line 43717 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1950: /* limit_options: limit_option */
#line 12387 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_limit).select_limit= (yyvsp[0].item);
(yyval.select_limit).offset_limit= NULL;
(yyval.select_limit).explicit_limit= true;
(yyval.select_limit).with_ties= false;
}
#line 43728 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1951: /* limit_options: limit_option ',' limit_option */
#line 12394 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_limit).select_limit= (yyvsp[0].item);
(yyval.select_limit).offset_limit= (yyvsp[-2].item);
(yyval.select_limit).explicit_limit= true;
(yyval.select_limit).with_ties= false;
}
#line 43739 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1952: /* limit_options: limit_option OFFSET_SYM limit_option */
#line 12401 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_limit).select_limit= (yyvsp[-2].item);
(yyval.select_limit).offset_limit= (yyvsp[0].item);
(yyval.select_limit).explicit_limit= true;
(yyval.select_limit).with_ties= false;
}
#line 43750 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1953: /* limit_option: ident_cli */
#line 12411 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_limit(thd, &(yyvsp[0].ident_cli)))))
MYSQL_YYABORT;
}
#line 43759 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1954: /* limit_option: ident_cli '.' ident_cli */
#line 12416 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_limit(thd, &(yyvsp[-2].ident_cli), &(yyvsp[0].ident_cli)))))
MYSQL_YYABORT;
}
#line 43768 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1955: /* limit_option: param_marker */
#line 12421 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[0].item_param)->limit_clause_param= TRUE;
}
#line 43776 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1956: /* limit_option: ULONGLONG_NUM */
#line 12425 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_uint(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 43786 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1957: /* limit_option: LONG_NUM */
#line 12431 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_uint(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 43796 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1958: /* limit_option: NUM */
#line 12437 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_uint(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 43806 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1959: /* limit_rows_option: limit_option */
#line 12446 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->limit_rows_examined= (yyvsp[0].item);
}
#line 43814 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1960: /* delete_limit_clause: %empty */
#line 12453 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->current_select->limit_params.select_limit= 0;
}
#line 43823 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1961: /* delete_limit_clause: LIMIT limit_option */
#line 12458 "/home/buildbot/git/sql/sql_yacc.yy"
{
SELECT_LEX *sel= Select;
sel->limit_params.select_limit= (yyvsp[0].item);
Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
sel->limit_params.explicit_limit= 1;
}
#line 43834 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1962: /* delete_limit_clause: LIMIT ROWS_SYM EXAMINED_SYM */
#line 12464 "/home/buildbot/git/sql/sql_yacc.yy"
{ thd->parse_error(); MYSQL_YYABORT; }
#line 43840 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1963: /* delete_limit_clause: LIMIT limit_option ROWS_SYM EXAMINED_SYM */
#line 12465 "/home/buildbot/git/sql/sql_yacc.yy"
{ thd->parse_error(); MYSQL_YYABORT; }
#line 43846 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1964: /* order_limit_lock: order_or_limit */
#line 12470 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.order_limit_lock)= (yyvsp[0].order_limit_lock);
(yyval.order_limit_lock)->lock.empty();
}
#line 43855 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1965: /* order_limit_lock: order_or_limit select_lock_type */
#line 12475 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.order_limit_lock)= (yyvsp[-1].order_limit_lock);
(yyval.order_limit_lock)->lock= (yyvsp[0].select_lock);
}
#line 43864 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1966: /* order_limit_lock: select_lock_type */
#line 12480 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.order_limit_lock)= new(thd->mem_root) Lex_order_limit_lock;
if (!(yyval.order_limit_lock))
YYABORT;
(yyval.order_limit_lock)->order_list= NULL;
(yyval.order_limit_lock)->limit.clear();
(yyval.order_limit_lock)->lock= (yyvsp[0].select_lock);
}
#line 43877 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1967: /* opt_order_limit_lock: %empty */
#line 12492 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->pop_select();
(yyval.order_limit_lock)= NULL;
}
#line 43886 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1968: /* opt_order_limit_lock: order_limit_lock */
#line 12496 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.order_limit_lock)= (yyvsp[0].order_limit_lock); }
#line 43892 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1971: /* opt_procedure_or_into: %empty */
#line 12509 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lock).empty();
}
#line 43900 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1972: /* opt_procedure_or_into: procedure_clause opt_select_lock_type */
#line 12513 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lock)= (yyvsp[0].select_lock);
}
#line 43908 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1973: /* opt_procedure_or_into: into opt_select_lock_type */
#line 12517 "/home/buildbot/git/sql/sql_yacc.yy"
{
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
ER_WARN_DEPRECATED_SYNTAX,
ER_THD(thd, ER_WARN_DEPRECATED_SYNTAX),
" INTO ;",
"'SELECT INTO "
" FROM...'");
(yyval.select_lock)= (yyvsp[0].select_lock);
}
#line 43922 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1974: /* order_or_limit: order_clause opt_limit_clause */
#line 12531 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.order_limit_lock)= new(thd->mem_root) Lex_order_limit_lock;
if (!(yyval.order_limit_lock))
YYABORT;
(yyval.order_limit_lock)->order_list= (yyvsp[-1].select_order);
(yyval.order_limit_lock)->limit= (yyvsp[0].select_limit);
}
#line 43934 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1975: /* order_or_limit: limit_clause */
#line 12539 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.order_limit_lock)= new(thd->mem_root) Lex_order_limit_lock;
if (!(yyval.order_limit_lock))
YYABORT;
(yyval.order_limit_lock)->order_list= NULL;
(yyval.order_limit_lock)->limit= (yyvsp[0].select_limit);
}
#line 43946 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1978: /* int_num: opt_plus NUM */
#line 12555 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.num)= (int) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 43952 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1979: /* int_num: '-' NUM */
#line 12556 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.num)= -(int) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 43958 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1980: /* ulong_num: opt_plus NUM */
#line 12560 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 43964 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1981: /* ulong_num: HEX_NUM */
#line 12561 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= strtoul((yyvsp[0].lex_str).str, (char**) 0, 16); }
#line 43970 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1982: /* ulong_num: opt_plus LONG_NUM */
#line 12562 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 43976 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1983: /* ulong_num: opt_plus ULONGLONG_NUM */
#line 12563 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 43982 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1984: /* ulong_num: opt_plus DECIMAL_NUM */
#line 12564 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 43988 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1985: /* ulong_num: opt_plus FLOAT_NUM */
#line 12565 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 43994 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1986: /* real_ulong_num: NUM */
#line 12569 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 44000 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1987: /* real_ulong_num: HEX_NUM */
#line 12570 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= (ulong) strtol((yyvsp[0].lex_str).str, (char**) 0, 16); }
#line 44006 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1988: /* real_ulong_num: LONG_NUM */
#line 12571 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 44012 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1989: /* real_ulong_num: ULONGLONG_NUM */
#line 12572 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 44018 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1990: /* real_ulong_num: dec_num_error */
#line 12573 "/home/buildbot/git/sql/sql_yacc.yy"
{ MYSQL_YYABORT; }
#line 44024 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1991: /* longlong_num: opt_plus NUM */
#line 12577 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.longlong_number)= (longlong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 44030 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1992: /* longlong_num: LONG_NUM */
#line 12578 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.longlong_number)= (longlong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 44036 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1993: /* longlong_num: '-' NUM */
#line 12579 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.longlong_number)= -(longlong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 44042 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1994: /* longlong_num: '-' LONG_NUM */
#line 12580 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.longlong_number)= -(longlong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 44048 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1995: /* ulonglong_num: opt_plus NUM */
#line 12584 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 44054 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1996: /* ulonglong_num: opt_plus ULONGLONG_NUM */
#line 12585 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 44060 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1997: /* ulonglong_num: opt_plus LONG_NUM */
#line 12586 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 44066 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1998: /* ulonglong_num: opt_plus DECIMAL_NUM */
#line 12587 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 44072 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1999: /* ulonglong_num: opt_plus FLOAT_NUM */
#line 12588 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 44078 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2000: /* real_ulonglong_num: NUM */
#line 12592 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 44084 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2001: /* real_ulonglong_num: ULONGLONG_NUM */
#line 12593 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 44090 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2002: /* real_ulonglong_num: HEX_NUM */
#line 12594 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulonglong_number)= strtoull((yyvsp[0].lex_str).str, (char**) 0, 16); }
#line 44096 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2003: /* real_ulonglong_num: LONG_NUM */
#line 12595 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 44102 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2004: /* real_ulonglong_num: dec_num_error */
#line 12596 "/home/buildbot/git/sql/sql_yacc.yy"
{ MYSQL_YYABORT; }
#line 44108 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2005: /* dec_num_error: dec_num */
#line 12601 "/home/buildbot/git/sql/sql_yacc.yy"
{ thd->parse_error(ER_ONLY_INTEGERS_ALLOWED); }
#line 44114 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2008: /* choice: ulong_num */
#line 12610 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.choice)= (yyvsp[0].ulong_num) != 0 ? HA_CHOICE_YES : HA_CHOICE_NO; }
#line 44120 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2009: /* choice: DEFAULT */
#line 12611 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.choice)= HA_CHOICE_UNDEF; }
#line 44126 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2010: /* bool: ulong_num */
#line 12615 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= (yyvsp[0].ulong_num) != 0; }
#line 44132 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2011: /* bool: TRUE_SYM */
#line 12616 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 1; }
#line 44138 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2012: /* bool: FALSE_SYM */
#line 12617 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 0; }
#line 44144 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2013: /* $@169: %empty */
#line 12622 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->proc_list.elements=0;
lex->proc_list.first=0;
lex->proc_list.next= &lex->proc_list.first;
Item_field *item= new (thd->mem_root)
Item_field(thd, &lex->current_select->context,
(yyvsp[0].ident_sys));
if (unlikely(item == NULL))
MYSQL_YYABORT;
if (unlikely(add_proc_to_list(thd, item)))
MYSQL_YYABORT;
Lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
/*
PROCEDURE CLAUSE cannot handle subquery as one of its parameter,
so disallow any subqueries further.
Alow subqueries back once the parameters are reduced.
*/
Lex->clause_that_disallows_subselect= "PROCEDURE";
Select->options|= OPTION_PROCEDURE_CLAUSE;
}
#line 44172 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2014: /* procedure_clause: PROCEDURE_SYM ident $@169 '(' procedure_list ')' */
#line 12646 "/home/buildbot/git/sql/sql_yacc.yy"
{
/* Subqueries are allowed from now.*/
Lex->clause_that_disallows_subselect= NULL;
}
#line 44181 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2015: /* procedure_list: %empty */
#line 12653 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44187 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2016: /* procedure_list: procedure_list2 */
#line 12654 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44193 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2019: /* procedure_item: remember_name expr remember_end */
#line 12664 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(add_proc_to_list(thd, (yyvsp[-1].item))))
MYSQL_YYABORT;
if (!(yyvsp[-1].item)->name.str || (yyvsp[-1].item)->name.str == item_empty_name)
(yyvsp[-1].item)->set_name(thd, (yyvsp[-2].simple_string), (uint) ((yyvsp[0].simple_string) - (yyvsp[-2].simple_string)), thd->charset());
}
#line 44204 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2020: /* $@170: %empty */
#line 12673 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
if (!lex->describe &&
unlikely((!(lex->result= new (thd->mem_root)
select_dumpvar(thd)))))
MYSQL_YYABORT;
}
#line 44216 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2021: /* select_var_list_init: $@170 select_var_list */
#line 12681 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44222 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2023: /* select_var_list: select_var_ident */
#line 12686 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44228 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2024: /* select_var_ident: select_outvar */
#line 12690 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->result)
{
if (unlikely((yyvsp[0].myvar) == NULL))
MYSQL_YYABORT;
((select_dumpvar *)Lex->result)->var_list.push_back((yyvsp[0].myvar), thd->mem_root);
}
else
{
/*
The parser won't create select_result instance only
if it's an EXPLAIN.
*/
DBUG_ASSERT(Lex->describe);
}
}
#line 44249 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2025: /* select_outvar: '@' ident_or_text */
#line 12710 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!(yyvsp[0].lex_str).length)
{
thd->parse_error();
MYSQL_YYABORT;
}
(yyval.myvar) = Lex->result ? new (thd->mem_root) my_var_user(&(yyvsp[0].lex_str)) : NULL;
}
#line 44263 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2026: /* select_outvar: ident_or_text */
#line 12720 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.myvar)= Lex->create_outvar(thd, &(yyvsp[0].lex_str))) && Lex->result))
MYSQL_YYABORT;
}
#line 44272 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2027: /* select_outvar: ident '.' ident */
#line 12725 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.myvar)= Lex->create_outvar(thd, &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys))) && Lex->result))
MYSQL_YYABORT;
}
#line 44281 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2028: /* into: INTO into_destination */
#line 12733 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44287 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2029: /* $@171: %empty */
#line 12738 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
if (unlikely(!(lex->exchange=
new (thd->mem_root) sql_exchange((yyvsp[0].lex_str).str, 0))) ||
unlikely(!(lex->result=
new (thd->mem_root)
select_export(thd, lex->exchange))))
MYSQL_YYABORT;
}
#line 44302 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2030: /* $@172: %empty */
#line 12749 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->exchange->cs= (yyvsp[0].charset); }
#line 44308 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2032: /* into_destination: DUMPFILE TEXT_STRING_filesystem */
#line 12752 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
if (!lex->describe)
{
lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
if (unlikely(!(lex->exchange=
new (thd->mem_root) sql_exchange((yyvsp[0].lex_str).str,1))))
MYSQL_YYABORT;
if (unlikely(!(lex->result=
new (thd->mem_root)
select_dump(thd, lex->exchange))))
MYSQL_YYABORT;
}
}
#line 44327 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2033: /* into_destination: select_var_list_init */
#line 12767 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
}
#line 44335 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2034: /* $@173: %empty */
#line 12778 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command = SQLCOM_DO;
if (lex->main_select_push(true))
MYSQL_YYABORT;
lex->init_select();
}
#line 44347 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2035: /* do: DO_SYM $@173 expr_list */
#line 12786 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->insert_list= (yyvsp[0].item_list);
Lex->pop_select(); //main select
if (Lex->check_cte_dependencies_and_resolve_references())
MYSQL_YYABORT;
}
#line 44358 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2036: /* $@174: %empty */
#line 12800 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->set_command(SQLCOM_DROP_TABLE, (yyvsp[-2].num), (yyvsp[0].object_ddl_options));
YYPS->m_lock_type= TL_UNLOCK;
YYPS->m_mdl_type= MDL_EXCLUSIVE;
}
#line 44369 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2037: /* drop: DROP opt_temporary table_or_tables opt_if_exists $@174 table_list opt_lock_wait_timeout opt_restrict */
#line 12807 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44375 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2038: /* $@175: %empty */
#line 12809 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->main_select_push())
MYSQL_YYABORT;
}
#line 44384 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2039: /* drop: DROP INDEX_SYM $@175 opt_if_exists_table_element ident ON table_ident opt_lock_wait_timeout */
#line 12814 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
Alter_drop *ad= (new (thd->mem_root)
Alter_drop(Alter_drop::KEY, (yyvsp[-3].ident_sys).str, (yyvsp[-4].num)));
if (unlikely(ad == NULL))
MYSQL_YYABORT;
lex->sql_command= SQLCOM_DROP_INDEX;
lex->alter_info.reset();
lex->alter_info.flags= ALTER_DROP_INDEX;
lex->alter_info.drop_list.push_back(ad, thd->mem_root);
if (unlikely(!lex->current_select->
add_table_to_list(thd, (yyvsp[-1].table), NULL, TL_OPTION_UPDATING,
TL_READ_NO_INSERT,
MDL_SHARED_UPGRADABLE)))
MYSQL_YYABORT;
Lex->pop_select(); //main select
}
#line 44406 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2040: /* drop: DROP DATABASE opt_if_exists ident */
#line 12832 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->set_command(SQLCOM_DROP_DB, (yyvsp[-1].object_ddl_options));
lex->name= (yyvsp[0].ident_sys);
}
#line 44416 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2041: /* drop: DROP USER_SYM opt_if_exists clear_privileges user_list */
#line 12838 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->set_command(SQLCOM_DROP_USER, (yyvsp[-2].object_ddl_options));
}
#line 44424 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2042: /* drop: DROP ROLE_SYM opt_if_exists clear_privileges role_list */
#line 12842 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->set_command(SQLCOM_DROP_ROLE, (yyvsp[-2].object_ddl_options));
}
#line 44432 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2043: /* $@176: %empty */
#line 12846 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->set_command(SQLCOM_DROP_VIEW, (yyvsp[0].object_ddl_options));
YYPS->m_lock_type= TL_UNLOCK;
YYPS->m_mdl_type= MDL_EXCLUSIVE;
}
#line 44443 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2044: /* drop: DROP VIEW_SYM opt_if_exists $@176 table_list opt_restrict */
#line 12853 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44449 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2045: /* drop: DROP EVENT_SYM opt_if_exists sp_name */
#line 12855 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->spname= (yyvsp[0].spname);
Lex->set_command(SQLCOM_DROP_EVENT, (yyvsp[-1].object_ddl_options));
}
#line 44458 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2046: /* drop: DROP TRIGGER_SYM opt_if_exists sp_name */
#line 12860 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->set_command(SQLCOM_DROP_TRIGGER, (yyvsp[-1].object_ddl_options));
lex->spname= (yyvsp[0].spname);
}
#line 44468 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2047: /* drop: DROP SERVER_SYM opt_if_exists ident_or_text */
#line 12866 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->set_command(SQLCOM_DROP_SERVER, (yyvsp[-1].object_ddl_options));
Lex->server_options.reset((yyvsp[0].lex_str));
}
#line 44477 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2048: /* $@177: %empty */
#line 12872 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->set_command(SQLCOM_DROP_SEQUENCE, (yyvsp[-2].num), (yyvsp[0].object_ddl_options));
lex->table_type= TABLE_TYPE_SEQUENCE;
YYPS->m_lock_type= TL_UNLOCK;
YYPS->m_mdl_type= MDL_EXCLUSIVE;
}
#line 44489 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2049: /* drop: DROP opt_temporary SEQUENCE_SYM opt_if_exists $@177 table_list */
#line 12880 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44495 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2053: /* table_name: table_ident */
#line 12891 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!thd->lex->current_select_or_default()->
add_table_to_list(thd, (yyvsp[0].table), NULL,
TL_OPTION_UPDATING,
YYPS->m_lock_type,
YYPS->m_mdl_type))
MYSQL_YYABORT;
}
#line 44508 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2054: /* table_name_with_opt_use_partition: table_ident opt_use_partition */
#line 12903 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!Select->add_table_to_list(thd, (yyvsp[-1].table), NULL,
TL_OPTION_UPDATING,
YYPS->m_lock_type,
YYPS->m_mdl_type,
NULL,
(yyvsp[0].string_list))))
MYSQL_YYABORT;
}
#line 44522 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2057: /* table_alias_ref: table_ident_opt_wild */
#line 12921 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!Select->
add_table_to_list(thd, (yyvsp[0].table), NULL,
(TL_OPTION_UPDATING |
TL_OPTION_ALIAS),
YYPS->m_lock_type,
YYPS->m_mdl_type)))
MYSQL_YYABORT;
}
#line 44536 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2058: /* opt_if_exists_table_element: %empty */
#line 12934 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->check_exists= FALSE;
(yyval.num)= 0;
}
#line 44545 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2059: /* opt_if_exists_table_element: IF_SYM EXISTS */
#line 12939 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->check_exists= TRUE;
(yyval.num)= 1;
}
#line 44554 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2060: /* opt_if_exists: %empty */
#line 12947 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.object_ddl_options).set(DDL_options_st::OPT_NONE);
}
#line 44562 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2061: /* opt_if_exists: IF_SYM EXISTS */
#line 12951 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.object_ddl_options).set(DDL_options_st::OPT_IF_EXISTS);
}
#line 44570 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2062: /* opt_temporary: %empty */
#line 12957 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 44576 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2063: /* opt_temporary: TEMPORARY */
#line 12958 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= HA_LEX_CREATE_TMP_TABLE; }
#line 44582 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2064: /* $@178: %empty */
#line 12966 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command= SQLCOM_INSERT;
Lex->duplicates= DUP_ERROR;
thd->get_stmt_da()->opt_clear_warning_info(thd->query_id);
thd->get_stmt_da()->reset_current_row_for_warning(1);
}
#line 44593 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2065: /* $@179: %empty */
#line 12973 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->set_lock_for_tables((yyvsp[-3].lock_type), true, false);
}
#line 44601 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2066: /* insert: INSERT $@178 insert_start insert_lock_option opt_ignore opt_into insert_table $@179 insert_field_spec opt_insert_update opt_returning stmt_end */
#line 12978 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->mark_first_table_as_inserting();
thd->get_stmt_da()->reset_current_row_for_warning(0);
}
#line 44610 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2067: /* $@180: %empty */
#line 12986 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_REPLACE;
Lex->duplicates= DUP_REPLACE;
thd->get_stmt_da()->opt_clear_warning_info(thd->query_id);
thd->get_stmt_da()->reset_current_row_for_warning(1);
}
#line 44621 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2068: /* $@181: %empty */
#line 12993 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->set_lock_for_tables((yyvsp[-2].lock_type), true, false);
}
#line 44629 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2069: /* replace: REPLACE $@180 insert_start replace_lock_option opt_into insert_table $@181 insert_field_spec opt_returning stmt_end */
#line 12998 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->mark_first_table_as_inserting();
thd->get_stmt_da()->reset_current_row_for_warning(0);
}
#line 44638 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2070: /* insert_start: %empty */
#line 13004 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->main_select_push())
MYSQL_YYABORT;
Lex->init_select();
Lex->inc_select_stack_outer_barrier();
Lex->current_select->parsing_place= BEFORE_OPT_LIST;
}
#line 44650 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2071: /* stmt_end: %empty */
#line 13013 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->pop_select(); //main select
if (Lex->check_main_unit_semantics())
MYSQL_YYABORT;
}
#line 44660 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2072: /* insert_lock_option: %empty */
#line 13022 "/home/buildbot/git/sql/sql_yacc.yy"
{
/*
If it is SP we do not allow insert optimisation when result of
insert visible only after the table unlocking but everyone can
read table.
*/
(yyval.lock_type)= (Lex->sphead ? TL_WRITE_DEFAULT : TL_WRITE_CONCURRENT_INSERT);
}
#line 44673 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2074: /* insert_lock_option: HIGH_PRIORITY */
#line 13031 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lock_type)= TL_WRITE; }
#line 44679 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2075: /* replace_lock_option: %empty */
#line 13035 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lock_type)= TL_WRITE_DEFAULT; }
#line 44685 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2077: /* insert_replace_option: LOW_PRIORITY */
#line 13040 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; }
#line 44691 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2078: /* insert_replace_option: DELAYED_SYM */
#line 13042 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->keyword_delayed_begin_offset= (uint)((yyvsp[0].kwd).pos() - thd->query());
Lex->keyword_delayed_end_offset= (uint)((yyvsp[0].kwd).end() - thd->query());
(yyval.lock_type)= TL_WRITE_DELAYED;
}
#line 44701 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2081: /* $@182: %empty */
#line 13052 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->save_parsing_place= Select->parsing_place;
}
#line 44709 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2082: /* insert_table: $@182 table_name_with_opt_use_partition */
#line 13056 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
//lex->field_list.empty();
lex->many_values.empty();
lex->insert_list=0;
}
#line 44720 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2083: /* insert_field_spec: insert_values */
#line 13065 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44726 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2084: /* insert_field_spec: insert_field_list insert_values */
#line 13066 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44732 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2085: /* $@183: %empty */
#line 13068 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
if (unlikely(!(lex->insert_list= new (thd->mem_root) List_item)) ||
unlikely(lex->many_values.push_back(lex->insert_list,
thd->mem_root)))
MYSQL_YYABORT;
lex->current_select->parsing_place= NO_MATTER;
}
#line 44745 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2087: /* insert_field_list: LEFT_PAREN_ALT opt_fields ')' */
#line 13081 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->current_select->parsing_place= AFTER_LIST;
}
#line 44753 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2090: /* fields: fields ',' insert_ident */
#line 13093 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); }
#line 44759 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2091: /* fields: insert_ident */
#line 13094 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); }
#line 44765 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2092: /* insert_values: create_select_query_expression */
#line 13100 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44771 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2097: /* ident_eq_value: simple_ident_nospvar equal expr_or_ignore_or_default */
#line 13115 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
if (unlikely(lex->field_list.push_back((yyvsp[-2].item), thd->mem_root)) ||
unlikely(lex->insert_list->push_back((yyvsp[0].item), thd->mem_root)))
MYSQL_YYABORT;
}
#line 44782 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2098: /* equal: '=' */
#line 13124 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44788 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2099: /* equal: SET_VAR */
#line 13125 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44794 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2100: /* opt_equal: %empty */
#line 13129 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44800 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2101: /* opt_equal: equal */
#line 13130 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44806 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2102: /* opt_with: opt_equal */
#line 13134 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44812 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2103: /* opt_with: WITH */
#line 13135 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44818 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2104: /* opt_by: opt_equal */
#line 13139 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44824 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2105: /* opt_by: BY */
#line 13140 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44830 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2106: /* $@184: %empty */
#line 13145 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!(Lex->insert_list= new (thd->mem_root) List_item)))
MYSQL_YYABORT;
}
#line 44839 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2107: /* no_braces: '(' $@184 opt_values ')' */
#line 13150 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
thd->get_stmt_da()->inc_current_row_for_warning();
if (unlikely(lex->many_values.push_back(lex->insert_list,
thd->mem_root)))
MYSQL_YYABORT;
}
#line 44851 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2108: /* $@185: %empty */
#line 13161 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!(Lex->insert_list= new (thd->mem_root) List_item)))
MYSQL_YYABORT;
}
#line 44860 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2109: /* no_braces_with_names: '(' $@185 opt_values_with_names ')' */
#line 13166 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
thd->get_stmt_da()->inc_current_row_for_warning();
if (unlikely(lex->many_values.push_back(lex->insert_list,
thd->mem_root)))
MYSQL_YYABORT;
}
#line 44872 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2110: /* opt_values: %empty */
#line 13176 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44878 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2112: /* opt_values_with_names: %empty */
#line 13181 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44884 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2114: /* values: values ',' expr_or_ignore_or_default */
#line 13187 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->insert_list->push_back((yyvsp[0].item), thd->mem_root)))
MYSQL_YYABORT;
}
#line 44893 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2115: /* values: expr_or_ignore_or_default */
#line 13192 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->insert_list->push_back((yyvsp[0].item), thd->mem_root)))
MYSQL_YYABORT;
}
#line 44902 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2116: /* values_with_names: values_with_names ',' remember_name expr_or_ignore_or_default remember_end */
#line 13200 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->insert_list->push_back((yyvsp[-1].item), thd->mem_root)))
MYSQL_YYABORT;
// give some name in case of using in table value constuctor (TVC)
if (!(yyvsp[-1].item)->name.str || (yyvsp[-1].item)->name.str == item_empty_name)
(yyvsp[-1].item)->set_name(thd, (yyvsp[-2].simple_string), (uint) ((yyvsp[0].simple_string) - (yyvsp[-2].simple_string)), thd->charset());
}
#line 44914 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2117: /* values_with_names: remember_name expr_or_ignore_or_default remember_end */
#line 13208 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->insert_list->push_back((yyvsp[-1].item), thd->mem_root)))
MYSQL_YYABORT;
// give some name in case of using in table value constuctor (TVC)
if (!(yyvsp[-1].item)->name.str || (yyvsp[-1].item)->name.str == item_empty_name)
(yyvsp[-1].item)->set_name(thd, (yyvsp[-2].simple_string), (uint) ((yyvsp[0].simple_string) - (yyvsp[-2].simple_string)), thd->charset());
}
#line 44926 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2118: /* expr_or_ignore: expr */
#line 13218 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)= (yyvsp[0].item);}
#line 44932 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2119: /* expr_or_ignore: IGNORE_SYM */
#line 13220 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_ignore_specification(thd);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 44942 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2120: /* expr_or_ignore_or_default: expr_or_ignore */
#line 13228 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)= (yyvsp[0].item);}
#line 44948 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2121: /* expr_or_ignore_or_default: DEFAULT */
#line 13230 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_default_specification(thd);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 44958 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2123: /* $@186: %empty */
#line 13239 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->duplicates= DUP_UPDATE; }
#line 44964 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2124: /* $@187: %empty */
#line 13241 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->parsing_place= IN_UPDATE_ON_DUP_KEY;
}
#line 44972 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2125: /* opt_insert_update: ON DUPLICATE_SYM $@186 KEY_SYM UPDATE_SYM $@187 insert_update_list */
#line 13245 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->parsing_place= NO_MATTER;
}
#line 44980 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2126: /* update_table_list: table_ident opt_use_partition for_portion_of_time_clause opt_table_alias_clause opt_key_definition */
#line 13253 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.table_list)= Select->add_table_to_list(thd, (yyvsp[-4].table), (yyvsp[-1].lex_str_ptr),
0,
YYPS->m_lock_type,
YYPS->m_mdl_type,
Select->pop_index_hints(),
(yyvsp[-3].string_list))))
MYSQL_YYABORT;
(yyval.table_list)->period_conditions= Lex->period_conditions;
}
#line 44995 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2127: /* update_table_list: join_table_list */
#line 13263 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)= (yyvsp[0].table_list); }
#line 45001 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2128: /* $@188: %empty */
#line 13270 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (Lex->main_select_push())
MYSQL_YYABORT;
lex->init_select();
lex->sql_command= SQLCOM_UPDATE;
lex->duplicates= DUP_ERROR;
}
#line 45014 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2129: /* $@189: %empty */
#line 13280 "/home/buildbot/git/sql/sql_yacc.yy"
{
SELECT_LEX *slex= Lex->first_select_lex();
if (slex->table_list.elements > 1)
Lex->sql_command= SQLCOM_UPDATE_MULTI;
else if (slex->get_table_list()->derived)
{
/* it is single table update and it is update of derived table */
my_error(ER_NON_UPDATABLE_TABLE, MYF(0),
slex->get_table_list()->alias.str, "UPDATE");
MYSQL_YYABORT;
}
/*
In case of multi-update setting write lock for all tables may
be too pessimistic. We will decrease lock level if possible in
mysql_multi_update().
*/
slex->set_lock_for_tables((yyvsp[-4].lock_type), slex->table_list.elements == 1, false);
}
#line 45037 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2130: /* $@190: %empty */
#line 13299 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyvsp[-1].select_order))
Select->order_list= *((yyvsp[-1].select_order));
}
#line 45046 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2131: /* update: UPDATE_SYM $@188 opt_low_priority opt_ignore update_table_list SET update_list $@189 opt_where_clause opt_order_clause delete_limit_clause $@190 stmt_end */
#line 13302 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 45052 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2134: /* update_elem: simple_ident_nospvar equal DEFAULT */
#line 13312 "/home/buildbot/git/sql/sql_yacc.yy"
{
Item *def= new (thd->mem_root) Item_default_value(thd,
Lex->current_context(), (yyvsp[-2].item), 1);
if (!def || add_item_to_list(thd, (yyvsp[-2].item)) || add_value_to_list(thd, def))
MYSQL_YYABORT;
}
#line 45063 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2135: /* update_elem: simple_ident_nospvar equal expr_or_ignore */
#line 13319 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (add_item_to_list(thd, (yyvsp[-2].item)) || add_value_to_list(thd, (yyvsp[0].item)))
MYSQL_YYABORT;
}
#line 45072 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2138: /* insert_update_elem: simple_ident_nospvar equal expr_or_ignore_or_default */
#line 13332 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (unlikely(lex->update_list.push_back((yyvsp[-2].item), thd->mem_root)) ||
unlikely(lex->value_list.push_back((yyvsp[0].item), thd->mem_root)))
MYSQL_YYABORT;
}
#line 45083 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2139: /* opt_low_priority: %empty */
#line 13341 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lock_type)= TL_WRITE_DEFAULT; }
#line 45089 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2140: /* opt_low_priority: LOW_PRIORITY */
#line 13342 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; }
#line 45095 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2141: /* $@191: %empty */
#line 13349 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_DELETE;
YYPS->m_lock_type= TL_WRITE_DEFAULT;
YYPS->m_mdl_type= MDL_SHARED_WRITE;
if (Lex->main_select_push())
MYSQL_YYABORT;
lex->init_select();
lex->ignore= 0;
lex->first_select_lex()->order_list.empty();
}
#line 45111 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2142: /* delete: DELETE_SYM $@191 delete_part2 */
#line 13361 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->check_cte_dependencies_and_resolve_references())
MYSQL_YYABORT;
}
#line 45120 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2143: /* opt_delete_system_time: %empty */
#line 13369 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->vers_conditions.init(SYSTEM_TIME_HISTORY);
}
#line 45128 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2144: /* opt_delete_system_time: BEFORE_SYM SYSTEM_TIME_SYM history_point */
#line 13373 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->vers_conditions.init(SYSTEM_TIME_BEFORE, (yyvsp[0].vers_history_point));
}
#line 45136 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2145: /* delete_part2: opt_delete_options single_multi */
#line 13379 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 45142 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2146: /* delete_part2: HISTORY_SYM delete_single_table opt_delete_system_time */
#line 13381 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_table()->vers_conditions= Lex->vers_conditions;
Lex->pop_select(); //main select
if (Lex->check_main_unit_semantics())
MYSQL_YYABORT;
}
#line 45153 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2147: /* delete_single_table: FROM table_ident opt_use_partition */
#line 13391 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!Select->
add_table_to_list(thd, (yyvsp[-1].table), NULL, TL_OPTION_UPDATING,
YYPS->m_lock_type,
YYPS->m_mdl_type,
NULL,
(yyvsp[0].string_list))))
MYSQL_YYABORT;
YYPS->m_lock_type= TL_READ_DEFAULT;
YYPS->m_mdl_type= MDL_SHARED_READ;
}
#line 45169 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2148: /* delete_single_table_for_period: delete_single_table opt_for_portion_of_time_clause */
#line 13406 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyvsp[0].num))
Lex->last_table()->period_conditions= Lex->period_conditions;
}
#line 45178 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2149: /* single_multi: delete_single_table_for_period opt_where_clause opt_order_clause delete_limit_clause opt_returning */
#line 13418 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyvsp[-2].select_order))
Select->order_list= *((yyvsp[-2].select_order));
Lex->pop_select(); //main select
if (Lex->check_main_unit_semantics())
MYSQL_YYABORT;
}
#line 45190 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2150: /* $@192: %empty */
#line 13426 "/home/buildbot/git/sql/sql_yacc.yy"
{
mysql_init_multi_delete(Lex);
YYPS->m_lock_type= TL_READ_DEFAULT;
YYPS->m_mdl_type= MDL_SHARED_READ;
}
#line 45200 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2151: /* $@193: %empty */
#line 13432 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(multi_delete_set_locks_and_link_aux_tables(Lex)))
MYSQL_YYABORT;
}
#line 45209 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2152: /* single_multi: table_wild_list $@192 FROM join_table_list opt_where_clause $@193 stmt_end */
#line 13435 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 45215 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2153: /* $@194: %empty */
#line 13437 "/home/buildbot/git/sql/sql_yacc.yy"
{
mysql_init_multi_delete(Lex);
YYPS->m_lock_type= TL_READ_DEFAULT;
YYPS->m_mdl_type= MDL_SHARED_READ;
}
#line 45225 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2154: /* $@195: %empty */
#line 13443 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(multi_delete_set_locks_and_link_aux_tables(Lex)))
MYSQL_YYABORT;
}
#line 45234 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2155: /* single_multi: FROM table_alias_ref_list $@194 USING join_table_list opt_where_clause $@195 stmt_end */
#line 13446 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 45240 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2156: /* opt_returning: %empty */
#line 13451 "/home/buildbot/git/sql/sql_yacc.yy"
{
DBUG_ASSERT(!Lex->has_returning());
}
#line 45248 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2157: /* $@196: %empty */
#line 13455 "/home/buildbot/git/sql/sql_yacc.yy"
{
DBUG_ASSERT(!Lex->has_returning());
/*
When parsing_place is IN_RETURNING, we push select items to
item_list of builtin_select instead of current_select.
But set parsing_place of current_select to true.
Because parsing_place for builtin_select will be IN_RETURNING,
regardless there is SELECT in RETURNING. Example, if
there is RETURNING (SELECT...), then when we parse
SELECT inside RETURNING, builtin_select->parsing_place
will still be true. So the select items of SELECT inside
RETURNING will be added to item_list of builtin_select which
is incorrect. We want to prevent this from happening.
Since for every new select, a new SELECT_LEX
object is created and pushed to select stack, current_select
will point to SELECT inside RETURNING, and also has
parsing_place not set to IN_RETURNING by default.
So items are correctly added to item_list of SELECT inside
RETURNING instead of builtin_select.
*/
thd->lex->current_select->parsing_place= IN_RETURNING;
thd->lex->push_context(&thd->lex->returning()->context);
}
#line 45278 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2158: /* opt_returning: RETURNING_SYM $@196 select_item_list */
#line 13481 "/home/buildbot/git/sql/sql_yacc.yy"
{
thd->lex->pop_context();
thd->lex->current_select->parsing_place= NO_MATTER;
}
#line 45287 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2161: /* table_wild_one: ident opt_wild */
#line 13494 "/home/buildbot/git/sql/sql_yacc.yy"
{
Table_ident *ti= new (thd->mem_root) Table_ident(&(yyvsp[-1].ident_sys));
if (unlikely(ti == NULL))
MYSQL_YYABORT;
if (unlikely(!Select->
add_table_to_list(thd,
ti,
NULL,
(TL_OPTION_UPDATING |
TL_OPTION_ALIAS),
YYPS->m_lock_type,
YYPS->m_mdl_type)))
MYSQL_YYABORT;
}
#line 45306 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2162: /* table_wild_one: ident '.' ident opt_wild */
#line 13509 "/home/buildbot/git/sql/sql_yacc.yy"
{
Table_ident *ti= new (thd->mem_root) Table_ident(thd, &(yyvsp[-3].ident_sys), &(yyvsp[-1].ident_sys), 0);
if (unlikely(ti == NULL))
MYSQL_YYABORT;
if (unlikely(!Select->
add_table_to_list(thd,
ti,
NULL,
(TL_OPTION_UPDATING |
TL_OPTION_ALIAS),
YYPS->m_lock_type,
YYPS->m_mdl_type)))
MYSQL_YYABORT;
}
#line 45325 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2163: /* opt_wild: %empty */
#line 13526 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 45331 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2164: /* opt_wild: '.' '*' */
#line 13527 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 45337 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2165: /* opt_delete_options: %empty */
#line 13531 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 45343 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2166: /* opt_delete_options: opt_delete_option opt_delete_options */
#line 13532 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 45349 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2167: /* opt_delete_option: QUICK */
#line 13536 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->options|= OPTION_QUICK; }
#line 45355 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2168: /* opt_delete_option: LOW_PRIORITY */
#line 13537 "/home/buildbot/git/sql/sql_yacc.yy"
{ YYPS->m_lock_type= TL_WRITE_LOW_PRIORITY; }
#line 45361 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2169: /* opt_delete_option: IGNORE_SYM */
#line 13538 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ignore= 1; }
#line 45367 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2170: /* $@197: %empty */
#line 13543 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX* lex= Lex;
lex->sql_command= SQLCOM_TRUNCATE;
lex->alter_info.reset();
lex->first_select_lex()->options= 0;
lex->sql_cache= LEX::SQL_CACHE_UNSPECIFIED;
lex->first_select_lex()->order_list.empty();
YYPS->m_lock_type= TL_WRITE;
YYPS->m_mdl_type= MDL_EXCLUSIVE;
}
#line 45382 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2171: /* $@198: %empty */
#line 13554 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX* lex= thd->lex;
DBUG_ASSERT(!lex->m_sql_cmd);
lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_truncate_table();
if (unlikely(lex->m_sql_cmd == NULL))
MYSQL_YYABORT;
}
#line 45394 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2172: /* truncate: TRUNCATE_SYM $@197 opt_table_sym table_name opt_lock_wait_timeout $@198 opt_truncate_table_storage_clause */
#line 13561 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 45400 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2179: /* profile_def: CPU_SYM */
#line 13579 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_options|= PROFILE_CPU;
}
#line 45408 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2180: /* profile_def: MEMORY_SYM */
#line 13583 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_options|= PROFILE_MEMORY;
}
#line 45416 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2181: /* profile_def: BLOCK_SYM IO_SYM */
#line 13587 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_options|= PROFILE_BLOCK_IO;
}
#line 45424 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2182: /* profile_def: CONTEXT_SYM SWITCHES_SYM */
#line 13591 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_options|= PROFILE_CONTEXT;
}
#line 45432 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2183: /* profile_def: PAGE_SYM FAULTS_SYM */
#line 13595 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_options|= PROFILE_PAGE_FAULTS;
}
#line 45440 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2184: /* profile_def: IPC_SYM */
#line 13599 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_options|= PROFILE_IPC;
}
#line 45448 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2185: /* profile_def: SWAPS_SYM */
#line 13603 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_options|= PROFILE_SWAPS;
}
#line 45456 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2186: /* profile_def: SOURCE_SYM */
#line 13607 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_options|= PROFILE_SOURCE;
}
#line 45464 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2187: /* profile_def: ALL */
#line 13611 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_options|= PROFILE_ALL;
}
#line 45472 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2188: /* opt_profile_args: %empty */
#line 13618 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_query_id= 0;
}
#line 45480 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2189: /* opt_profile_args: FOR_SYM QUERY_SYM NUM */
#line 13622 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_query_id= atoi((yyvsp[0].lex_str).str);
}
#line 45488 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2190: /* $@199: %empty */
#line 13631 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->wild=0;
lex->ident= null_clex_str;
if (Lex->main_select_push())
MYSQL_YYABORT;
lex->init_select();
lex->current_select->parsing_place= SELECT_LIST;
lex->create_info.init();
}
#line 45503 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2191: /* show: SHOW $@199 show_param */
#line 13642 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->parsing_place= NO_MATTER;
Lex->pop_select(); //main select
}
#line 45512 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2192: /* show_param: DATABASES wild_and_where */
#line 13650 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_DATABASES;
if (unlikely(prepare_schema_table(thd, lex, 0, SCH_SCHEMATA)))
MYSQL_YYABORT;
}
#line 45523 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2193: /* show_param: opt_full TABLES opt_db wild_and_where */
#line 13657 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_TABLES;
lex->first_select_lex()->db= (yyvsp[-1].lex_str);
if (prepare_schema_table(thd, lex, 0, SCH_TABLE_NAMES))
MYSQL_YYABORT;
}
#line 45535 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2194: /* show_param: opt_full TRIGGERS_SYM opt_db wild_and_where */
#line 13665 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_TRIGGERS;
lex->first_select_lex()->db= (yyvsp[-1].lex_str);
if (prepare_schema_table(thd, lex, 0, SCH_TRIGGERS))
MYSQL_YYABORT;
}
#line 45547 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2195: /* show_param: EVENTS_SYM opt_db wild_and_where */
#line 13673 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_EVENTS;
lex->first_select_lex()->db= (yyvsp[-1].lex_str);
if (prepare_schema_table(thd, lex, 0, SCH_EVENTS))
MYSQL_YYABORT;
}
#line 45559 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2196: /* show_param: TABLE_SYM STATUS_SYM opt_db wild_and_where */
#line 13681 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_TABLE_STATUS;
lex->first_select_lex()->db= (yyvsp[-1].lex_str);
if (prepare_schema_table(thd, lex, 0, SCH_TABLES))
MYSQL_YYABORT;
}
#line 45571 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2197: /* show_param: OPEN_SYM TABLES opt_db wild_and_where */
#line 13689 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_OPEN_TABLES;
lex->first_select_lex()->db= (yyvsp[-1].lex_str);
if (prepare_schema_table(thd, lex, 0, SCH_OPEN_TABLES))
MYSQL_YYABORT;
}
#line 45583 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2198: /* show_param: PLUGINS_SYM */
#line 13697 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_PLUGINS;
if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PLUGINS)))
MYSQL_YYABORT;
}
#line 45594 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2199: /* show_param: PLUGINS_SYM SONAME_SYM TEXT_STRING_sys */
#line 13704 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->ident= (yyvsp[0].lex_str);
Lex->sql_command= SQLCOM_SHOW_PLUGINS;
if (unlikely(prepare_schema_table(thd, Lex, 0, SCH_ALL_PLUGINS)))
MYSQL_YYABORT;
}
#line 45605 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2200: /* show_param: PLUGINS_SYM SONAME_SYM wild_and_where */
#line 13711 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command= SQLCOM_SHOW_PLUGINS;
if (unlikely(prepare_schema_table(thd, Lex, 0, SCH_ALL_PLUGINS)))
MYSQL_YYABORT;
}
#line 45615 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2201: /* show_param: ENGINE_SYM known_storage_engines show_engine_param */
#line 13717 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->create_info.db_type= (yyvsp[-1].db_type); }
#line 45621 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2202: /* show_param: ENGINE_SYM ALL show_engine_param */
#line 13719 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->create_info.db_type= NULL; }
#line 45627 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2203: /* show_param: opt_full COLUMNS from_or_in table_ident opt_db wild_and_where */
#line 13721 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_FIELDS;
if ((yyvsp[-1].lex_str).str)
(yyvsp[-2].table)->change_db(&(yyvsp[-1].lex_str));
if (unlikely(prepare_schema_table(thd, lex, (yyvsp[-2].table), SCH_COLUMNS)))
MYSQL_YYABORT;
}
#line 45640 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2204: /* show_param: master_or_binary LOGS_SYM */
#line 13730 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_SHOW_BINLOGS;
}
#line 45648 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2205: /* show_param: SLAVE HOSTS_SYM */
#line 13734 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_SHOW_SLAVE_HOSTS;
}
#line 45656 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2206: /* $@200: %empty */
#line 13738 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_BINLOG_EVENTS;
}
#line 45665 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2208: /* $@201: %empty */
#line 13744 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_RELAYLOG_EVENTS;
}
#line 45674 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2209: /* show_param: RELAYLOG_SYM optional_connection_name EVENTS_SYM binlog_in binlog_from $@201 opt_global_limit_clause optional_for_channel */
#line 13749 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 45680 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2210: /* show_param: keys_or_index from_or_in table_ident opt_db opt_where_clause */
#line 13751 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_KEYS;
if ((yyvsp[-1].lex_str).str)
(yyvsp[-2].table)->change_db(&(yyvsp[-1].lex_str));
if (unlikely(prepare_schema_table(thd, lex, (yyvsp[-2].table), SCH_STATISTICS)))
MYSQL_YYABORT;
}
#line 45693 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2211: /* show_param: opt_storage ENGINES_SYM */
#line 13760 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_SHOW_STORAGE_ENGINES;
if (unlikely(prepare_schema_table(thd, lex, 0, SCH_ENGINES)))
MYSQL_YYABORT;
}
#line 45704 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2212: /* show_param: AUTHORS_SYM */
#line 13767 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_SHOW_AUTHORS;
}
#line 45713 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2213: /* show_param: CONTRIBUTORS_SYM */
#line 13772 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_SHOW_CONTRIBUTORS;
}
#line 45722 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2214: /* show_param: PRIVILEGES */
#line 13777 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_SHOW_PRIVILEGES;
}
#line 45731 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2215: /* show_param: COUNT_SYM '(' '*' ')' WARNINGS */
#line 13782 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX_CSTRING var= {STRING_WITH_LEN("warning_count")};
(void) create_select_for_variable(thd, &var);
}
#line 45740 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2216: /* show_param: COUNT_SYM '(' '*' ')' ERRORS */
#line 13787 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX_CSTRING var= {STRING_WITH_LEN("error_count")};
(void) create_select_for_variable(thd, &var);
}
#line 45749 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2217: /* show_param: WARNINGS opt_global_limit_clause */
#line 13792 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->sql_command = SQLCOM_SHOW_WARNS;}
#line 45755 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2218: /* show_param: ERRORS opt_global_limit_clause */
#line 13794 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->sql_command = SQLCOM_SHOW_ERRORS;}
#line 45761 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2219: /* show_param: PROFILES_SYM */
#line 13796 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->sql_command = SQLCOM_SHOW_PROFILES; }
#line 45767 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2220: /* show_param: PROFILE_SYM opt_profile_defs opt_profile_args opt_global_limit_clause */
#line 13798 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_PROFILE;
if (unlikely(prepare_schema_table(thd, lex, NULL, SCH_PROFILES)))
MYSQL_YYABORT;
}
#line 45778 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2221: /* show_param: opt_var_type STATUS_SYM wild_and_where */
#line 13805 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_STATUS;
lex->option_type= (yyvsp[-2].var_type);
if (unlikely(prepare_schema_table(thd, lex, 0, SCH_SESSION_STATUS)))
MYSQL_YYABORT;
}
#line 45790 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2222: /* show_param: opt_full PROCESSLIST_SYM */
#line 13813 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->sql_command= SQLCOM_SHOW_PROCESSLIST;}
#line 45796 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2223: /* show_param: opt_var_type VARIABLES wild_and_where */
#line 13815 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_VARIABLES;
lex->option_type= (yyvsp[-2].var_type);
if (unlikely(prepare_schema_table(thd, lex, 0, SCH_SESSION_VARIABLES)))
MYSQL_YYABORT;
}
#line 45808 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2224: /* show_param: charset wild_and_where */
#line 13823 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_CHARSETS;
if (unlikely(prepare_schema_table(thd, lex, 0, SCH_CHARSETS)))
MYSQL_YYABORT;
}
#line 45819 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2225: /* show_param: COLLATION_SYM wild_and_where */
#line 13830 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_COLLATIONS;
if (unlikely(prepare_schema_table(thd, lex, 0, SCH_COLLATIONS)))
MYSQL_YYABORT;
}
#line 45830 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2226: /* show_param: GRANTS */
#line 13837 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command= SQLCOM_SHOW_GRANTS;
if (unlikely(!(Lex->grant_user=
(LEX_USER*)thd->calloc(sizeof(LEX_USER)))))
MYSQL_YYABORT;
Lex->grant_user->user= current_user_and_current_role;
}
#line 45842 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2227: /* show_param: GRANTS FOR_SYM user_or_role clear_privileges */
#line 13845 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_SHOW_GRANTS;
lex->grant_user=(yyvsp[-1].lex_user);
}
#line 45852 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2228: /* show_param: CREATE DATABASE opt_if_not_exists ident */
#line 13851 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->set_command(SQLCOM_SHOW_CREATE_DB, (yyvsp[-1].object_ddl_options));
Lex->name= (yyvsp[0].ident_sys);
}
#line 45861 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2229: /* show_param: CREATE TABLE_SYM table_ident */
#line 13856 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command = SQLCOM_SHOW_CREATE;
if (!lex->first_select_lex()->add_table_to_list(thd, (yyvsp[0].table), NULL,0))
MYSQL_YYABORT;
lex->create_info.storage_media= HA_SM_DEFAULT;
}
#line 45873 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2230: /* show_param: CREATE VIEW_SYM table_ident */
#line 13864 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command = SQLCOM_SHOW_CREATE;
if (!lex->first_select_lex()->add_table_to_list(thd, (yyvsp[0].table), NULL, 0))
MYSQL_YYABORT;
lex->table_type= TABLE_TYPE_VIEW;
}
#line 45885 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2231: /* show_param: CREATE SEQUENCE_SYM table_ident */
#line 13872 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command = SQLCOM_SHOW_CREATE;
if (!lex->first_select_lex()->add_table_to_list(thd, (yyvsp[0].table), NULL, 0))
MYSQL_YYABORT;
lex->table_type= TABLE_TYPE_SEQUENCE;
}
#line 45897 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2232: /* show_param: BINLOG_SYM STATUS_SYM */
#line 13880 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_SHOW_BINLOG_STAT;
}
#line 45905 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2233: /* show_param: MASTER_SYM STATUS_SYM */
#line 13884 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_SHOW_BINLOG_STAT;
}
#line 45913 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2234: /* show_param: ALL SLAVES STATUS_SYM */
#line 13888 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!(Lex->m_sql_cmd= new (thd->mem_root)
Sql_cmd_show_slave_status(true)))
MYSQL_YYABORT;
Lex->sql_command = SQLCOM_SHOW_SLAVE_STAT;
}
#line 45924 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2235: /* show_param: SLAVE optional_connection_name STATUS_SYM optional_for_channel */
#line 13895 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!(Lex->m_sql_cmd= new (thd->mem_root)
Sql_cmd_show_slave_status()))
MYSQL_YYABORT;
Lex->sql_command = SQLCOM_SHOW_SLAVE_STAT;
}
#line 45935 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2236: /* show_param: CREATE PROCEDURE_SYM sp_name */
#line 13902 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command = SQLCOM_SHOW_CREATE_PROC;
lex->spname= (yyvsp[0].spname);
}
#line 45946 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2237: /* show_param: CREATE FUNCTION_SYM sp_name */
#line 13909 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command = SQLCOM_SHOW_CREATE_FUNC;
lex->spname= (yyvsp[0].spname);
}
#line 45957 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2238: /* show_param: CREATE PACKAGE_MARIADB_SYM sp_name */
#line 13916 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command = SQLCOM_SHOW_CREATE_PACKAGE;
lex->spname= (yyvsp[0].spname);
}
#line 45967 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2239: /* show_param: CREATE PACKAGE_ORACLE_SYM sp_name */
#line 13922 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command = SQLCOM_SHOW_CREATE_PACKAGE;
lex->spname= (yyvsp[0].spname);
}
#line 45977 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2240: /* show_param: CREATE PACKAGE_MARIADB_SYM BODY_MARIADB_SYM sp_name */
#line 13928 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command = SQLCOM_SHOW_CREATE_PACKAGE_BODY;
lex->spname= (yyvsp[0].spname);
}
#line 45987 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2241: /* show_param: CREATE PACKAGE_ORACLE_SYM BODY_ORACLE_SYM sp_name */
#line 13934 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command = SQLCOM_SHOW_CREATE_PACKAGE_BODY;
lex->spname= (yyvsp[0].spname);
}
#line 45997 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2242: /* show_param: CREATE TRIGGER_SYM sp_name */
#line 13940 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_CREATE_TRIGGER;
lex->spname= (yyvsp[0].spname);
}
#line 46007 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2243: /* show_param: CREATE USER_SYM */
#line 13946 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command= SQLCOM_SHOW_CREATE_USER;
if (unlikely(!(Lex->grant_user=
(LEX_USER*)thd->calloc(sizeof(LEX_USER)))))
MYSQL_YYABORT;
Lex->grant_user->user= current_user;
}
#line 46019 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2244: /* show_param: CREATE USER_SYM user */
#line 13954 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command= SQLCOM_SHOW_CREATE_USER;
Lex->grant_user= (yyvsp[0].lex_user);
}
#line 46028 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2245: /* show_param: PROCEDURE_SYM STATUS_SYM wild_and_where */
#line 13959 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_STATUS_PROC;
if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)))
MYSQL_YYABORT;
}
#line 46039 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2246: /* show_param: FUNCTION_SYM STATUS_SYM wild_and_where */
#line 13966 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_STATUS_FUNC;
if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)))
MYSQL_YYABORT;
}
#line 46050 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2247: /* show_param: PACKAGE_MARIADB_SYM STATUS_SYM wild_and_where */
#line 13973 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_STATUS_PACKAGE;
if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)))
MYSQL_YYABORT;
}
#line 46061 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2248: /* show_param: PACKAGE_ORACLE_SYM STATUS_SYM wild_and_where */
#line 13980 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_STATUS_PACKAGE;
if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)))
MYSQL_YYABORT;
}
#line 46072 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2249: /* show_param: PACKAGE_MARIADB_SYM BODY_MARIADB_SYM STATUS_SYM wild_and_where */
#line 13987 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_STATUS_PACKAGE_BODY;
if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)))
MYSQL_YYABORT;
}
#line 46083 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2250: /* show_param: PACKAGE_ORACLE_SYM BODY_ORACLE_SYM STATUS_SYM wild_and_where */
#line 13994 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_STATUS_PACKAGE_BODY;
if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)))
MYSQL_YYABORT;
}
#line 46094 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2251: /* show_param: PROCEDURE_SYM CODE_SYM sp_name */
#line 14001 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command= SQLCOM_SHOW_PROC_CODE;
Lex->spname= (yyvsp[0].spname);
}
#line 46103 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2252: /* show_param: FUNCTION_SYM CODE_SYM sp_name */
#line 14006 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command= SQLCOM_SHOW_FUNC_CODE;
Lex->spname= (yyvsp[0].spname);
}
#line 46112 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2253: /* show_param: PACKAGE_MARIADB_SYM BODY_MARIADB_SYM CODE_SYM sp_name */
#line 14011 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command= SQLCOM_SHOW_PACKAGE_BODY_CODE;
Lex->spname= (yyvsp[0].spname);
}
#line 46121 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2254: /* show_param: PACKAGE_ORACLE_SYM BODY_ORACLE_SYM CODE_SYM sp_name */
#line 14016 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command= SQLCOM_SHOW_PACKAGE_BODY_CODE;
Lex->spname= (yyvsp[0].spname);
}
#line 46130 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2255: /* show_param: CREATE EVENT_SYM sp_name */
#line 14021 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->spname= (yyvsp[0].spname);
Lex->sql_command = SQLCOM_SHOW_CREATE_EVENT;
}
#line 46139 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2256: /* show_param: describe_command opt_format_json FOR_SYM expr */
#line 14030 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command= SQLCOM_SHOW_EXPLAIN;
if (unlikely(prepare_schema_table(thd, Lex, 0,
Lex->explain_json ? SCH_EXPLAIN_JSON : SCH_EXPLAIN_TABULAR)))
MYSQL_YYABORT;
add_value_to_list(thd, (yyvsp[0].item));
}
#line 46151 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2257: /* show_param: ANALYZE_SYM opt_format_json FOR_SYM expr */
#line 14038 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command= SQLCOM_SHOW_ANALYZE;
if (unlikely(prepare_schema_table(thd, Lex, 0,
Lex->explain_json ? SCH_ANALYZE_JSON : SCH_ANALYZE_TABULAR)))
MYSQL_YYABORT;
add_value_to_list(thd, (yyvsp[0].item));
}
#line 46163 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2258: /* show_param: IDENT_sys remember_tok_start wild_and_where */
#line 14046 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
bool in_plugin;
lex->sql_command= SQLCOM_SHOW_GENERIC;
ST_SCHEMA_TABLE *table= find_schema_table(thd, &(yyvsp[-2].ident_sys), &in_plugin);
if (unlikely(!table || !table->old_format || !in_plugin))
{
thd->parse_error(ER_SYNTAX_ERROR, (yyvsp[-1].simple_string));
MYSQL_YYABORT;
}
if (unlikely(lex->wild && table->idx_field1 < 0))
{
thd->parse_error(ER_SYNTAX_ERROR, (yyvsp[0].simple_string));
MYSQL_YYABORT;
}
if (unlikely(make_schema_select(thd, Lex->current_select, table)))
MYSQL_YYABORT;
}
#line 46186 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2259: /* show_engine_param: STATUS_SYM */
#line 14068 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->sql_command= SQLCOM_SHOW_ENGINE_STATUS; }
#line 46192 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2260: /* show_engine_param: MUTEX_SYM */
#line 14070 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->sql_command= SQLCOM_SHOW_ENGINE_MUTEX; }
#line 46198 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2261: /* show_engine_param: LOGS_SYM */
#line 14072 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->sql_command= SQLCOM_SHOW_ENGINE_LOGS; }
#line 46204 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2266: /* opt_db: %empty */
#line 14086 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= null_clex_str; }
#line 46210 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2267: /* opt_db: from_or_in ident */
#line 14087 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= (yyvsp[0].ident_sys); }
#line 46216 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2268: /* opt_full: %empty */
#line 14091 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->verbose=0; }
#line 46222 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2269: /* opt_full: FULL */
#line 14092 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->verbose=1; }
#line 46228 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2272: /* binlog_in: %empty */
#line 14101 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->mi.log_file_name = 0; }
#line 46234 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2273: /* binlog_in: IN_SYM TEXT_STRING_sys */
#line 14102 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->mi.log_file_name = (yyvsp[0].lex_str).str; }
#line 46240 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2274: /* binlog_from: %empty */
#line 14106 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->mi.pos = 4; /* skip magic number */ }
#line 46246 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2275: /* binlog_from: FROM ulonglong_num */
#line 14107 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->mi.pos = (yyvsp[0].ulonglong_number); }
#line 46252 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2276: /* wild_and_where: %empty */
#line 14111 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.simple_string)= 0; }
#line 46258 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2277: /* wild_and_where: LIKE remember_tok_start TEXT_STRING_sys */
#line 14113 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->wild= new (thd->mem_root) String((const char*) (yyvsp[0].lex_str).str,
(yyvsp[0].lex_str).length,
system_charset_info);
if (unlikely(Lex->wild == NULL))
MYSQL_YYABORT;
(yyval.simple_string)= (yyvsp[-1].simple_string);
}
#line 46271 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2278: /* wild_and_where: WHERE remember_tok_start expr */
#line 14122 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->where= normalize_cond(thd, (yyvsp[0].item));
if ((yyvsp[0].item))
(yyvsp[0].item)->top_level_item();
(yyval.simple_string)= (yyvsp[-1].simple_string);
}
#line 46282 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2279: /* $@202: %empty */
#line 14133 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (lex->main_select_push())
MYSQL_YYABORT;
lex->init_select();
lex->current_select->parsing_place= SELECT_LIST;
lex->sql_command= SQLCOM_SHOW_FIELDS;
lex->first_select_lex()->db= null_clex_str;
lex->verbose= 0;
if (unlikely(prepare_schema_table(thd, lex, (yyvsp[0].table), SCH_COLUMNS)))
MYSQL_YYABORT;
}
#line 46299 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2280: /* describe: describe_command table_ident $@202 opt_describe_column */
#line 14146 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->parsing_place= NO_MATTER;
Lex->pop_select(); //main select
}
#line 46308 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2281: /* $@203: %empty */
#line 14151 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->describe|= DESCRIBE_NORMAL; }
#line 46314 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2282: /* describe: describe_command opt_extended_describe $@203 explainable_command */
#line 14153 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->first_select_lex()->options|= SELECT_DESCRIBE;
}
#line 46323 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2291: /* analyze_stmt_command: ANALYZE_SYM opt_format_json explainable_command */
#line 14175 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->analyze_stmt= true;
}
#line 46331 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2292: /* opt_extended_describe: EXTENDED_SYM */
#line 14181 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->describe|= DESCRIBE_EXTENDED; }
#line 46337 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2293: /* opt_extended_describe: EXTENDED_SYM ALL */
#line 14183 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->describe|= DESCRIBE_EXTENDED | DESCRIBE_EXTENDED2; }
#line 46343 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2294: /* opt_extended_describe: PARTITIONS_SYM */
#line 14184 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->describe|= DESCRIBE_PARTITIONS; }
#line 46349 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2295: /* opt_extended_describe: opt_format_json */
#line 14185 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46355 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2296: /* opt_format_json: %empty */
#line 14189 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46361 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2297: /* opt_format_json: FORMAT_SYM '=' ident_or_text */
#line 14191 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (lex_string_eq(&(yyvsp[0].lex_str), STRING_WITH_LEN("JSON")))
Lex->explain_json= true;
else if (lex_string_eq(&(yyvsp[0].lex_str), STRING_WITH_LEN("TRADITIONAL")))
DBUG_ASSERT(Lex->explain_json==false);
else
my_yyabort_error((ER_UNKNOWN_EXPLAIN_FORMAT, MYF(0),
"EXPLAIN/ANALYZE", (yyvsp[0].lex_str).str));
}
#line 46375 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2298: /* opt_describe_column: %empty */
#line 14203 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46381 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2299: /* opt_describe_column: text_string */
#line 14204 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->wild= (yyvsp[0].string); }
#line 46387 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2300: /* opt_describe_column: ident */
#line 14206 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->wild= new (thd->mem_root) String((const char*) (yyvsp[0].ident_sys).str,
(yyvsp[0].ident_sys).length,
system_charset_info);
if (unlikely(Lex->wild == NULL))
MYSQL_YYABORT;
}
#line 46399 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2301: /* explain_for_connection: describe_command opt_format_json FOR_SYM CONNECTION_SYM expr */
#line 14222 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->wild=0;
lex->ident= null_clex_str;
if (Lex->main_select_push())
MYSQL_YYABORT;
lex->init_select();
lex->current_select->parsing_place= SELECT_LIST;
lex->create_info.init();
Select->parsing_place= NO_MATTER;
Lex->pop_select(); //main select
Lex->sql_command= SQLCOM_SHOW_EXPLAIN;
if (unlikely(prepare_schema_table(thd, Lex, 0,
Lex->explain_json ? SCH_EXPLAIN_JSON : SCH_EXPLAIN_TABULAR)))
MYSQL_YYABORT;
add_value_to_list(thd, (yyvsp[0].item));
}
#line 46421 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2302: /* $@204: %empty */
#line 14245 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_FLUSH;
lex->type= 0;
lex->no_write_to_binlog= (yyvsp[0].num);
}
#line 46432 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2303: /* flush: FLUSH_SYM opt_no_write_to_binlog $@204 flush_options */
#line 14251 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46438 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2304: /* $@205: %empty */
#line 14256 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->type|= REFRESH_TABLES;
/*
Set type of metadata and table locks for
FLUSH TABLES table_list [WITH READ LOCK].
*/
YYPS->m_lock_type= TL_READ_NO_INSERT;
YYPS->m_mdl_type= MDL_SHARED_HIGH_PRIO;
}
#line 46452 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2305: /* flush_options: table_or_tables $@205 opt_table_list opt_flush_lock */
#line 14266 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46458 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2306: /* flush_options: flush_options_list */
#line 14268 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46464 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2307: /* opt_flush_lock: %empty */
#line 14272 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46470 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2308: /* opt_flush_lock: flush_lock */
#line 14274 "/home/buildbot/git/sql/sql_yacc.yy"
{
TABLE_LIST *tables= Lex->query_tables;
for (; tables; tables= tables->next_global)
{
tables->mdl_request.set_type(MDL_SHARED_NO_WRITE);
/* Ignore temporary tables. */
tables->open_type= OT_BASE_ONLY;
}
}
#line 46484 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2309: /* flush_lock: WITH READ_SYM LOCK_SYM optional_flush_tables_arguments */
#line 14287 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_READ_LOCK | (yyvsp[0].num); }
#line 46490 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2310: /* $@206: %empty */
#line 14289 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->query_tables == NULL))
{
// Table list can't be empty
thd->parse_error(ER_NO_TABLES_USED);
MYSQL_YYABORT;
}
Lex->type|= REFRESH_FOR_EXPORT;
}
#line 46504 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2311: /* flush_lock: FOR_SYM $@206 EXPORT_SYM */
#line 14297 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46510 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2313: /* flush_options_list: flush_option */
#line 14303 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46516 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2314: /* flush_option: ERROR_SYM LOGS_SYM */
#line 14308 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_ERROR_LOG; }
#line 46522 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2315: /* flush_option: ENGINE_SYM LOGS_SYM */
#line 14310 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_ENGINE_LOG; }
#line 46528 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2316: /* flush_option: GENERAL LOGS_SYM */
#line 14312 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_GENERAL_LOG; }
#line 46534 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2317: /* flush_option: SLOW LOGS_SYM */
#line 14314 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_SLOW_LOG; }
#line 46540 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2318: /* flush_option: BINARY LOGS_SYM opt_delete_gtid_domain */
#line 14316 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_BINARY_LOG; }
#line 46546 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2319: /* flush_option: RELAY LOGS_SYM optional_connection_name optional_for_channel */
#line 14318 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (unlikely(lex->type & REFRESH_RELAY_LOG))
my_yyabort_error((ER_WRONG_USAGE, MYF(0), "FLUSH", "RELAY LOGS"));
lex->type|= REFRESH_RELAY_LOG;
lex->relay_log_connection_name= lex->mi.connection_name;
}
#line 46558 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2320: /* flush_option: QUERY_SYM CACHE_SYM */
#line 14326 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_QUERY_CACHE_FREE; }
#line 46564 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2321: /* flush_option: HOSTS_SYM */
#line 14328 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_HOSTS; }
#line 46570 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2322: /* flush_option: PRIVILEGES */
#line 14330 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_GRANT; }
#line 46576 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2323: /* flush_option: LOGS_SYM */
#line 14332 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->type|= REFRESH_LOG;
Lex->relay_log_connection_name= empty_clex_str;
}
#line 46585 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2324: /* flush_option: STATUS_SYM */
#line 14337 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_STATUS; }
#line 46591 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2325: /* flush_option: SLAVE optional_connection_name */
#line 14339 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (unlikely(lex->type & REFRESH_SLAVE))
my_yyabort_error((ER_WRONG_USAGE, MYF(0), "FLUSH","SLAVE"));
lex->type|= REFRESH_SLAVE;
lex->reset_slave_info.all= false;
}
#line 46603 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2326: /* flush_option: MASTER_SYM */
#line 14347 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_MASTER; }
#line 46609 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2327: /* flush_option: DES_KEY_FILE */
#line 14349 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_DES_KEY_FILE; }
#line 46615 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2328: /* flush_option: RESOURCES */
#line 14351 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_USER_RESOURCES; }
#line 46621 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2329: /* flush_option: SSL_SYM */
#line 14353 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_SSL;}
#line 46627 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2330: /* flush_option: THREADS_SYM */
#line 14355 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_THREADS;}
#line 46633 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2331: /* flush_option: IDENT_sys remember_tok_start */
#line 14357 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->type|= REFRESH_GENERIC;
ST_SCHEMA_TABLE *table= find_schema_table(thd, &(yyvsp[-1].ident_sys));
if (unlikely(!table || !table->reset_table))
{
thd->parse_error(ER_SYNTAX_ERROR, (yyvsp[0].simple_string));
MYSQL_YYABORT;
}
if (unlikely(Lex->view_list.push_back((LEX_CSTRING*)
thd->memdup(&(yyvsp[-1].ident_sys), sizeof(LEX_CSTRING)),
thd->mem_root)))
MYSQL_YYABORT;
}
#line 46651 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2332: /* opt_table_list: %empty */
#line 14373 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46657 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2333: /* opt_table_list: table_list */
#line 14374 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46663 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2334: /* backup: BACKUP_SYM backup_statements */
#line 14378 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46669 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2335: /* backup_statements: STAGE_SYM ident */
#line 14383 "/home/buildbot/git/sql/sql_yacc.yy"
{
int type;
if (unlikely(Lex->sphead))
my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "BACKUP STAGE"));
if ((type= find_type((yyvsp[0].ident_sys).str, &backup_stage_names,
FIND_TYPE_NO_PREFIX)) <= 0)
my_yyabort_error((ER_BACKUP_UNKNOWN_STAGE, MYF(0), (yyvsp[0].ident_sys).str));
Lex->sql_command= SQLCOM_BACKUP;
Lex->backup_stage= (backup_stages) (type-1);
break;
}
#line 46685 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2336: /* $@207: %empty */
#line 14395 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sphead))
my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "BACKUP LOCK"));
if (Lex->main_select_push())
MYSQL_YYABORT;
}
#line 46696 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2337: /* backup_statements: LOCK_SYM $@207 table_ident */
#line 14402 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!Select->add_table_to_list(thd, (yyvsp[0].table), NULL, 0,
TL_READ, MDL_SHARED_HIGH_PRIO)))
MYSQL_YYABORT;
Lex->sql_command= SQLCOM_BACKUP_LOCK;
Lex->pop_select(); //main select
}
#line 46708 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2338: /* backup_statements: UNLOCK_SYM */
#line 14410 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sphead))
my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "BACKUP UNLOCK"));
/* Table list is empty for unlock */
Lex->sql_command= SQLCOM_BACKUP_LOCK;
}
#line 46719 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2339: /* opt_delete_gtid_domain: %empty */
#line 14419 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46725 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2340: /* opt_delete_gtid_domain: DELETE_DOMAIN_ID_SYM '=' '(' delete_domain_id_list ')' */
#line 14421 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46731 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2344: /* delete_domain_id: ulonglong_num */
#line 14431 "/home/buildbot/git/sql/sql_yacc.yy"
{
uint32 value= (uint32) (yyvsp[0].ulonglong_number);
if ((yyvsp[0].ulonglong_number) > UINT_MAX32)
{
my_printf_error(ER_BINLOG_CANT_DELETE_GTID_DOMAIN,
"The value of gtid domain being deleted ('%llu') "
"exceeds its maximum size "
"of 32 bit unsigned integer", MYF(0), (yyvsp[0].ulonglong_number));
MYSQL_YYABORT;
}
insert_dynamic(&Lex->delete_gtid_domain, (uchar*) &value);
}
#line 46748 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2345: /* optional_flush_tables_arguments: %empty */
#line 14446 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.num)= 0;}
#line 46754 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2346: /* optional_flush_tables_arguments: AND_SYM DISABLE_SYM CHECKPOINT_SYM */
#line 14447 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.num)= REFRESH_CHECKPOINT; }
#line 46760 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2347: /* $@208: %empty */
#line 14452 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_RESET; lex->type=0;
}
#line 46769 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2348: /* reset: RESET_SYM $@208 reset_options */
#line 14457 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46775 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2351: /* $@209: %empty */
#line 14466 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_SLAVE; }
#line 46781 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2352: /* reset_option: SLAVE $@209 optional_connection_name slave_reset_options optional_for_channel */
#line 14469 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 46787 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2353: /* $@210: %empty */
#line 14471 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->type|= REFRESH_MASTER;
Lex->next_binlog_file_number= 0;
}
#line 46796 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2355: /* reset_option: QUERY_SYM CACHE_SYM */
#line 14476 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_QUERY_CACHE;}
#line 46802 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2356: /* slave_reset_options: %empty */
#line 14480 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->reset_slave_info.all= false; }
#line 46808 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2357: /* slave_reset_options: ALL */
#line 14481 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->reset_slave_info.all= true; }
#line 46814 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2358: /* master_reset_options: %empty */
#line 14485 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46820 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2359: /* master_reset_options: TO_SYM ulong_num */
#line 14487 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->next_binlog_file_number = (yyvsp[0].ulong_num);
}
#line 46828 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2360: /* purge: PURGE master_or_binary LOGS_SYM TO_SYM TEXT_STRING_sys */
#line 14494 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->stmt_purge_to((yyvsp[0].lex_str));
}
#line 46836 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2361: /* $@211: %empty */
#line 14498 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->clause_that_disallows_subselect= "PURGE..BEFORE"; }
#line 46842 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2362: /* purge: PURGE master_or_binary LOGS_SYM BEFORE_SYM $@211 expr */
#line 14500 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->clause_that_disallows_subselect= NULL;
if (Lex->stmt_purge_before((yyvsp[0].item)))
MYSQL_YYABORT;
}
#line 46852 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2363: /* $@212: %empty */
#line 14512 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->value_list.empty();
lex->users_list.empty();
lex->sql_command= SQLCOM_KILL;
lex->kill_type= KILL_TYPE_ID;
}
#line 46864 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2364: /* kill: KILL_SYM $@212 kill_type kill_option */
#line 14520 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->kill_signal= (killed_state) ((yyvsp[-1].num) | (yyvsp[0].num));
}
#line 46872 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2365: /* kill_type: %empty */
#line 14526 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= (int) KILL_HARD_BIT; }
#line 46878 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2366: /* kill_type: HARD_SYM */
#line 14527 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= (int) KILL_HARD_BIT; }
#line 46884 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2367: /* kill_type: SOFT_SYM */
#line 14528 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 46890 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2368: /* kill_option: opt_connection kill_expr */
#line 14532 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= (int) KILL_CONNECTION; }
#line 46896 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2369: /* kill_option: QUERY_SYM kill_expr */
#line 14533 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= (int) KILL_QUERY; }
#line 46902 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2370: /* kill_option: QUERY_SYM ID_SYM expr */
#line 14535 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= (int) KILL_QUERY;
Lex->kill_type= KILL_TYPE_QUERY;
Lex->value_list.push_front((yyvsp[0].item), thd->mem_root);
}
#line 46912 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2371: /* opt_connection: %empty */
#line 14543 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 46918 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2372: /* opt_connection: CONNECTION_SYM */
#line 14544 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 46924 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2373: /* kill_expr: expr */
#line 14549 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->value_list.push_front((yyval.item), thd->mem_root);
}
#line 46932 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2374: /* kill_expr: USER_SYM user */
#line 14553 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root);
Lex->kill_type= KILL_TYPE_USER;
}
#line 46941 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2375: /* $@213: %empty */
#line 14560 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->sql_command= SQLCOM_SHUTDOWN; }
#line 46947 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2376: /* shutdown: SHUTDOWN $@213 shutdown_option */
#line 14561 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46953 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2377: /* shutdown_option: %empty */
#line 14565 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->is_shutdown_wait_for_slaves= false; }
#line 46959 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2378: /* shutdown_option: WAIT_SYM FOR_SYM ALL SLAVES */
#line 14567 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->is_shutdown_wait_for_slaves= true;
}
#line 46967 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2379: /* use: USE_SYM ident */
#line 14576 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command=SQLCOM_CHANGE_DB;
lex->first_select_lex()->db= (yyvsp[0].ident_sys);
}
#line 46977 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2380: /* $@214: %empty */
#line 14587 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= thd->lex;
if (unlikely(lex->sphead))
{
my_error(ER_SP_BADSTATEMENT, MYF(0),
(yyvsp[0].filetype) == FILETYPE_CSV ? "LOAD DATA" : "LOAD XML");
MYSQL_YYABORT;
}
if (lex->main_select_push())
MYSQL_YYABORT;
lex->init_select();
}
#line 46995 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2381: /* $@215: %empty */
#line 14601 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_LOAD;
lex->local_file= (yyvsp[-2].num);
lex->duplicates= DUP_ERROR;
lex->ignore= 0;
if (unlikely(!(lex->exchange= new (thd->mem_root)
sql_exchange((yyvsp[0].lex_str).str, 0, (yyvsp[-5].filetype)))))
MYSQL_YYABORT;
}
#line 47010 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2382: /* $@216: %empty */
#line 14612 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
if (unlikely(!Select->add_table_to_list(thd, (yyvsp[-1].table), NULL,
TL_OPTION_UPDATING,
(yyvsp[-9].lock_type), MDL_SHARED_WRITE,
NULL, (yyvsp[0].string_list))))
MYSQL_YYABORT;
lex->field_list.empty();
lex->update_list.empty();
lex->value_list.empty();
lex->many_values.empty();
}
#line 47027 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2383: /* $@217: %empty */
#line 14625 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->exchange->cs= (yyvsp[0].charset); }
#line 47033 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2384: /* load: LOAD data_or_xml $@214 load_data_lock opt_local INFILE TEXT_STRING_filesystem $@215 opt_duplicate INTO TABLE_SYM table_ident opt_use_partition $@216 opt_load_data_charset $@217 opt_xml_rows_identified_by opt_field_term opt_line_term opt_ignore_lines opt_field_or_var_spec opt_load_data_set_spec stmt_end */
#line 14630 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->mark_first_table_as_inserting();
}
#line 47041 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2385: /* data_or_xml: DATA_SYM */
#line 14636 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.filetype)= FILETYPE_CSV; }
#line 47047 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2386: /* data_or_xml: XML_SYM */
#line 14637 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.filetype)= FILETYPE_XML; }
#line 47053 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2387: /* opt_local: %empty */
#line 14641 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)=0;}
#line 47059 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2388: /* opt_local: LOCAL_SYM */
#line 14642 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)=1;}
#line 47065 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2389: /* load_data_lock: %empty */
#line 14646 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lock_type)= TL_WRITE_DEFAULT; }
#line 47071 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2390: /* load_data_lock: CONCURRENT */
#line 14648 "/home/buildbot/git/sql/sql_yacc.yy"
{
/*
Ignore this option in SP to avoid problem with query cache and
triggers with non default priority locks
*/
(yyval.lock_type)= (Lex->sphead ? TL_WRITE_DEFAULT : TL_WRITE_CONCURRENT_INSERT);
}
#line 47083 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2391: /* load_data_lock: LOW_PRIORITY */
#line 14655 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; }
#line 47089 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2392: /* opt_duplicate: %empty */
#line 14659 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->duplicates=DUP_ERROR; }
#line 47095 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2393: /* opt_duplicate: REPLACE */
#line 14660 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->duplicates=DUP_REPLACE; }
#line 47101 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2394: /* opt_duplicate: IGNORE_SYM */
#line 14661 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ignore= 1; }
#line 47107 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2399: /* field_term: TERMINATED BY text_string */
#line 14676 "/home/buildbot/git/sql/sql_yacc.yy"
{
DBUG_ASSERT(Lex->exchange != 0);
Lex->exchange->field_term= (yyvsp[0].string);
}
#line 47116 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2400: /* field_term: OPTIONALLY ENCLOSED BY text_string */
#line 14681 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
DBUG_ASSERT(lex->exchange != 0);
lex->exchange->enclosed= (yyvsp[0].string);
lex->exchange->opt_enclosed= 1;
}
#line 47127 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2401: /* field_term: ENCLOSED BY text_string */
#line 14688 "/home/buildbot/git/sql/sql_yacc.yy"
{
DBUG_ASSERT(Lex->exchange != 0);
Lex->exchange->enclosed= (yyvsp[0].string);
}
#line 47136 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2402: /* field_term: ESCAPED BY text_string */
#line 14693 "/home/buildbot/git/sql/sql_yacc.yy"
{
DBUG_ASSERT(Lex->exchange != 0);
Lex->exchange->escaped= (yyvsp[0].string);
}
#line 47145 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2407: /* line_term: TERMINATED BY text_string */
#line 14711 "/home/buildbot/git/sql/sql_yacc.yy"
{
DBUG_ASSERT(Lex->exchange != 0);
Lex->exchange->line_term= (yyvsp[0].string);
}
#line 47154 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2408: /* line_term: STARTING BY text_string */
#line 14716 "/home/buildbot/git/sql/sql_yacc.yy"
{
DBUG_ASSERT(Lex->exchange != 0);
Lex->exchange->line_start= (yyvsp[0].string);
}
#line 47163 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2409: /* opt_xml_rows_identified_by: %empty */
#line 14723 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 47169 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2410: /* opt_xml_rows_identified_by: ROWS_SYM IDENTIFIED_SYM BY text_string */
#line 14725 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->exchange->line_term = (yyvsp[0].string); }
#line 47175 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2412: /* opt_ignore_lines: IGNORE_SYM NUM lines_or_rows */
#line 14731 "/home/buildbot/git/sql/sql_yacc.yy"
{
DBUG_ASSERT(Lex->exchange != 0);
Lex->exchange->skip_lines= atol((yyvsp[-1].lex_str).str);
}
#line 47184 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2413: /* lines_or_rows: LINES */
#line 14738 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 47190 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2414: /* lines_or_rows: ROWS_SYM */
#line 14739 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 47196 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2415: /* opt_field_or_var_spec: %empty */
#line 14743 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47202 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2416: /* opt_field_or_var_spec: '(' fields_or_vars ')' */
#line 14744 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47208 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2417: /* opt_field_or_var_spec: '(' ')' */
#line 14745 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47214 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2418: /* fields_or_vars: fields_or_vars ',' field_or_var */
#line 14750 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); }
#line 47220 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2419: /* fields_or_vars: field_or_var */
#line 14752 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); }
#line 47226 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2420: /* field_or_var: simple_ident_nospvar */
#line 14756 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.item)= (yyvsp[0].item);}
#line 47232 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2421: /* field_or_var: '@' ident_or_text */
#line 14758 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!(yyvsp[0].lex_str).length)
{
thd->parse_error();
MYSQL_YYABORT;
}
(yyval.item)= new (thd->mem_root) Item_user_var_as_out_param(thd, &(yyvsp[0].lex_str));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 47248 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2422: /* opt_load_data_set_spec: %empty */
#line 14772 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47254 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2423: /* opt_load_data_set_spec: SET load_data_set_list */
#line 14773 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47260 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2426: /* load_data_set_elem: simple_ident_nospvar equal remember_name expr_or_ignore_or_default remember_end */
#line 14783 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (unlikely(lex->update_list.push_back((yyvsp[-4].item), thd->mem_root)) ||
unlikely(lex->value_list.push_back((yyvsp[-1].item), thd->mem_root)))
MYSQL_YYABORT;
(yyvsp[-1].item)->set_name_no_truncate(thd, (yyvsp[-2].simple_string), (uint) ((yyvsp[0].simple_string) - (yyvsp[-2].simple_string)), thd->charset());
}
#line 47272 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2427: /* text_literal: TEXT_STRING */
#line 14796 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item_basic_constant)= thd->make_string_literal((yyvsp[0].lex_string_with_metadata)))))
MYSQL_YYABORT;
}
#line 47281 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2428: /* text_literal: NCHAR_STRING */
#line 14801 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item_basic_constant)= thd->make_string_literal_nchar((yyvsp[0].lex_string_with_metadata)))))
MYSQL_YYABORT;
}
#line 47290 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2429: /* text_literal: UNDERSCORE_CHARSET TEXT_STRING */
#line 14806 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item_basic_constant)= thd->make_string_literal_charset((yyvsp[0].lex_string_with_metadata), (yyvsp[-1].charset)))))
MYSQL_YYABORT;
}
#line 47299 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2430: /* text_literal: text_literal TEXT_STRING_literal */
#line 14811 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item_basic_constant)= (yyvsp[-1].item_basic_constant)->make_string_literal_concat(thd, &(yyvsp[0].lex_str)))))
MYSQL_YYABORT;
}
#line 47308 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2431: /* text_string: TEXT_STRING_literal */
#line 14819 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.string)= new (thd->mem_root) String((const char*) (yyvsp[0].lex_str).str,
(yyvsp[0].lex_str).length,
thd->variables.collation_connection);
if (unlikely((yyval.string) == NULL))
MYSQL_YYABORT;
}
#line 47320 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2432: /* text_string: hex_or_bin_String */
#line 14826 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.string)= (yyvsp[0].string); }
#line 47326 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2433: /* hex_or_bin_String: HEX_NUM */
#line 14832 "/home/buildbot/git/sql/sql_yacc.yy"
{
Item *tmp= new (thd->mem_root) Item_hex_hybrid(thd, (yyvsp[0].lex_str).str,
(yyvsp[0].lex_str).length);
if (unlikely(tmp == NULL))
MYSQL_YYABORT;
(yyval.string)= tmp->val_str((String*) 0);
}
#line 47338 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2434: /* hex_or_bin_String: HEX_STRING */
#line 14840 "/home/buildbot/git/sql/sql_yacc.yy"
{
Item *tmp= new (thd->mem_root) Item_hex_string(thd, (yyvsp[0].lex_str).str,
(yyvsp[0].lex_str).length);
if (unlikely(tmp == NULL))
MYSQL_YYABORT;
(yyval.string)= tmp->val_str((String*) 0);
}
#line 47350 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2435: /* hex_or_bin_String: BIN_NUM */
#line 14848 "/home/buildbot/git/sql/sql_yacc.yy"
{
Item *tmp= new (thd->mem_root) Item_bin_string(thd, (yyvsp[0].lex_str).str,
(yyvsp[0].lex_str).length);
if (unlikely(tmp == NULL))
MYSQL_YYABORT;
/*
it is OK only emulate fix_fields, because we need only
value of constant
*/
(yyval.string)= tmp->val_str((String*) 0);
}
#line 47366 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2436: /* param_marker: PARAM_MARKER */
#line 14863 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item_param)= Lex->add_placeholder(thd, ¶m_clex_str,
YYLIP->get_tok_start(),
YYLIP->get_tok_start() + 1))))
MYSQL_YYABORT;
}
#line 47377 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2437: /* param_marker: COLON_ORACLE_SYM ident_cli */
#line 14870 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item_param)= Lex->add_placeholder(thd, &null_clex_str,
(yyvsp[-1].kwd).pos(), (yyvsp[0].ident_cli).end()))))
MYSQL_YYABORT;
}
#line 47387 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2438: /* param_marker: COLON_ORACLE_SYM NUM */
#line 14876 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item_param)= Lex->add_placeholder(thd, &null_clex_str,
(yyvsp[-1].kwd).pos(),
YYLIP->get_ptr()))))
MYSQL_YYABORT;
}
#line 47398 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2439: /* signed_literal: '+' NUM_literal */
#line 14885 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item) = (yyvsp[0].item_num); }
#line 47404 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2440: /* signed_literal: '-' NUM_literal */
#line 14887 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[0].item_num)->max_length++;
(yyval.item)= (yyvsp[0].item_num)->neg(thd);
}
#line 47413 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2441: /* literal: text_literal */
#line 14894 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item) = (yyvsp[0].item_basic_constant); }
#line 47419 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2442: /* literal: NUM_literal */
#line 14895 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item) = (yyvsp[0].item_num); }
#line 47425 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2443: /* literal: temporal_literal */
#line 14896 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)= (yyvsp[0].item); }
#line 47431 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2444: /* literal: NULL_SYM */
#line 14898 "/home/buildbot/git/sql/sql_yacc.yy"
{
/*
For the digest computation, in this context only,
NULL is considered a literal, hence reduced to '?'
REDUCE:
TOK_GENERIC_VALUE := NULL_SYM
*/
YYLIP->reduce_digest_token(TOK_GENERIC_VALUE, NULL_SYM);
(yyval.item)= new (thd->mem_root) Item_null(thd);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
YYLIP->next_state= MY_LEX_OPERATOR_OR_IDENT;
}
#line 47449 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2445: /* literal: FALSE_SYM */
#line 14912 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_bool(thd, (char*) "FALSE",0);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 47459 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2446: /* literal: TRUE_SYM */
#line 14918 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_bool(thd, (char*) "TRUE",1);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 47469 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2447: /* literal: HEX_NUM */
#line 14924 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_hex_hybrid(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 47479 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2448: /* literal: HEX_STRING */
#line 14930 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_hex_string(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 47489 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2449: /* literal: BIN_NUM */
#line 14936 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_bin_string(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 47499 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2450: /* literal: UNDERSCORE_CHARSET hex_or_bin_String */
#line 14942 "/home/buildbot/git/sql/sql_yacc.yy"
{
Item_string_with_introducer *item_str;
LEX_CSTRING tmp;
(yyvsp[0].string)->get_value(&tmp);
/*
Pass NULL as name. Name will be set in the "select_item" rule and
will include the introducer and the original hex/bin notation.
*/
item_str= new (thd->mem_root)
Item_string_with_introducer(thd, null_clex_str,
tmp, (yyvsp[-1].charset));
if (unlikely(!item_str ||
!item_str->check_well_formed_result(true)))
MYSQL_YYABORT;
(yyval.item)= item_str;
}
#line 47521 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2451: /* NUM_literal: NUM */
#line 14963 "/home/buildbot/git/sql/sql_yacc.yy"
{
int error;
(yyval.item_num)= new (thd->mem_root)
Item_int(thd, (yyvsp[0].lex_str).str,
(longlong) my_strtoll10((yyvsp[0].lex_str).str, NULL, &error),
(yyvsp[0].lex_str).length);
if (unlikely((yyval.item_num) == NULL))
MYSQL_YYABORT;
}
#line 47535 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2452: /* NUM_literal: LONG_NUM */
#line 14973 "/home/buildbot/git/sql/sql_yacc.yy"
{
int error;
(yyval.item_num)= new (thd->mem_root)
Item_int(thd, (yyvsp[0].lex_str).str,
(longlong) my_strtoll10((yyvsp[0].lex_str).str, NULL, &error),
(yyvsp[0].lex_str).length);
if (unlikely((yyval.item_num) == NULL))
MYSQL_YYABORT;
}
#line 47549 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2453: /* NUM_literal: ULONGLONG_NUM */
#line 14983 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item_num)= new (thd->mem_root) Item_uint(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
if (unlikely((yyval.item_num) == NULL))
MYSQL_YYABORT;
}
#line 47559 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2454: /* NUM_literal: DECIMAL_NUM */
#line 14989 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item_num)= new (thd->mem_root) Item_decimal(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length,
thd->charset());
if (unlikely((yyval.item_num) == NULL) || unlikely(thd->is_error()))
MYSQL_YYABORT;
}
#line 47570 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2455: /* NUM_literal: FLOAT_NUM */
#line 14996 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item_num)= new (thd->mem_root) Item_float(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
if (unlikely((yyval.item_num) == NULL) || unlikely(thd->is_error()))
MYSQL_YYABORT;
}
#line 47580 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2456: /* temporal_literal: DATE_SYM TEXT_STRING */
#line 15006 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= type_handler_newdate.create_literal_item(thd,
(yyvsp[0].lex_string_with_metadata).str, (yyvsp[0].lex_string_with_metadata).length,
YYCSCL, true))))
MYSQL_YYABORT;
}
#line 47591 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2457: /* temporal_literal: TIME_SYM TEXT_STRING */
#line 15013 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= type_handler_time2.create_literal_item(thd,
(yyvsp[0].lex_string_with_metadata).str, (yyvsp[0].lex_string_with_metadata).length,
YYCSCL, true))))
MYSQL_YYABORT;
}
#line 47602 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2458: /* temporal_literal: TIMESTAMP TEXT_STRING */
#line 15020 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= type_handler_datetime.create_literal_item(thd,
(yyvsp[0].lex_string_with_metadata).str, (yyvsp[0].lex_string_with_metadata).length,
YYCSCL, true))))
MYSQL_YYABORT;
}
#line 47613 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2459: /* $@218: %empty */
#line 15030 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
With_clause *with_clause=
new With_clause((yyvsp[0].num), Lex->curr_with_clause);
if (unlikely(with_clause == NULL))
MYSQL_YYABORT;
lex->derived_tables|= DERIVED_WITH;
lex->with_cte_resolution= true;
lex->curr_with_clause= with_clause;
with_clause->add_to_list(&lex->with_clauses_list,
lex->with_clauses_list_last_next);
if (lex->current_select &&
lex->current_select->parsing_place == BEFORE_OPT_LIST)
lex->current_select->parsing_place= NO_MATTER;
}
#line 47633 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2460: /* with_clause: WITH opt_recursive $@218 with_list */
#line 15046 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.with_clause)= Lex->curr_with_clause;
Lex->curr_with_clause= Lex->curr_with_clause->pop();
}
#line 47642 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2461: /* opt_recursive: %empty */
#line 15054 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 47648 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2462: /* opt_recursive: RECURSIVE_SYM */
#line 15055 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 47654 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2465: /* with_list_element: with_element_head opt_with_column_list AS '(' query_expression ')' opt_cycle */
#line 15069 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= thd->lex;
const char *query_start= lex->sphead ? lex->sphead->m_tmp_query
: thd->query();
const char *spec_start= (yyvsp[-3].kwd).pos() + 1;
With_element *elem= new With_element((yyvsp[-6].with_element_head), *(yyvsp[-5].ident_sys_list), (yyvsp[-2].select_lex_unit));
if (elem == NULL || Lex->curr_with_clause->add_with_element(elem))
MYSQL_YYABORT;
if (elem->set_unparsed_spec(thd, spec_start, (yyvsp[-1].kwd).pos(),
spec_start - query_start))
MYSQL_YYABORT;
if ((yyvsp[0].ident_sys_list))
{
elem->set_cycle_list((yyvsp[0].ident_sys_list));
}
elem->set_tables_end_pos(lex->query_tables_last);
}
#line 47676 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2466: /* opt_cycle: %empty */
#line 15090 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ident_sys_list)= NULL; }
#line 47682 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2467: /* $@219: %empty */
#line 15093 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!Lex->curr_with_clause->with_recursive)
{
thd->parse_error(ER_SYNTAX_ERROR, (yyvsp[0].kwd).pos());
}
}
#line 47693 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2468: /* opt_cycle: CYCLE_SYM $@219 comma_separated_ident_list RESTRICT */
#line 15100 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.ident_sys_list)= (yyvsp[-1].ident_sys_list);
}
#line 47701 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2469: /* opt_with_column_list: %empty */
#line 15108 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (((yyval.ident_sys_list)= new (thd->mem_root) List) == NULL)
MYSQL_YYABORT;
}
#line 47710 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2470: /* opt_with_column_list: '(' with_column_list ')' */
#line 15113 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ident_sys_list)= (yyvsp[-1].ident_sys_list); }
#line 47716 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2472: /* ident_sys_alloc: ident_cli */
#line 15122 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.ident_sys_ptr)= new (thd->mem_root) Lex_ident_sys(thd, &(yyvsp[0].ident_cli));
}
#line 47724 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2473: /* comma_separated_ident_list: ident_sys_alloc */
#line 15129 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.ident_sys_list)= new (thd->mem_root) List;
if (unlikely((yyval.ident_sys_list) == NULL || (yyval.ident_sys_list)->push_back((yyvsp[0].ident_sys_ptr))))
MYSQL_YYABORT;
}
#line 47734 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2474: /* comma_separated_ident_list: comma_separated_ident_list ',' ident_sys_alloc */
#line 15135 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (((yyval.ident_sys_list)= (yyvsp[-2].ident_sys_list))->push_back((yyvsp[0].ident_sys_ptr)))
MYSQL_YYABORT;
}
#line 47743 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2475: /* with_element_head: ident */
#line 15144 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX_CSTRING *name=
(LEX_CSTRING *) thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_CSTRING));
(yyval.with_element_head)= new (thd->mem_root) With_element_head(name);
if (unlikely(name == NULL || (yyval.with_element_head) == NULL))
MYSQL_YYABORT;
(yyval.with_element_head)->tables_pos.set_start_pos(Lex->query_tables_last);
}
#line 47756 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2476: /* insert_ident: simple_ident_nospvar */
#line 15161 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)=(yyvsp[0].item); }
#line 47762 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2477: /* insert_ident: table_wild */
#line 15162 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)=(yyvsp[0].item); }
#line 47768 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2478: /* table_wild: ident '.' '*' */
#line 15167 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_qualified_asterisk(thd, &(yyvsp[-2].ident_sys)))))
MYSQL_YYABORT;
}
#line 47777 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2479: /* table_wild: ident '.' ident '.' '*' */
#line 15172 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_qualified_asterisk(thd, &(yyvsp[-4].ident_sys), &(yyvsp[-2].ident_sys)))))
MYSQL_YYABORT;
}
#line 47786 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2480: /* select_sublist_qualified_asterisk: ident_cli '.' '*' */
#line 15180 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_qualified_asterisk(thd, &(yyvsp[-2].ident_cli)))))
MYSQL_YYABORT;
}
#line 47795 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2481: /* select_sublist_qualified_asterisk: ident_cli '.' ident_cli '.' '*' */
#line 15185 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_qualified_asterisk(thd, &(yyvsp[-4].ident_cli), &(yyvsp[-2].ident_cli)))))
MYSQL_YYABORT;
}
#line 47804 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2482: /* order_ident: expr */
#line 15192 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)=(yyvsp[0].item); }
#line 47810 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2483: /* simple_ident: ident_cli */
#line 15198 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &(yyvsp[0].ident_cli)))))
MYSQL_YYABORT;
}
#line 47819 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2484: /* simple_ident: ident_cli '.' ident_cli */
#line 15203 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &(yyvsp[-2].ident_cli), &(yyvsp[0].ident_cli)))))
MYSQL_YYABORT;
}
#line 47828 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2485: /* simple_ident: '.' ident_cli '.' ident_cli */
#line 15208 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex_ident_cli empty((yyvsp[-2].ident_cli).pos(), 0);
if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &empty, &(yyvsp[-2].ident_cli), &(yyvsp[0].ident_cli)))))
MYSQL_YYABORT;
}
#line 47838 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2486: /* simple_ident: ident_cli '.' ident_cli '.' ident_cli */
#line 15214 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &(yyvsp[-4].ident_cli), &(yyvsp[-2].ident_cli), &(yyvsp[0].ident_cli)))))
MYSQL_YYABORT;
}
#line 47847 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2487: /* simple_ident: COLON_ORACLE_SYM ident_cli '.' ident_cli */
#line 15219 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->make_item_colon_ident_ident(thd, &(yyvsp[-2].ident_cli), &(yyvsp[0].ident_cli)))))
MYSQL_YYABORT;
}
#line 47856 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2488: /* simple_ident_nospvar: ident */
#line 15227 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_ident_nosp(thd, &(yyvsp[0].ident_sys)))))
MYSQL_YYABORT;
}
#line 47865 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2489: /* simple_ident_nospvar: ident '.' ident */
#line 15232 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_ident_nospvar(thd, &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
MYSQL_YYABORT;
}
#line 47874 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2490: /* simple_ident_nospvar: COLON_ORACLE_SYM ident_cli '.' ident_cli */
#line 15237 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->make_item_colon_ident_ident(thd, &(yyvsp[-2].ident_cli), &(yyvsp[0].ident_cli)))))
MYSQL_YYABORT;
}
#line 47883 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2491: /* simple_ident_nospvar: '.' ident '.' ident */
#line 15242 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex_ident_sys none;
if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &none, &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
MYSQL_YYABORT;
}
#line 47893 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2492: /* simple_ident_nospvar: ident '.' ident '.' ident */
#line 15248 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &(yyvsp[-4].ident_sys), &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
MYSQL_YYABORT;
}
#line 47902 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2493: /* field_ident: ident */
#line 15255 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].ident_sys);}
#line 47908 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2494: /* field_ident: ident '.' ident '.' ident */
#line 15257 "/home/buildbot/git/sql/sql_yacc.yy"
{
TABLE_LIST *table= Select->table_list.first;
if (unlikely(my_strcasecmp(table_alias_charset, (yyvsp[-4].ident_sys).str,
table->db.str)))
my_yyabort_error((ER_WRONG_DB_NAME, MYF(0), (yyvsp[-4].ident_sys).str));
if (unlikely(my_strcasecmp(table_alias_charset, (yyvsp[-2].ident_sys).str,
table->table_name.str)))
my_yyabort_error((ER_WRONG_TABLE_NAME, MYF(0), (yyvsp[-2].ident_sys).str));
(yyval.lex_str)=(yyvsp[0].ident_sys);
}
#line 47923 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2495: /* field_ident: ident '.' ident */
#line 15268 "/home/buildbot/git/sql/sql_yacc.yy"
{
TABLE_LIST *table= Select->table_list.first;
if (unlikely(my_strcasecmp(table_alias_charset, (yyvsp[-2].ident_sys).str,
table->alias.str)))
my_yyabort_error((ER_WRONG_TABLE_NAME, MYF(0), (yyvsp[-2].ident_sys).str));
(yyval.lex_str)=(yyvsp[0].ident_sys);
}
#line 47935 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2496: /* field_ident: '.' ident */
#line 15275 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].ident_sys);}
#line 47941 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2497: /* table_ident: ident */
#line 15280 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.table)= new (thd->mem_root) Table_ident(&(yyvsp[0].ident_sys));
if (unlikely((yyval.table) == NULL))
MYSQL_YYABORT;
}
#line 47951 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2498: /* table_ident: ident '.' ident */
#line 15286 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.table)= new (thd->mem_root) Table_ident(thd, &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys), 0);
if (unlikely((yyval.table) == NULL))
MYSQL_YYABORT;
}
#line 47961 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2499: /* table_ident: '.' ident */
#line 15292 "/home/buildbot/git/sql/sql_yacc.yy"
{
/* For Delphi */
(yyval.table)= new (thd->mem_root) Table_ident(&(yyvsp[0].ident_sys));
if (unlikely((yyval.table) == NULL))
MYSQL_YYABORT;
}
#line 47972 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2500: /* table_ident_opt_wild: ident opt_wild */
#line 15302 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.table)= new (thd->mem_root) Table_ident(&(yyvsp[-1].ident_sys));
if (unlikely((yyval.table) == NULL))
MYSQL_YYABORT;
}
#line 47982 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2501: /* table_ident_opt_wild: ident '.' ident opt_wild */
#line 15308 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.table)= new (thd->mem_root) Table_ident(thd, &(yyvsp[-3].ident_sys), &(yyvsp[-1].ident_sys), 0);
if (unlikely((yyval.table) == NULL))
MYSQL_YYABORT;
}
#line 47992 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2502: /* table_ident_nodb: ident */
#line 15317 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX_CSTRING db= any_db;
(yyval.table)= new (thd->mem_root) Table_ident(thd, &db, &(yyvsp[0].ident_sys), 0);
if (unlikely((yyval.table) == NULL))
MYSQL_YYABORT;
}
#line 48003 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2507: /* ident_cli: keyword_ident */
#line 15333 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ident_cli)= (yyvsp[0].kwd); }
#line 48009 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2508: /* IDENT_sys: IDENT_cli */
#line 15338 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(thd->to_ident_sys_alloc(&(yyval.ident_sys), &(yyvsp[0].ident_cli))))
MYSQL_YYABORT;
}
#line 48018 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2511: /* ident_cli_func: keyword_func_sp_var_and_label */
#line 15347 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ident_cli)= (yyvsp[0].kwd); }
#line 48024 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2512: /* ident_cli_func: keyword_func_sp_var_not_label */
#line 15348 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ident_cli)= (yyvsp[0].kwd); }
#line 48030 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2513: /* ident_func: ident_cli_func */
#line 15353 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(thd->to_ident_sys_alloc(&(yyval.ident_sys), &(yyvsp[0].ident_cli))))
MYSQL_YYABORT;
}
#line 48039 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2514: /* TEXT_STRING_sys: TEXT_STRING */
#line 15362 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (thd->make_text_string_sys(&(yyval.lex_str), &(yyvsp[0].lex_string_with_metadata)))
MYSQL_YYABORT;
}
#line 48048 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2515: /* TEXT_STRING_literal: TEXT_STRING */
#line 15370 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (thd->make_text_string_connection(&(yyval.lex_str), &(yyvsp[0].lex_string_with_metadata)))
MYSQL_YYABORT;
}
#line 48057 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2516: /* TEXT_STRING_filesystem: TEXT_STRING */
#line 15378 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (thd->make_text_string_filesystem(&(yyval.lex_str), &(yyvsp[0].lex_string_with_metadata)))
MYSQL_YYABORT;
}
#line 48066 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2518: /* ident_table_alias: keyword_table_alias */
#line 15387 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyval.ident_sys).copy_keyword(thd, &(yyvsp[0].kwd))))
MYSQL_YYABORT;
}
#line 48075 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2519: /* ident_cli_set_usual_case: IDENT_cli */
#line 15394 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ident_cli)= (yyvsp[0].ident_cli); }
#line 48081 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2520: /* ident_cli_set_usual_case: keyword_set_usual_case */
#line 15395 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ident_cli)= (yyvsp[0].kwd); }
#line 48087 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2522: /* ident_sysvar_name: keyword_sysvar_name */
#line 15401 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyval.ident_sys).copy_keyword(thd, &(yyvsp[0].kwd))))
MYSQL_YYABORT;
}
#line 48096 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2523: /* ident_sysvar_name: TEXT_STRING_sys */
#line 15406 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyval.ident_sys).copy_sys(thd, &(yyvsp[0].lex_str))))
MYSQL_YYABORT;
}
#line 48105 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2525: /* ident: keyword_ident */
#line 15416 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyval.ident_sys).copy_keyword(thd, &(yyvsp[0].kwd))))
MYSQL_YYABORT;
}
#line 48114 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2527: /* label_ident: keyword_label */
#line 15425 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyval.ident_sys).copy_keyword(thd, &(yyvsp[0].kwd))))
MYSQL_YYABORT;
}
#line 48123 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2528: /* ident_or_text: ident */
#line 15432 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].ident_sys);}
#line 48129 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2529: /* ident_or_text: TEXT_STRING_sys */
#line 15433 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].lex_str);}
#line 48135 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2530: /* ident_or_text: LEX_HOSTNAME */
#line 15434 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].lex_str);}
#line 48141 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2531: /* user_maybe_role: ident_or_text */
#line 15439 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.lex_user)=(LEX_USER*) thd->calloc(sizeof(LEX_USER)))))
MYSQL_YYABORT;
(yyval.lex_user)->user = (yyvsp[0].lex_str);
if (unlikely(check_string_char_length(&(yyval.lex_user)->user, ER_USERNAME,
username_char_length,
system_charset_info, 0)))
MYSQL_YYABORT;
}
#line 48156 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2532: /* user_maybe_role: ident_or_text '@' ident_or_text */
#line 15450 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.lex_user)=(LEX_USER*) thd->calloc(sizeof(LEX_USER)))))
MYSQL_YYABORT;
(yyval.lex_user)->user = (yyvsp[-2].lex_str); (yyval.lex_user)->host=(yyvsp[0].lex_str);
if (unlikely(check_string_char_length(&(yyval.lex_user)->user, ER_USERNAME,
username_char_length,
system_charset_info, 0)) ||
unlikely(check_host_name(&(yyval.lex_user)->host)))
MYSQL_YYABORT;
if ((yyval.lex_user)->host.str[0])
{
/*
Convert hostname part of username to lowercase.
It's OK to use in-place lowercase as long as
the character set is utf8.
*/
my_casedn_str(system_charset_info, (char*) (yyval.lex_user)->host.str);
}
else
{
/*
fix historical undocumented convention that empty host is the
same as '%'
*/
(yyval.lex_user)->host= host_not_specified;
}
}
#line 48189 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2533: /* user_maybe_role: CURRENT_USER optional_braces */
#line 15479 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.lex_user)=(LEX_USER*)thd->calloc(sizeof(LEX_USER)))))
MYSQL_YYABORT;
(yyval.lex_user)->user= current_user;
(yyval.lex_user)->auth= new (thd->mem_root) USER_AUTH();
}
#line 48200 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 2536: /* user: user_maybe_role */
#line 15490 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyvsp[0].lex_user)->user.str != current_user.str && (yyvsp[0].lex_user)->host.str == 0)
(yyvsp[0].lex_user)->host= host_not_specified;
(yyval.lex_user)= (yyvsp[0].lex_user);
}
#line 48210 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3262: /* $@220: %empty */
#line 16359 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->set_stmt_init();
}
#line 48219 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3263: /* set: SET $@220 set_param */
#line 16364 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->check_main_unit_semantics())
MYSQL_YYABORT;
}
#line 48228 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3266: /* $@221: %empty */
#line 16374 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->option_type= OPT_DEFAULT;
if (sp_create_assignment_lex(thd, (yyvsp[0].kwd).pos()))
MYSQL_YYABORT;
}
#line 48238 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3267: /* set_param: TRANSACTION_SYM $@221 transaction_characteristics */
#line 16380 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
MYSQL_YYABORT;
}
#line 48247 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3268: /* $@222: %empty */
#line 16385 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->option_type= (yyvsp[0].var_type);
}
#line 48255 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3270: /* $@223: %empty */
#line 16391 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (unlikely(lex->table_or_sp_used()))
my_yyabort_error((ER_SUBQUERIES_NOT_SUPPORTED, MYF(0), "SET STATEMENT"));
lex->stmt_var_list= lex->var_list;
lex->var_list.empty();
if (Lex->check_main_unit_semantics())
MYSQL_YYABORT;
}
#line 48269 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3276: /* $@224: %empty */
#line 16418 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[0].kwd).pos()))
MYSQL_YYABORT;
}
#line 48278 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3277: /* start_option_value_list_following_option_type: TRANSACTION_SYM $@224 transaction_characteristics */
#line 16423 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
MYSQL_YYABORT;
}
#line 48287 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3280: /* $@225: %empty */
#line 16438 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->option_type= (yyvsp[0].var_type);
}
#line 48295 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3283: /* option_type: GLOBAL_SYM */
#line 16446 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.var_type)=OPT_GLOBAL; }
#line 48301 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3284: /* option_type: LOCAL_SYM */
#line 16447 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.var_type)=OPT_SESSION; }
#line 48307 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3285: /* option_type: SESSION_SYM */
#line 16448 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.var_type)=OPT_SESSION; }
#line 48313 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3286: /* opt_var_type: %empty */
#line 16452 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.var_type)=OPT_SESSION; }
#line 48319 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3287: /* opt_var_type: GLOBAL_SYM */
#line 16453 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.var_type)=OPT_GLOBAL; }
#line 48325 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3288: /* opt_var_type: LOCAL_SYM */
#line 16454 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.var_type)=OPT_SESSION; }
#line 48331 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3289: /* opt_var_type: SESSION_SYM */
#line 16455 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.var_type)=OPT_SESSION; }
#line 48337 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3290: /* opt_var_ident_type: %empty */
#line 16459 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.var_type)=OPT_DEFAULT; }
#line 48343 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3291: /* opt_var_ident_type: GLOBAL_SYM '.' */
#line 16460 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.var_type)=OPT_GLOBAL; }
#line 48349 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3292: /* opt_var_ident_type: LOCAL_SYM '.' */
#line 16461 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.var_type)=OPT_SESSION; }
#line 48355 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3293: /* opt_var_ident_type: SESSION_SYM '.' */
#line 16462 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.var_type)=OPT_SESSION; }
#line 48361 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3294: /* $@226: %empty */
#line 16471 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->main_select_push(false))
MYSQL_YYABORT;
}
#line 48370 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3295: /* set_stmt_option: ident_cli equal $@226 set_expr_or_default */
#line 16476 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex_ident_sys tmp(thd, &(yyvsp[-3].ident_cli));
if (unlikely(!tmp.str) ||
unlikely(Lex->set_system_variable(Lex->option_type, &tmp, (yyvsp[0].item))))
MYSQL_YYABORT;
Lex->pop_select(); //min select
}
#line 48382 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3296: /* $@227: %empty */
#line 16484 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->main_select_push(false))
MYSQL_YYABORT;
}
#line 48391 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3297: /* set_stmt_option: ident_cli '.' ident equal $@227 set_expr_or_default */
#line 16489 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex_ident_sys tmp(thd, &(yyvsp[-5].ident_cli));
if (unlikely(!tmp.str) ||
unlikely(Lex->set_system_variable(thd, Lex->option_type,
&tmp, &(yyvsp[-3].ident_sys), (yyvsp[0].item))))
MYSQL_YYABORT;
Lex->pop_select(); //min select
}
#line 48404 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3298: /* $@228: %empty */
#line 16498 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->main_select_push(false))
MYSQL_YYABORT;
}
#line 48413 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3299: /* set_stmt_option: DEFAULT '.' ident equal $@228 set_expr_or_default */
#line 16503 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->set_default_system_variable(Lex->option_type,
&(yyvsp[-3].ident_sys), (yyvsp[0].item))))
MYSQL_YYABORT;
Lex->pop_select(); //min select
}
#line 48424 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3300: /* $@229: %empty */
#line 16515 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[-1].ident_cli).pos()))
MYSQL_YYABORT;
}
#line 48433 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3301: /* option_value_following_option_type: ident_cli equal $@229 set_expr_or_default */
#line 16520 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex_ident_sys tmp(thd, &(yyvsp[-3].ident_cli));
if (unlikely(!tmp.str) ||
unlikely(Lex->set_system_variable(Lex->option_type, &tmp, (yyvsp[0].item))) ||
unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
MYSQL_YYABORT;
}
#line 48445 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3302: /* $@230: %empty */
#line 16528 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[-3].ident_cli).pos()))
MYSQL_YYABORT;
}
#line 48454 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3303: /* option_value_following_option_type: ident_cli '.' ident equal $@230 set_expr_or_default */
#line 16533 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex_ident_sys tmp(thd, &(yyvsp[-5].ident_cli));
if (unlikely(!tmp.str) ||
unlikely(Lex->set_system_variable(thd, Lex->option_type, &tmp, &(yyvsp[-3].ident_sys), (yyvsp[0].item))) ||
unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
MYSQL_YYABORT;
}
#line 48466 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3304: /* $@231: %empty */
#line 16541 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[-3].kwd).pos()))
MYSQL_YYABORT;
}
#line 48475 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3305: /* option_value_following_option_type: DEFAULT '.' ident equal $@231 set_expr_or_default */
#line 16546 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->set_default_system_variable(Lex->option_type, &(yyvsp[-3].ident_sys), (yyvsp[0].item))) ||
unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
MYSQL_YYABORT;
}
#line 48485 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3306: /* $@232: %empty */
#line 16556 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[-1].ident_cli).pos()))
MYSQL_YYABORT;
}
#line 48494 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3307: /* option_value_no_option_type: ident_cli_set_usual_case equal $@232 set_expr_or_default */
#line 16561 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex_ident_sys tmp(thd, &(yyvsp[-3].ident_cli));
if (unlikely(!tmp.str) ||
unlikely(Lex->set_variable(&tmp, (yyvsp[0].item))) ||
unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
MYSQL_YYABORT;
}
#line 48506 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3308: /* $@233: %empty */
#line 16569 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[-3].ident_cli).pos()))
MYSQL_YYABORT;
}
#line 48515 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3309: /* option_value_no_option_type: ident_cli_set_usual_case '.' ident equal $@233 set_expr_or_default */
#line 16574 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex_ident_sys tmp(thd, &(yyvsp[-5].ident_cli));
if (unlikely(!tmp.str) ||
unlikely(Lex->set_variable(&tmp, &(yyvsp[-3].ident_sys), (yyvsp[0].item))) ||
unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
MYSQL_YYABORT;
}
#line 48527 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3310: /* $@234: %empty */
#line 16582 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[-3].kwd).pos()))
MYSQL_YYABORT;
}
#line 48536 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3311: /* option_value_no_option_type: DEFAULT '.' ident equal $@234 set_expr_or_default */
#line 16587 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->set_default_system_variable(Lex->option_type, &(yyvsp[-3].ident_sys), (yyvsp[0].item))))
MYSQL_YYABORT;
if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
MYSQL_YYABORT;
}
#line 48547 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3312: /* $@235: %empty */
#line 16594 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!(yyvsp[-1].lex_str).length)
{
thd->parse_error();
MYSQL_YYABORT;
}
if (sp_create_assignment_lex(thd, (yyvsp[-2].lex_str).str))
MYSQL_YYABORT;
}
#line 48562 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3313: /* option_value_no_option_type: '@' ident_or_text equal $@235 expr */
#line 16605 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->set_user_variable(thd, &(yyvsp[-3].lex_str), (yyvsp[0].item))) ||
unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
MYSQL_YYABORT;
}
#line 48572 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3314: /* $@236: %empty */
#line 16611 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[-4].lex_str).str))
MYSQL_YYABORT;
}
#line 48581 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3315: /* option_value_no_option_type: '@' '@' opt_var_ident_type ident_sysvar_name equal $@236 set_expr_or_default */
#line 16616 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->set_system_variable((yyvsp[-4].var_type), &(yyvsp[-3].ident_sys), (yyvsp[0].item))) ||
unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
MYSQL_YYABORT;
}
#line 48591 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3316: /* $@237: %empty */
#line 16622 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[-6].lex_str).str))
MYSQL_YYABORT;
}
#line 48600 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3317: /* option_value_no_option_type: '@' '@' opt_var_ident_type ident_sysvar_name '.' ident equal $@237 set_expr_or_default */
#line 16627 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->set_system_variable(thd, (yyvsp[-6].var_type), &(yyvsp[-5].ident_sys), &(yyvsp[-3].ident_sys), (yyvsp[0].item))) ||
unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
MYSQL_YYABORT;
}
#line 48610 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3318: /* $@238: %empty */
#line 16633 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[-6].lex_str).str))
MYSQL_YYABORT;
}
#line 48619 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3319: /* option_value_no_option_type: '@' '@' opt_var_ident_type DEFAULT '.' ident equal $@238 set_expr_or_default */
#line 16638 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->set_default_system_variable((yyvsp[-6].var_type), &(yyvsp[-3].ident_sys), (yyvsp[0].item))) ||
unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
MYSQL_YYABORT;
}
#line 48629 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3320: /* option_value_no_option_type: charset old_or_new_charset_name_or_default */
#line 16644 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[-1].kwd).pos()))
MYSQL_YYABORT;
LEX *lex= thd->lex;
CHARSET_INFO *cs2;
cs2= (yyvsp[0].charset) ? (yyvsp[0].charset): global_system_variables.character_set_client;
set_var_collation_client *var;
var= (new (thd->mem_root)
set_var_collation_client(cs2,
thd->variables.collation_database,
cs2));
if (unlikely(var == NULL))
MYSQL_YYABORT;
lex->var_list.push_back(var, thd->mem_root);
if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
MYSQL_YYABORT;
}
#line 48651 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3321: /* option_value_no_option_type: NAMES_SYM equal expr */
#line 16662 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
sp_pcontext *spc= lex->spcont;
LEX_CSTRING names= { STRING_WITH_LEN("names") };
if (unlikely(spc && spc->find_variable(&names, false)))
my_error(ER_SP_BAD_VAR_SHADOW, MYF(0), names.str);
else
thd->parse_error();
MYSQL_YYABORT;
}
#line 48666 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3322: /* option_value_no_option_type: NAMES_SYM charset_name_or_default */
#line 16673 "/home/buildbot/git/sql/sql_yacc.yy"
{
CHARSET_INFO *def= global_system_variables.character_set_client;
Lex_exact_charset_opt_extended_collate tmp((yyvsp[0].charset) ? (yyvsp[0].charset) : def, false);
if (Lex->set_names((yyvsp[-1].kwd).pos(), tmp, yychar == YYEMPTY))
MYSQL_YYABORT;
}
#line 48677 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3323: /* option_value_no_option_type: NAMES_SYM charset_name_or_default COLLATE_SYM collation_name_or_default */
#line 16681 "/home/buildbot/git/sql/sql_yacc.yy"
{
CHARSET_INFO *def= global_system_variables.character_set_client;
Lex_exact_charset_opt_extended_collate tmp((yyvsp[-2].charset) ? (yyvsp[-2].charset) : def, false);
if (tmp.merge_collation((yyvsp[0].Lex_extended_collation)) ||
Lex->set_names((yyvsp[-3].kwd).pos(), tmp, yychar == YYEMPTY))
MYSQL_YYABORT;
}
#line 48689 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3324: /* option_value_no_option_type: DEFAULT ROLE_SYM grant_role */
#line 16689 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[-2].kwd).pos()))
MYSQL_YYABORT;
LEX *lex = Lex;
LEX_USER *user;
if (unlikely(!(user=(LEX_USER *) thd->calloc(sizeof(LEX_USER)))))
MYSQL_YYABORT;
user->user= current_user;
set_var_default_role *var= (new (thd->mem_root)
set_var_default_role(user,
(yyvsp[0].lex_user)->user));
if (unlikely(var == NULL) ||
unlikely(lex->var_list.push_back(var, thd->mem_root)))
MYSQL_YYABORT;
thd->lex->autocommit= TRUE;
if (lex->sphead)
lex->sphead->m_flags|= sp_head::HAS_SET_AUTOCOMMIT_STMT;
if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
MYSQL_YYABORT;
}
#line 48715 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3325: /* option_value_no_option_type: DEFAULT ROLE_SYM grant_role FOR_SYM user */
#line 16711 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[-4].kwd).pos()))
MYSQL_YYABORT;
LEX *lex = Lex;
set_var_default_role *var= (new (thd->mem_root)
set_var_default_role((yyvsp[0].lex_user), (yyvsp[-2].lex_user)->user));
if (unlikely(var == NULL) ||
unlikely(lex->var_list.push_back(var, thd->mem_root)))
MYSQL_YYABORT;
thd->lex->autocommit= TRUE;
if (lex->sphead)
lex->sphead->m_flags|= sp_head::HAS_SET_AUTOCOMMIT_STMT;
if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
MYSQL_YYABORT;
}
#line 48735 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3326: /* option_value_no_option_type: ROLE_SYM role_name */
#line 16727 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[-1].kwd).pos()))
MYSQL_YYABORT;
LEX *lex = Lex;
set_var_role *var= new (thd->mem_root) set_var_role((yyvsp[0].lex_user)->user);
if (unlikely(var == NULL) ||
unlikely(lex->var_list.push_back(var, thd->mem_root)) ||
unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
MYSQL_YYABORT;
}
#line 48750 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3327: /* $@239: %empty */
#line 16738 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[-1].kwd).pos()))
MYSQL_YYABORT;
}
#line 48759 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3328: /* option_value_no_option_type: ROLE_SYM equal $@239 set_expr_or_default */
#line 16743 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex_ident_sys tmp(thd, &(yyvsp[-3].kwd));
if (unlikely(!tmp.str) ||
unlikely(Lex->set_variable(&tmp, (yyvsp[0].item))) ||
unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
MYSQL_YYABORT;
}
#line 48771 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3329: /* $@240: %empty */
#line 16751 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[-1].kwd).pos()))
MYSQL_YYABORT;
}
#line 48780 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3330: /* option_value_no_option_type: PASSWORD_SYM equal $@240 text_or_password */
#line 16756 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_create_set_password_instr(thd, (yyvsp[0].user_auth),
yychar == YYEMPTY)))
MYSQL_YYABORT;
}
#line 48790 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3331: /* $@241: %empty */
#line 16762 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[-1].kwd).pos()))
MYSQL_YYABORT;
}
#line 48799 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3332: /* option_value_no_option_type: PASSWORD_SYM FOR_SYM $@241 user equal text_or_password */
#line 16767 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_create_set_password_instr(thd, (yyvsp[-2].lex_user), (yyvsp[0].user_auth),
yychar == YYEMPTY)))
MYSQL_YYABORT;
}
#line 48809 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3337: /* transaction_access_mode: transaction_access_mode_types */
#line 16783 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
Item *item= new (thd->mem_root) Item_int(thd, (int32) (yyvsp[0].num));
if (unlikely(item == NULL))
MYSQL_YYABORT;
set_var *var= (new (thd->mem_root)
set_var(thd, lex->option_type,
find_sys_var(thd, "tx_read_only"),
&null_clex_str,
item));
if (unlikely(var == NULL))
MYSQL_YYABORT;
if (unlikely(lex->var_list.push_back(var, thd->mem_root)))
MYSQL_YYABORT;
}
#line 48829 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3338: /* isolation_level: ISOLATION LEVEL_SYM isolation_types */
#line 16802 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
Item *item= new (thd->mem_root) Item_int(thd, (int32) (yyvsp[0].tx_isolation));
if (unlikely(item == NULL))
MYSQL_YYABORT;
set_var *var= (new (thd->mem_root)
set_var(thd, lex->option_type,
find_sys_var(thd, "tx_isolation"),
&null_clex_str,
item));
if (unlikely(var == NULL) ||
unlikely(lex->var_list.push_back(var, thd->mem_root)))
MYSQL_YYABORT;
}
#line 48848 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3339: /* transaction_access_mode_types: READ_SYM ONLY_SYM */
#line 16819 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= true; }
#line 48854 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3340: /* transaction_access_mode_types: READ_SYM WRITE_SYM */
#line 16820 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= false; }
#line 48860 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3341: /* isolation_types: READ_SYM UNCOMMITTED_SYM */
#line 16824 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.tx_isolation)= ISO_READ_UNCOMMITTED; }
#line 48866 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3342: /* isolation_types: READ_SYM COMMITTED_SYM */
#line 16825 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.tx_isolation)= ISO_READ_COMMITTED; }
#line 48872 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3343: /* isolation_types: REPEATABLE_SYM READ_SYM */
#line 16826 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.tx_isolation)= ISO_REPEATABLE_READ; }
#line 48878 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3344: /* isolation_types: SERIALIZABLE_SYM */
#line 16827 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.tx_isolation)= ISO_SERIALIZABLE; }
#line 48884 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3345: /* text_or_password: TEXT_STRING */
#line 16833 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.user_auth)= new (thd->mem_root) USER_AUTH();
(yyval.user_auth)->auth_str= (yyvsp[0].lex_string_with_metadata);
}
#line 48893 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3346: /* text_or_password: PASSWORD_SYM '(' TEXT_STRING ')' */
#line 16838 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.user_auth)= new (thd->mem_root) USER_AUTH();
(yyval.user_auth)->pwtext= (yyvsp[-1].lex_string_with_metadata);
}
#line 48902 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3347: /* text_or_password: OLD_PASSWORD_SYM '(' TEXT_STRING ')' */
#line 16843 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.user_auth)= new (thd->mem_root) USER_AUTH();
(yyval.user_auth)->pwtext= (yyvsp[-1].lex_string_with_metadata);
(yyval.user_auth)->auth_str.str= Item_func_password::alloc(thd,
(yyvsp[-1].lex_string_with_metadata).str, (yyvsp[-1].lex_string_with_metadata).length, Item_func_password::OLD);
(yyval.user_auth)->auth_str.length= SCRAMBLED_PASSWORD_CHAR_LENGTH_323;
}
#line 48914 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3348: /* set_expr_or_default: expr */
#line 16853 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)=(yyvsp[0].item); }
#line 48920 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3349: /* set_expr_or_default: DEFAULT */
#line 16854 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)=0; }
#line 48926 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3350: /* set_expr_or_default: ON */
#line 16856 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)=new (thd->mem_root) Item_string_sys(thd, "ON", 2);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 48936 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3351: /* set_expr_or_default: ALL */
#line 16862 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)=new (thd->mem_root) Item_string_sys(thd, "ALL", 3);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 48946 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3352: /* set_expr_or_default: BINARY */
#line 16868 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)=new (thd->mem_root) Item_string_sys(thd, "binary", 6);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 48956 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3353: /* $@242: %empty */
#line 16879 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (unlikely(lex->sphead))
my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "LOCK"));
lex->sql_command= SQLCOM_LOCK_TABLES;
}
#line 48968 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3354: /* lock: LOCK_SYM table_or_tables $@242 table_lock_list opt_lock_wait_timeout */
#line 16887 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 48974 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3355: /* opt_lock_wait_timeout: %empty */
#line 16892 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 48980 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3356: /* opt_lock_wait_timeout: WAIT_SYM ulong_num */
#line 16894 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(set_statement_var_if_exists(thd, STRING_WITH_LEN("lock_wait_timeout"), (yyvsp[0].ulong_num))) ||
unlikely(set_statement_var_if_exists(thd, STRING_WITH_LEN("innodb_lock_wait_timeout"), (yyvsp[0].ulong_num))))
MYSQL_YYABORT;
}
#line 48990 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3357: /* opt_lock_wait_timeout: NOWAIT_SYM */
#line 16900 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(set_statement_var_if_exists(thd, STRING_WITH_LEN("lock_wait_timeout"), 0)) ||
unlikely(set_statement_var_if_exists(thd, STRING_WITH_LEN("innodb_lock_wait_timeout"), 0)))
MYSQL_YYABORT;
}
#line 49000 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3358: /* table_or_tables: TABLE_SYM */
#line 16908 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 49006 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3359: /* table_or_tables: TABLES */
#line 16909 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 49012 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3362: /* table_lock: table_ident opt_table_alias_clause lock_option */
#line 16919 "/home/buildbot/git/sql/sql_yacc.yy"
{
thr_lock_type lock_type= (thr_lock_type) (yyvsp[0].num);
bool lock_for_write= (lock_type >= TL_FIRST_WRITE);
ulong table_options= lock_for_write ? TL_OPTION_UPDATING : 0;
enum_mdl_type mdl_type= !lock_for_write
? MDL_SHARED_READ
: lock_type == TL_WRITE_CONCURRENT_INSERT
? MDL_SHARED_WRITE
: MDL_SHARED_NO_READ_WRITE;
if (unlikely(!Lex->current_select_or_default()->
add_table_to_list(thd, (yyvsp[-2].table), (yyvsp[-1].lex_str_ptr), table_options,
lock_type, mdl_type)))
MYSQL_YYABORT;
}
#line 49032 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3363: /* lock_option: READ_SYM */
#line 16937 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= TL_READ_NO_INSERT; }
#line 49038 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3364: /* lock_option: WRITE_SYM */
#line 16938 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= TL_WRITE_DEFAULT; }
#line 49044 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3365: /* lock_option: WRITE_SYM CONCURRENT */
#line 16940 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= (Lex->sphead ? TL_WRITE_DEFAULT : TL_WRITE_CONCURRENT_INSERT);
}
#line 49052 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3366: /* lock_option: LOW_PRIORITY WRITE_SYM */
#line 16944 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= TL_WRITE_LOW_PRIORITY; }
#line 49058 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3367: /* lock_option: READ_SYM LOCAL_SYM */
#line 16945 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= TL_READ; }
#line 49064 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3368: /* $@243: %empty */
#line 16950 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (unlikely(lex->sphead))
my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "UNLOCK"));
lex->sql_command= SQLCOM_UNLOCK_TABLES;
}
#line 49076 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3369: /* unlock: UNLOCK_SYM $@243 table_or_tables */
#line 16958 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 49082 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3370: /* $@244: %empty */
#line 16967 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->main_select_push())
MYSQL_YYABORT;
}
#line 49091 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3371: /* handler: HANDLER_SYM $@244 handler_tail */
#line 16972 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->pop_select(); //main select
}
#line 49099 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3372: /* handler_tail: table_ident OPEN_SYM opt_table_alias_clause */
#line 16979 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (unlikely(lex->sphead))
my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "HANDLER"));
lex->sql_command = SQLCOM_HA_OPEN;
if (!lex->current_select->add_table_to_list(thd, (yyvsp[-2].table), (yyvsp[0].lex_str_ptr), 0))
MYSQL_YYABORT;
}
#line 49112 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3373: /* handler_tail: table_ident_nodb CLOSE_SYM */
#line 16988 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (unlikely(lex->sphead))
my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "HANDLER"));
lex->sql_command = SQLCOM_HA_CLOSE;
if (!lex->current_select->add_table_to_list(thd, (yyvsp[-1].table), 0, 0))
MYSQL_YYABORT;
}
#line 49125 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3374: /* $@245: %empty */
#line 16997 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
SELECT_LEX *select= Select;
if (unlikely(lex->sphead))
my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "HANDLER"));
lex->clause_that_disallows_subselect= "HANDLER..READ";
lex->sql_command = SQLCOM_HA_READ;
lex->ha_rkey_mode= HA_READ_KEY_EXACT; /* Avoid purify warnings */
Item *one= new (thd->mem_root) Item_int(thd, (int32) 1);
if (unlikely(one == NULL))
MYSQL_YYABORT;
select->limit_params.select_limit= one;
select->limit_params.offset_limit= 0;
lex->limit_rows_examined= 0;
if (!lex->current_select->add_table_to_list(thd, (yyvsp[-1].table), 0, 0))
MYSQL_YYABORT;
}
#line 49147 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3375: /* handler_tail: table_ident_nodb READ_SYM $@245 handler_read_or_scan opt_where_clause opt_global_limit_clause */
#line 17015 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
SELECT_LEX *select= Select;
lex->clause_that_disallows_subselect= NULL;
if (!lex->current_select->limit_params.explicit_limit)
{
Item *one= new (thd->mem_root) Item_int(thd, (int32) 1);
if (one == NULL)
MYSQL_YYABORT;
select->limit_params.select_limit= one;
select->limit_params.offset_limit= 0;
lex->limit_rows_examined= 0;
}
/* Stored functions are not supported for HANDLER READ. */
if (lex->uses_stored_routines())
{
my_error(ER_NOT_SUPPORTED_YET, MYF(0),
"stored functions in HANDLER ... READ");
MYSQL_YYABORT;
}
}
#line 49173 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3376: /* handler_read_or_scan: handler_scan_function */
#line 17039 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ident= null_clex_str; }
#line 49179 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3377: /* handler_read_or_scan: ident handler_rkey_function */
#line 17040 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ident= (yyvsp[-1].ident_sys); }
#line 49185 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3378: /* handler_scan_function: FIRST_SYM */
#line 17044 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ha_read_mode = RFIRST; }
#line 49191 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3379: /* handler_scan_function: NEXT_SYM */
#line 17045 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ha_read_mode = RNEXT; }
#line 49197 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3380: /* handler_rkey_function: FIRST_SYM */
#line 17049 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ha_read_mode = RFIRST; }
#line 49203 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3381: /* handler_rkey_function: NEXT_SYM */
#line 17050 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ha_read_mode = RNEXT; }
#line 49209 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3382: /* handler_rkey_function: PREV_SYM */
#line 17051 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ha_read_mode = RPREV; }
#line 49215 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3383: /* handler_rkey_function: LAST_SYM */
#line 17052 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ha_read_mode = RLAST; }
#line 49221 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3384: /* $@246: %empty */
#line 17054 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->ha_read_mode = RKEY;
lex->ha_rkey_mode=(yyvsp[0].ha_rkey_mode);
if (unlikely(!(lex->insert_list= new (thd->mem_root) List_item)))
MYSQL_YYABORT;
}
#line 49233 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3385: /* handler_rkey_function: handler_rkey_mode $@246 '(' values ')' */
#line 17062 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 49239 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3386: /* handler_rkey_mode: '=' */
#line 17066 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ha_rkey_mode)=HA_READ_KEY_EXACT; }
#line 49245 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3387: /* handler_rkey_mode: GE */
#line 17067 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ha_rkey_mode)=HA_READ_KEY_OR_NEXT; }
#line 49251 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3388: /* handler_rkey_mode: LE */
#line 17068 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ha_rkey_mode)=HA_READ_KEY_OR_PREV; }
#line 49257 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3389: /* handler_rkey_mode: '>' */
#line 17069 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ha_rkey_mode)=HA_READ_AFTER_KEY; }
#line 49263 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3390: /* handler_rkey_mode: '<' */
#line 17070 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ha_rkey_mode)=HA_READ_BEFORE_KEY; }
#line 49269 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3391: /* revoke: REVOKE clear_privileges revoke_command */
#line 17077 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 49275 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3392: /* revoke_command: grant_privileges ON opt_table grant_ident FROM user_and_role_list */
#line 17082 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_revoke_table(thd, (yyvsp[-5].lex_grant), *(yyvsp[-2].lex_grant_ident)))
MYSQL_YYABORT;
}
#line 49284 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3393: /* revoke_command: grant_privileges ON sp_handler grant_ident FROM user_and_role_list */
#line 17087 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_revoke_sp(thd, (yyvsp[-5].lex_grant), *(yyvsp[-2].lex_grant_ident), *(yyvsp[-3].sp_handler)))
MYSQL_YYABORT;
}
#line 49293 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3394: /* revoke_command: ALL opt_privileges ',' GRANT OPTION FROM user_and_role_list */
#line 17092 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_REVOKE_ALL;
}
#line 49301 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3395: /* revoke_command: PROXY_SYM ON user FROM user_list */
#line 17096 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_revoke_proxy(thd, (yyvsp[-2].lex_user)))
MYSQL_YYABORT;
}
#line 49310 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3396: /* revoke_command: admin_option_for_role FROM user_and_role_list */
#line 17101 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command= SQLCOM_REVOKE_ROLE;
if (unlikely(Lex->users_list.push_front((yyvsp[-2].lex_user), thd->mem_root)))
MYSQL_YYABORT;
}
#line 49320 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3397: /* admin_option_for_role: ADMIN_SYM OPTION FOR_SYM grant_role */
#line 17110 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->with_admin_option= true; (yyval.lex_user)= (yyvsp[0].lex_user); }
#line 49326 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3398: /* admin_option_for_role: grant_role */
#line 17112 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->with_admin_option= false; (yyval.lex_user)= (yyvsp[0].lex_user); }
#line 49332 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3399: /* grant: GRANT clear_privileges grant_command */
#line 17117 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 49338 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3400: /* grant_command: grant_privileges ON opt_table grant_ident TO_SYM grant_list opt_require_clause opt_grant_options */
#line 17123 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_grant_table(thd, (yyvsp[-7].lex_grant), *(yyvsp[-4].lex_grant_ident), (yyvsp[0].privilege)))
MYSQL_YYABORT;
}
#line 49347 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3401: /* grant_command: grant_privileges ON sp_handler grant_ident TO_SYM grant_list opt_require_clause opt_grant_options */
#line 17129 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_grant_sp(thd, (yyvsp[-7].lex_grant), *(yyvsp[-4].lex_grant_ident), *(yyvsp[-5].sp_handler), (yyvsp[0].privilege)))
MYSQL_YYABORT;
}
#line 49356 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3402: /* grant_command: PROXY_SYM ON user TO_SYM grant_list opt_grant_option */
#line 17134 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_grant_proxy(thd, (yyvsp[-3].lex_user), (yyvsp[0].privilege)))
MYSQL_YYABORT;
}
#line 49365 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3403: /* grant_command: grant_role TO_SYM grant_list opt_with_admin_option */
#line 17139 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_GRANT_ROLE;
/* The first role is the one that is granted */
if (unlikely(Lex->users_list.push_front((yyvsp[-3].lex_user), thd->mem_root)))
MYSQL_YYABORT;
}
#line 49377 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3404: /* opt_with_admin: %empty */
#line 17150 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->definer = 0; }
#line 49383 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3405: /* opt_with_admin: WITH ADMIN_SYM user_or_role */
#line 17151 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->definer = (yyvsp[0].lex_user); }
#line 49389 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3406: /* opt_with_admin_option: %empty */
#line 17155 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->with_admin_option= false; }
#line 49395 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3407: /* opt_with_admin_option: WITH ADMIN_SYM OPTION */
#line 17156 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->with_admin_option= true; }
#line 49401 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3408: /* role_list: grant_role */
#line 17161 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
MYSQL_YYABORT;
}
#line 49410 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3409: /* role_list: role_list ',' grant_role */
#line 17166 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
MYSQL_YYABORT;
}
#line 49419 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3410: /* current_role: CURRENT_ROLE optional_braces */
#line 17174 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.lex_user)=(LEX_USER*) thd->calloc(sizeof(LEX_USER)))))
MYSQL_YYABORT;
(yyval.lex_user)->user= current_role;
}
#line 49429 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3411: /* role_name: ident_or_text */
#line 17183 "/home/buildbot/git/sql/sql_yacc.yy"
{
CHARSET_INFO *cs= system_charset_info;
/* trim end spaces (as they'll be lost in mysql.user anyway) */
(yyvsp[0].lex_str).length= cs->lengthsp((yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
((char*) (yyvsp[0].lex_str).str)[(yyvsp[0].lex_str).length] = '\0';
if (unlikely((yyvsp[0].lex_str).length == 0))
my_yyabort_error((ER_INVALID_ROLE, MYF(0), ""));
if (unlikely(!((yyval.lex_user)=(LEX_USER*) thd->calloc(sizeof(LEX_USER)))))
MYSQL_YYABORT;
if (lex_string_eq(&(yyvsp[0].lex_str), &none))
(yyval.lex_user)->user= none;
else if (lex_string_eq(&(yyvsp[0].lex_str), &public_name))
(yyval.lex_user)->user= public_name;
else if (check_string_char_length(&((yyval.lex_user)->user= (yyvsp[0].lex_str)), ER_USERNAME,
username_char_length, cs, 0))
MYSQL_YYABORT;
(yyval.lex_user)->host= empty_clex_str;
}
#line 49452 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3417: /* grant_privileges: ALL opt_privileges */
#line 17213 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.lex_grant)= new (thd->mem_root) Lex_grant_privilege(GLOBAL_ACLS, true)))
MYSQL_YYABORT;
}
#line 49461 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3420: /* object_privilege_list: object_privilege */
#line 17226 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.lex_grant)= new (thd->mem_root) Lex_grant_privilege((yyvsp[0].privilege))))
MYSQL_YYABORT;
}
#line 49470 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3421: /* object_privilege_list: column_list_privilege */
#line 17231 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.lex_grant)= new (thd->mem_root) Lex_grant_privilege()) ||
(yyval.lex_grant)->add_column_list_privilege(thd, (yyvsp[0].column_list_privilege).m_columns[0],
(yyvsp[0].column_list_privilege).m_privilege))
MYSQL_YYABORT;
}
#line 49481 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3422: /* object_privilege_list: object_privilege_list ',' object_privilege */
#line 17238 "/home/buildbot/git/sql/sql_yacc.yy"
{
((yyval.lex_grant)= (yyvsp[-2].lex_grant))->add_object_privilege((yyvsp[0].privilege));
}
#line 49489 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3423: /* object_privilege_list: object_privilege_list ',' column_list_privilege */
#line 17242 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (((yyval.lex_grant)= (yyvsp[-2].lex_grant))->add_column_list_privilege(thd, (yyvsp[0].column_list_privilege).m_columns[0],
(yyvsp[0].column_list_privilege).m_privilege))
MYSQL_YYABORT;
}
#line 49499 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3424: /* column_list_privilege: column_privilege '(' comma_separated_ident_list ')' */
#line 17251 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.column_list_privilege)= Lex_column_list_privilege((yyvsp[-1].ident_sys_list), (yyvsp[-3].privilege));
}
#line 49507 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3425: /* column_privilege: SELECT_SYM */
#line 17257 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= SELECT_ACL; }
#line 49513 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3426: /* column_privilege: INSERT */
#line 17258 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= INSERT_ACL; }
#line 49519 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3427: /* column_privilege: UPDATE_SYM */
#line 17259 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= UPDATE_ACL; }
#line 49525 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3428: /* column_privilege: REFERENCES */
#line 17260 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= REFERENCES_ACL; }
#line 49531 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3429: /* object_privilege: SELECT_SYM */
#line 17264 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= SELECT_ACL; }
#line 49537 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3430: /* object_privilege: INSERT */
#line 17265 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= INSERT_ACL; }
#line 49543 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3431: /* object_privilege: UPDATE_SYM */
#line 17266 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= UPDATE_ACL; }
#line 49549 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3432: /* object_privilege: REFERENCES */
#line 17267 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= REFERENCES_ACL; }
#line 49555 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3433: /* object_privilege: DELETE_SYM */
#line 17268 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= DELETE_ACL;}
#line 49561 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3434: /* object_privilege: USAGE */
#line 17269 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= NO_ACL; }
#line 49567 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3435: /* object_privilege: INDEX_SYM */
#line 17270 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= INDEX_ACL;}
#line 49573 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3436: /* object_privilege: ALTER */
#line 17271 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= ALTER_ACL;}
#line 49579 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3437: /* object_privilege: CREATE */
#line 17272 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= CREATE_ACL;}
#line 49585 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3438: /* object_privilege: DROP */
#line 17273 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= DROP_ACL;}
#line 49591 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3439: /* object_privilege: EXECUTE_SYM */
#line 17274 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= EXECUTE_ACL;}
#line 49597 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3440: /* object_privilege: RELOAD */
#line 17275 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= RELOAD_ACL;}
#line 49603 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3441: /* object_privilege: SHUTDOWN */
#line 17276 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= SHUTDOWN_ACL;}
#line 49609 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3442: /* object_privilege: PROCESS */
#line 17277 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= PROCESS_ACL;}
#line 49615 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3443: /* object_privilege: FILE_SYM */
#line 17278 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= FILE_ACL;}
#line 49621 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3444: /* object_privilege: GRANT OPTION */
#line 17279 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= GRANT_ACL;}
#line 49627 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3445: /* object_privilege: SHOW DATABASES */
#line 17280 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= SHOW_DB_ACL;}
#line 49633 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3446: /* object_privilege: SUPER_SYM */
#line 17281 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= SUPER_ACL;}
#line 49639 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3447: /* object_privilege: CREATE TEMPORARY TABLES */
#line 17282 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= CREATE_TMP_ACL;}
#line 49645 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3448: /* object_privilege: LOCK_SYM TABLES */
#line 17283 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= LOCK_TABLES_ACL; }
#line 49651 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3449: /* object_privilege: REPLICATION SLAVE */
#line 17284 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= REPL_SLAVE_ACL; }
#line 49657 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3450: /* object_privilege: REPLICATION CLIENT_SYM */
#line 17285 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= BINLOG_MONITOR_ACL; /*Compatibility*/ }
#line 49663 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3451: /* object_privilege: CREATE VIEW_SYM */
#line 17286 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= CREATE_VIEW_ACL; }
#line 49669 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3452: /* object_privilege: SHOW VIEW_SYM */
#line 17287 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= SHOW_VIEW_ACL; }
#line 49675 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3453: /* object_privilege: CREATE ROUTINE_SYM */
#line 17288 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= CREATE_PROC_ACL; }
#line 49681 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3454: /* object_privilege: ALTER ROUTINE_SYM */
#line 17289 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= ALTER_PROC_ACL; }
#line 49687 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3455: /* object_privilege: CREATE USER_SYM */
#line 17290 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= CREATE_USER_ACL; }
#line 49693 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3456: /* object_privilege: EVENT_SYM */
#line 17291 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= EVENT_ACL;}
#line 49699 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3457: /* object_privilege: TRIGGER_SYM */
#line 17292 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= TRIGGER_ACL; }
#line 49705 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3458: /* object_privilege: CREATE TABLESPACE */
#line 17293 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= CREATE_TABLESPACE_ACL; }
#line 49711 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3459: /* object_privilege: DELETE_SYM HISTORY_SYM */
#line 17294 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= DELETE_HISTORY_ACL; }
#line 49717 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3460: /* object_privilege: SET USER_SYM */
#line 17295 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= SET_USER_ACL; }
#line 49723 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3461: /* object_privilege: FEDERATED_SYM ADMIN_SYM */
#line 17296 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= FEDERATED_ADMIN_ACL; }
#line 49729 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3462: /* object_privilege: CONNECTION_SYM ADMIN_SYM */
#line 17297 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= CONNECTION_ADMIN_ACL; }
#line 49735 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3463: /* object_privilege: READ_SYM ONLY_SYM ADMIN_SYM */
#line 17298 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= READ_ONLY_ADMIN_ACL; }
#line 49741 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3464: /* object_privilege: READ_ONLY_SYM ADMIN_SYM */
#line 17299 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= READ_ONLY_ADMIN_ACL; }
#line 49747 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3465: /* object_privilege: BINLOG_SYM MONITOR_SYM */
#line 17300 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= BINLOG_MONITOR_ACL; }
#line 49753 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3466: /* object_privilege: BINLOG_SYM ADMIN_SYM */
#line 17301 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= BINLOG_ADMIN_ACL; }
#line 49759 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3467: /* object_privilege: BINLOG_SYM REPLAY_SYM */
#line 17302 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= BINLOG_REPLAY_ACL; }
#line 49765 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3468: /* object_privilege: REPLICATION MASTER_SYM ADMIN_SYM */
#line 17303 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= REPL_MASTER_ADMIN_ACL; }
#line 49771 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3469: /* object_privilege: REPLICATION SLAVE ADMIN_SYM */
#line 17304 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= REPL_SLAVE_ADMIN_ACL; }
#line 49777 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3470: /* object_privilege: SLAVE MONITOR_SYM */
#line 17305 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= SLAVE_MONITOR_ACL; }
#line 49783 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3471: /* opt_and: %empty */
#line 17309 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 49789 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3472: /* opt_and: AND_SYM */
#line 17310 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 49795 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3475: /* require_list_element: SUBJECT_SYM TEXT_STRING */
#line 17320 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
if (lex->account_options.x509_subject.str)
my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "SUBJECT"));
lex->account_options.x509_subject= (yyvsp[0].lex_string_with_metadata);
}
#line 49806 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3476: /* require_list_element: ISSUER_SYM TEXT_STRING */
#line 17327 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
if (lex->account_options.x509_issuer.str)
my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "ISSUER"));
lex->account_options.x509_issuer= (yyvsp[0].lex_string_with_metadata);
}
#line 49817 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3477: /* require_list_element: CIPHER_SYM TEXT_STRING */
#line 17334 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
if (lex->account_options.ssl_cipher.str)
my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "CIPHER"));
lex->account_options.ssl_cipher= (yyvsp[0].lex_string_with_metadata);
}
#line 49828 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3478: /* grant_ident: '*' */
#line 17344 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX_CSTRING db;
if (unlikely(Lex->copy_db_to(&db)))
MYSQL_YYABORT;
if (!((yyval.lex_grant_ident)= new (thd->mem_root) Lex_grant_object_name(db,
Lex_grant_object_name::STAR)))
MYSQL_YYABORT;
}
#line 49841 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3479: /* grant_ident: ident '.' '*' */
#line 17353 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.lex_grant_ident)= new (thd->mem_root) Lex_grant_object_name((yyvsp[-2].ident_sys),
Lex_grant_object_name::IDENT_STAR)))
MYSQL_YYABORT;
}
#line 49851 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3480: /* grant_ident: '*' '.' '*' */
#line 17359 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.lex_grant_ident)= new (thd->mem_root) Lex_grant_object_name(
null_clex_str,
Lex_grant_object_name::STAR_STAR)))
MYSQL_YYABORT;
}
#line 49862 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3481: /* grant_ident: table_ident */
#line 17366 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.lex_grant_ident)= new (thd->mem_root) Lex_grant_object_name((yyvsp[0].table))))
MYSQL_YYABORT;
}
#line 49871 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3482: /* user_list: user */
#line 17374 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
MYSQL_YYABORT;
}
#line 49880 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3483: /* user_list: user_list ',' user */
#line 17379 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
MYSQL_YYABORT;
}
#line 49889 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3484: /* grant_list: grant_user */
#line 17387 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
MYSQL_YYABORT;
}
#line 49898 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3485: /* grant_list: grant_list ',' grant_user */
#line 17392 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
MYSQL_YYABORT;
}
#line 49907 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3486: /* user_and_role_list: user_or_role */
#line 17400 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
MYSQL_YYABORT;
}
#line 49916 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3487: /* user_and_role_list: user_and_role_list ',' user_or_role */
#line 17405 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
MYSQL_YYABORT;
}
#line 49925 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3492: /* grant_user: user IDENTIFIED_SYM BY TEXT_STRING */
#line 17416 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.lex_user)= (yyvsp[-3].lex_user);
(yyvsp[-3].lex_user)->auth= new (thd->mem_root) USER_AUTH();
(yyvsp[-3].lex_user)->auth->pwtext= (yyvsp[0].lex_string_with_metadata);
}
#line 49935 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3493: /* grant_user: user IDENTIFIED_SYM BY PASSWORD_SYM TEXT_STRING */
#line 17422 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.lex_user)= (yyvsp[-4].lex_user);
(yyvsp[-4].lex_user)->auth= new (thd->mem_root) USER_AUTH();
(yyvsp[-4].lex_user)->auth->auth_str= (yyvsp[0].lex_string_with_metadata);
}
#line 49945 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3494: /* grant_user: user IDENTIFIED_SYM via_or_with auth_expression */
#line 17428 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.lex_user)= (yyvsp[-3].lex_user);
(yyvsp[-3].lex_user)->auth= (yyvsp[0].user_auth);
}
#line 49954 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3495: /* grant_user: user_or_role */
#line 17433 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.lex_user)= (yyvsp[0].lex_user);
}
#line 49962 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3496: /* auth_expression: auth_token OR_SYM auth_expression */
#line 17440 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.user_auth)= (yyvsp[-2].user_auth);
DBUG_ASSERT((yyval.user_auth)->next == NULL);
(yyval.user_auth)->next= (yyvsp[0].user_auth);
}
#line 49972 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3497: /* auth_expression: auth_token */
#line 17446 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.user_auth)= (yyvsp[0].user_auth);
}
#line 49980 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3498: /* auth_token: ident_or_text opt_auth_str */
#line 17453 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.user_auth)= (yyvsp[0].user_auth);
(yyval.user_auth)->plugin= (yyvsp[-1].lex_str);
}
#line 49989 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3499: /* opt_auth_str: %empty */
#line 17461 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.user_auth)=(USER_AUTH*) thd->calloc(sizeof(USER_AUTH))))
MYSQL_YYABORT;
}
#line 49998 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3500: /* opt_auth_str: using_or_as TEXT_STRING_sys */
#line 17466 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.user_auth)=(USER_AUTH*) thd->calloc(sizeof(USER_AUTH))))
MYSQL_YYABORT;
(yyval.user_auth)->auth_str= (yyvsp[0].lex_str);
}
#line 50008 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3501: /* opt_auth_str: using_or_as PASSWORD_SYM '(' TEXT_STRING ')' */
#line 17472 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.user_auth)=(USER_AUTH*) thd->calloc(sizeof(USER_AUTH))))
MYSQL_YYABORT;
(yyval.user_auth)->pwtext= (yyvsp[-1].lex_string_with_metadata);
}
#line 50018 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3503: /* opt_require_clause: REQUIRE_SYM require_list */
#line 17482 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->account_options.ssl_type= SSL_TYPE_SPECIFIED;
}
#line 50026 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3504: /* opt_require_clause: REQUIRE_SYM SSL_SYM */
#line 17486 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->account_options.ssl_type= SSL_TYPE_ANY;
}
#line 50034 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3505: /* opt_require_clause: REQUIRE_SYM X509_SYM */
#line 17490 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->account_options.ssl_type= SSL_TYPE_X509;
}
#line 50042 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3506: /* opt_require_clause: REQUIRE_SYM NONE_SYM */
#line 17494 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->account_options.ssl_type= SSL_TYPE_NONE;
}
#line 50050 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3507: /* resource_option: MAX_QUERIES_PER_HOUR ulong_num */
#line 17501 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->account_options.questions=(yyvsp[0].ulong_num);
Lex->account_options.specified_limits|= USER_RESOURCES::QUERIES_PER_HOUR;
}
#line 50059 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3508: /* resource_option: MAX_UPDATES_PER_HOUR ulong_num */
#line 17506 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->account_options.updates=(yyvsp[0].ulong_num);
Lex->account_options.specified_limits|= USER_RESOURCES::UPDATES_PER_HOUR;
}
#line 50068 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3509: /* resource_option: MAX_CONNECTIONS_PER_HOUR ulong_num */
#line 17511 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->account_options.conn_per_hour= (yyvsp[0].ulong_num);
Lex->account_options.specified_limits|= USER_RESOURCES::CONNECTIONS_PER_HOUR;
}
#line 50077 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3510: /* resource_option: MAX_USER_CONNECTIONS_SYM int_num */
#line 17516 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->account_options.user_conn= (yyvsp[0].num);
Lex->account_options.specified_limits|= USER_RESOURCES::USER_CONNECTIONS;
}
#line 50086 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3511: /* resource_option: MAX_STATEMENT_TIME_SYM NUM_literal */
#line 17521 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->account_options.max_statement_time= (yyvsp[0].item_num)->val_real();
Lex->account_options.specified_limits|= USER_RESOURCES::MAX_STATEMENT_TIME;
}
#line 50095 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3512: /* resource_option_list: resource_option_list resource_option */
#line 17528 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 50101 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3513: /* resource_option_list: resource_option */
#line 17529 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 50107 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3514: /* opt_resource_options: %empty */
#line 17533 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 50113 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3516: /* opt_grant_options: %empty */
#line 17539 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= NO_ACL; }
#line 50119 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3517: /* opt_grant_options: WITH grant_option_list */
#line 17540 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= (yyvsp[0].privilege); }
#line 50125 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3518: /* opt_grant_option: %empty */
#line 17544 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= NO_ACL; }
#line 50131 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3519: /* opt_grant_option: WITH GRANT OPTION */
#line 17545 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= GRANT_ACL; }
#line 50137 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3520: /* grant_option_list: grant_option_list grant_option */
#line 17549 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= (yyvsp[-1].privilege) | (yyvsp[0].privilege); }
#line 50143 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3522: /* grant_option: GRANT OPTION */
#line 17554 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= GRANT_ACL;}
#line 50149 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3523: /* grant_option: resource_option */
#line 17555 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= NO_ACL; }
#line 50155 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3524: /* $@247: %empty */
#line 17560 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command = SQLCOM_BEGIN;
lex->start_transaction_opt= 0;
}
#line 50165 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3525: /* begin_stmt_mariadb: BEGIN_MARIADB_SYM $@247 opt_work */
#line 17565 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 50171 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3526: /* compound_statement: sp_proc_stmt_compound_ok */
#line 17570 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command= SQLCOM_COMPOUND;
if (Lex->sp_body_finalize_procedure(thd))
MYSQL_YYABORT;
}
#line 50181 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3527: /* opt_not: %empty */
#line 17578 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 50187 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3528: /* opt_not: not */
#line 17579 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 50193 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3529: /* opt_work: %empty */
#line 17583 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 50199 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3530: /* opt_work: WORK_SYM */
#line 17584 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 50205 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3531: /* opt_chain: %empty */
#line 17589 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_yes_no_unk)= TVL_UNKNOWN; }
#line 50211 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3532: /* opt_chain: AND_SYM NO_SYM CHAIN_SYM */
#line 17590 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_yes_no_unk)= TVL_NO; }
#line 50217 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3533: /* opt_chain: AND_SYM CHAIN_SYM */
#line 17591 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_yes_no_unk)= TVL_YES; }
#line 50223 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3534: /* opt_release: %empty */
#line 17596 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_yes_no_unk)= TVL_UNKNOWN; }
#line 50229 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3535: /* opt_release: RELEASE_SYM */
#line 17597 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_yes_no_unk)= TVL_YES; }
#line 50235 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3536: /* opt_release: NO_SYM RELEASE_SYM */
#line 17598 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_yes_no_unk)= TVL_NO; }
#line 50241 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3537: /* commit: COMMIT_SYM opt_work opt_chain opt_release */
#line 17603 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_COMMIT;
/* Don't allow AND CHAIN RELEASE. */
MYSQL_YYABORT_UNLESS((yyvsp[-1].m_yes_no_unk) != TVL_YES || (yyvsp[0].m_yes_no_unk) != TVL_YES);
lex->tx_chain= (yyvsp[-1].m_yes_no_unk);
lex->tx_release= (yyvsp[0].m_yes_no_unk);
}
#line 50254 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3538: /* rollback: ROLLBACK_SYM opt_work opt_chain opt_release */
#line 17615 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_ROLLBACK;
/* Don't allow AND CHAIN RELEASE. */
MYSQL_YYABORT_UNLESS((yyvsp[-1].m_yes_no_unk) != TVL_YES || (yyvsp[0].m_yes_no_unk) != TVL_YES);
lex->tx_chain= (yyvsp[-1].m_yes_no_unk);
lex->tx_release= (yyvsp[0].m_yes_no_unk);
}
#line 50267 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3539: /* rollback: ROLLBACK_SYM opt_work TO_SYM SAVEPOINT_SYM ident */
#line 17624 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_ROLLBACK_TO_SAVEPOINT;
lex->ident= (yyvsp[0].ident_sys);
}
#line 50277 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3540: /* rollback: ROLLBACK_SYM opt_work TO_SYM ident */
#line 17630 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_ROLLBACK_TO_SAVEPOINT;
lex->ident= (yyvsp[0].ident_sys);
}
#line 50287 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3541: /* savepoint: SAVEPOINT_SYM ident */
#line 17639 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_SAVEPOINT;
lex->ident= (yyvsp[0].ident_sys);
}
#line 50297 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3542: /* release: RELEASE_SYM SAVEPOINT_SYM ident */
#line 17648 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_RELEASE_SAVEPOINT;
lex->ident= (yyvsp[0].ident_sys);
}
#line 50307 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3543: /* unit_type_decl: UNION_SYM union_option */
#line 17661 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.unit_operation).unit_type= UNION_TYPE; (yyval.unit_operation).distinct= (yyvsp[0].num); }
#line 50313 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3544: /* unit_type_decl: INTERSECT_SYM union_option */
#line 17663 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.unit_operation).unit_type= INTERSECT_TYPE; (yyval.unit_operation).distinct= (yyvsp[0].num); }
#line 50319 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3545: /* unit_type_decl: EXCEPT_SYM union_option */
#line 17665 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.unit_operation).unit_type= EXCEPT_TYPE; (yyval.unit_operation).distinct= (yyvsp[0].num); }
#line 50325 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3546: /* union_option: %empty */
#line 17672 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)=1; }
#line 50331 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3547: /* union_option: DISTINCT */
#line 17673 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)=1; }
#line 50337 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3548: /* union_option: ALL */
#line 17674 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)=0; }
#line 50343 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3549: /* query_expression_option: STRAIGHT_JOIN */
#line 17678 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->options|= SELECT_STRAIGHT_JOIN; }
#line 50349 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3550: /* query_expression_option: HIGH_PRIORITY */
#line 17680 "/home/buildbot/git/sql/sql_yacc.yy"
{
YYPS->m_lock_type= TL_READ_HIGH_PRIORITY;
YYPS->m_mdl_type= MDL_SHARED_READ;
Select->options|= SELECT_HIGH_PRIORITY;
}
#line 50359 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3551: /* query_expression_option: DISTINCT */
#line 17685 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->options|= SELECT_DISTINCT; }
#line 50365 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3552: /* query_expression_option: UNIQUE_SYM */
#line 17686 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->options|= SELECT_DISTINCT; }
#line 50371 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3553: /* query_expression_option: SQL_SMALL_RESULT */
#line 17687 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->options|= SELECT_SMALL_RESULT; }
#line 50377 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3554: /* query_expression_option: SQL_BIG_RESULT */
#line 17688 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->options|= SELECT_BIG_RESULT; }
#line 50383 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3555: /* query_expression_option: SQL_BUFFER_RESULT */
#line 17689 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->options|= OPTION_BUFFER_RESULT; }
#line 50389 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3556: /* query_expression_option: SQL_CALC_FOUND_ROWS */
#line 17690 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->options|= OPTION_FOUND_ROWS; }
#line 50395 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3557: /* query_expression_option: ALL */
#line 17691 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->options|= SELECT_ALL; }
#line 50401 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3560: /* no_definer: %empty */
#line 17707 "/home/buildbot/git/sql/sql_yacc.yy"
{
/*
We have to distinguish missing DEFINER-clause from case when
CURRENT_USER specified as definer explicitly in order to properly
handle CREATE TRIGGER statements which come to replication thread
from older master servers (i.e. to create non-suid trigger in this
case).
*/
thd->lex->definer= 0;
}
#line 50416 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3561: /* definer: DEFINER_SYM '=' user_or_role */
#line 17721 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->definer= (yyvsp[0].lex_user);
Lex->account_options.reset();
}
#line 50425 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3562: /* view_algorithm: ALGORITHM_SYM '=' UNDEFINED_SYM */
#line 17734 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= DTYPE_ALGORITHM_UNDEFINED; }
#line 50431 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3563: /* view_algorithm: ALGORITHM_SYM '=' MERGE_SYM */
#line 17735 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= VIEW_ALGORITHM_MERGE; }
#line 50437 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3564: /* view_algorithm: ALGORITHM_SYM '=' TEMPTABLE_SYM */
#line 17736 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= VIEW_ALGORITHM_TMPTABLE; }
#line 50443 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3565: /* opt_view_suid: %empty */
#line 17740 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.view_suid)= VIEW_SUID_DEFAULT; }
#line 50449 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3566: /* opt_view_suid: view_suid */
#line 17741 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.view_suid)= (yyvsp[0].view_suid); }
#line 50455 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3567: /* view_suid: SQL_SYM SECURITY_SYM DEFINER_SYM */
#line 17745 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.view_suid)= VIEW_SUID_DEFINER; }
#line 50461 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3568: /* view_suid: SQL_SYM SECURITY_SYM INVOKER_SYM */
#line 17746 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.view_suid)= VIEW_SUID_INVOKER; }
#line 50467 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3569: /* view_list_opt: %empty */
#line 17751 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 50473 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3570: /* view_list_opt: '(' view_list ')' */
#line 17752 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 50479 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3571: /* view_list: ident */
#line 17757 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->view_list.push_back((LEX_CSTRING*)
thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_CSTRING)),
thd->mem_root);
}
#line 50489 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3572: /* view_list: view_list ',' ident */
#line 17763 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->view_list.push_back((LEX_CSTRING*)
thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_CSTRING)),
thd->mem_root);
}
#line 50499 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3573: /* $@248: %empty */
#line 17771 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->parsing_options.allows_variable= FALSE;
lex->create_view->select.str= (char *) YYLIP->get_cpp_ptr();
}
#line 50509 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3574: /* view_select: $@248 query_expression view_check_option */
#line 17778 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->parsed_create_view((yyvsp[-1].select_lex_unit), (yyvsp[0].num)))
MYSQL_YYABORT;
}
#line 50518 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3575: /* view_check_option: %empty */
#line 17785 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= VIEW_CHECK_NONE; }
#line 50524 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3576: /* view_check_option: WITH CHECK_SYM OPTION */
#line 17786 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= VIEW_CHECK_CASCADED; }
#line 50530 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3577: /* view_check_option: WITH CASCADED CHECK_SYM OPTION */
#line 17787 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= VIEW_CHECK_CASCADED; }
#line 50536 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3578: /* view_check_option: WITH LOCAL_SYM CHECK_SYM OPTION */
#line 17788 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= VIEW_CHECK_LOCAL; }
#line 50542 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3579: /* trigger_action_order: FOLLOWS_SYM */
#line 17799 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.trigger_action_order_type)= TRG_ORDER_FOLLOWS; }
#line 50548 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3580: /* trigger_action_order: PRECEDES_SYM */
#line 17801 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.trigger_action_order_type)= TRG_ORDER_PRECEDES; }
#line 50554 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3581: /* trigger_follows_precedes_clause: %empty */
#line 17806 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.trg_execution_order).ordering_clause= TRG_ORDER_NONE;
(yyval.trg_execution_order).anchor_trigger_name.str= NULL;
(yyval.trg_execution_order).anchor_trigger_name.length= 0;
}
#line 50564 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3582: /* trigger_follows_precedes_clause: trigger_action_order ident_or_text */
#line 17813 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.trg_execution_order).ordering_clause= (yyvsp[-1].trigger_action_order_type);
(yyval.trg_execution_order).anchor_trigger_name= (yyvsp[0].lex_str);
}
#line 50573 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3583: /* $@249: %empty */
#line 17822 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->add_create_options_with_check((yyvsp[0].object_ddl_options))))
MYSQL_YYABORT;
}
#line 50582 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3584: /* $@250: %empty */
#line 17831 "/home/buildbot/git/sql/sql_yacc.yy"
{ /* $9 */
Lex->raw_trg_on_table_name_begin= YYLIP->get_tok_start();
}
#line 50590 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3585: /* $@251: %empty */
#line 17837 "/home/buildbot/git/sql/sql_yacc.yy"
{ /* $13 */
Lex->raw_trg_on_table_name_end= YYLIP->get_tok_start();
}
#line 50598 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3586: /* $@252: %empty */
#line 17842 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->trg_chistics.ordering_clause_begin= YYLIP->get_cpp_ptr();
}
#line 50606 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3587: /* $@253: %empty */
#line 17846 "/home/buildbot/git/sql/sql_yacc.yy"
{ /* $18 */
LEX *lex= thd->lex;
Lex_input_stream *lip= YYLIP;
if (unlikely(lex->sphead))
my_yyabort_error((ER_SP_NO_RECURSIVE_CREATE, MYF(0), "TRIGGER"));
lex->stmt_definition_begin= (yyvsp[-16].simple_string);
lex->ident.str= (yyvsp[-9].simple_string);
lex->ident.length= (yyvsp[-5].simple_string) - (yyvsp[-9].simple_string);
lex->spname= (yyvsp[-13].spname);
(*static_cast(&lex->trg_chistics))= ((yyvsp[0].trg_execution_order));
lex->trg_chistics.ordering_clause_end= lip->get_cpp_ptr();
if (unlikely(!lex->make_sp_head(thd, (yyvsp[-13].spname), &sp_handler_trigger,
DEFAULT_AGGREGATE)))
MYSQL_YYABORT;
lex->sphead->set_body_start(thd, lip->get_cpp_tok_start());
}
#line 50631 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3588: /* trigger_tail: remember_name opt_if_not_exists $@249 sp_name trg_action_time trg_event ON remember_name $@250 table_ident FOR_SYM remember_name $@251 EACH_SYM ROW_SYM $@252 trigger_follows_precedes_clause $@253 sp_proc_stmt force_lookahead */
#line 17867 "/home/buildbot/git/sql/sql_yacc.yy"
{ /* $21 */
LEX *lex= Lex;
lex->sql_command= SQLCOM_CREATE_TRIGGER;
if (lex->sp_body_finalize_trigger(thd))
MYSQL_YYABORT;
/*
We have to do it after parsing trigger body, because some of
sp_proc_stmt alternatives are not saving/restoring LEX, so
lex->query_tables can be wiped out.
*/
if (!lex->first_select_lex()->
add_table_to_list(thd, (yyvsp[-10].table), (LEX_CSTRING*) 0,
TL_OPTION_UPDATING, TL_READ_NO_INSERT,
MDL_SHARED_NO_WRITE))
MYSQL_YYABORT;
}
#line 50654 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3589: /* $@254: %empty */
#line 17895 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->init_last_field(&lex->sphead->m_return_field_def,
&empty_clex_str);
}
#line 50664 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3590: /* sf_return_type: $@254 field_type */
#line 17901 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sf_return_fill_definition((yyvsp[0].Lex_field_type))))
MYSQL_YYABORT;
}
#line 50673 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3591: /* xa: XA_SYM begin_or_start xid opt_join_or_resume */
#line 17911 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_XA_START;
}
#line 50681 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3592: /* xa: XA_SYM END xid opt_suspend */
#line 17915 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_XA_END;
}
#line 50689 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3593: /* xa: XA_SYM PREPARE_SYM xid */
#line 17919 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_XA_PREPARE;
}
#line 50697 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3594: /* xa: XA_SYM COMMIT_SYM xid opt_one_phase */
#line 17923 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_XA_COMMIT;
}
#line 50705 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3595: /* xa: XA_SYM ROLLBACK_SYM xid */
#line 17927 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_XA_ROLLBACK;
}
#line 50713 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3596: /* xa: XA_SYM RECOVER_SYM opt_format_xid */
#line 17931 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_XA_RECOVER;
Lex->verbose= (yyvsp[0].num);
}
#line 50722 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3597: /* opt_format_xid: %empty */
#line 17938 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= false; }
#line 50728 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3598: /* opt_format_xid: FORMAT_SYM '=' ident_or_text */
#line 17940 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (lex_string_eq(&(yyvsp[0].lex_str), STRING_WITH_LEN("SQL")))
(yyval.num)= true;
else if (lex_string_eq(&(yyvsp[0].lex_str), STRING_WITH_LEN("RAW")))
(yyval.num)= false;
else
{
my_yyabort_error((ER_UNKNOWN_EXPLAIN_FORMAT, MYF(0),
"XA RECOVER", (yyvsp[0].lex_str).str));
(yyval.num)= false;
}
}
#line 50745 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3599: /* xid: text_string */
#line 17956 "/home/buildbot/git/sql/sql_yacc.yy"
{
MYSQL_YYABORT_UNLESS((yyvsp[0].string)->length() <= MAXGTRIDSIZE);
if (unlikely(!(Lex->xid=(XID *)thd->alloc(sizeof(XID)))))
MYSQL_YYABORT;
Lex->xid->set(1L, (yyvsp[0].string)->ptr(), (yyvsp[0].string)->length(), 0, 0);
}
#line 50756 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3600: /* xid: text_string ',' text_string */
#line 17963 "/home/buildbot/git/sql/sql_yacc.yy"
{
MYSQL_YYABORT_UNLESS((yyvsp[-2].string)->length() <= MAXGTRIDSIZE && (yyvsp[0].string)->length() <= MAXBQUALSIZE);
if (unlikely(!(Lex->xid=(XID *)thd->alloc(sizeof(XID)))))
MYSQL_YYABORT;
Lex->xid->set(1L, (yyvsp[-2].string)->ptr(), (yyvsp[-2].string)->length(), (yyvsp[0].string)->ptr(), (yyvsp[0].string)->length());
}
#line 50767 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3601: /* xid: text_string ',' text_string ',' ulong_num */
#line 17970 "/home/buildbot/git/sql/sql_yacc.yy"
{
MYSQL_YYABORT_UNLESS((yyvsp[-4].string)->length() <= MAXGTRIDSIZE &&
(yyvsp[-2].string)->length() <= MAXBQUALSIZE &&
(yyvsp[0].ulong_num) <= static_cast(
std::numeric_limits::max()));
if (unlikely(!(Lex->xid=(XID *)thd->alloc(sizeof(XID)))))
MYSQL_YYABORT;
Lex->xid->set((yyvsp[0].ulong_num), (yyvsp[-4].string)->ptr(), (yyvsp[-4].string)->length(), (yyvsp[-2].string)->ptr(), (yyvsp[-2].string)->length());
}
#line 50781 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3602: /* begin_or_start: BEGIN_MARIADB_SYM */
#line 17982 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 50787 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3603: /* begin_or_start: BEGIN_ORACLE_SYM */
#line 17983 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 50793 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3604: /* begin_or_start: START_SYM */
#line 17984 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 50799 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3605: /* opt_join_or_resume: %empty */
#line 17988 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->xa_opt=XA_NONE; }
#line 50805 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3606: /* opt_join_or_resume: JOIN_SYM */
#line 17989 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->xa_opt=XA_JOIN; }
#line 50811 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3607: /* opt_join_or_resume: RESUME_SYM */
#line 17990 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->xa_opt=XA_RESUME; }
#line 50817 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3608: /* opt_one_phase: %empty */
#line 17994 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->xa_opt=XA_NONE; }
#line 50823 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3609: /* opt_one_phase: ONE_SYM PHASE_SYM */
#line 17995 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->xa_opt=XA_ONE_PHASE; }
#line 50829 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3610: /* opt_suspend: %empty */
#line 18000 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->xa_opt=XA_NONE; }
#line 50835 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3611: /* $@255: %empty */
#line 18002 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->xa_opt=XA_SUSPEND; }
#line 50841 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3613: /* opt_migrate: %empty */
#line 18007 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 50847 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3614: /* opt_migrate: FOR_SYM MIGRATE_SYM */
#line 18008 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->xa_opt=XA_FOR_MIGRATE; }
#line 50853 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3615: /* install: INSTALL_SYM PLUGIN_SYM opt_if_not_exists ident SONAME_SYM TEXT_STRING_sys */
#line 18013 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_install_plugin((yyvsp[-3].object_ddl_options), (yyvsp[-2].ident_sys), (yyvsp[0].lex_str)))
MYSQL_YYABORT;
}
#line 50862 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3616: /* install: INSTALL_SYM SONAME_SYM TEXT_STRING_sys */
#line 18018 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->stmt_install_plugin((yyvsp[0].lex_str));
}
#line 50870 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3617: /* uninstall: UNINSTALL_SYM PLUGIN_SYM opt_if_exists ident */
#line 18025 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_uninstall_plugin_by_name((yyvsp[-1].object_ddl_options), (yyvsp[0].ident_sys)))
MYSQL_YYABORT;
}
#line 50879 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3618: /* uninstall: UNINSTALL_SYM SONAME_SYM opt_if_exists TEXT_STRING_sys */
#line 18030 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_uninstall_plugin_by_soname((yyvsp[-1].object_ddl_options), (yyvsp[0].lex_str)))
MYSQL_YYABORT;
}
#line 50888 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3619: /* keep_gcc_happy: IMPOSSIBLE_ACTION */
#line 18039 "/home/buildbot/git/sql/sql_yacc.yy"
{
YYERROR;
}
#line 50896 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3624: /* $@256: %empty */
#line 18480 "/home/buildbot/git/sql/sql_yacc.yy"
{
// Direct procedure call (without the CALL keyword)
Lex_ident_sys tmp(thd, &(yyvsp[0].ident_cli));
if (unlikely(!tmp.str) ||
unlikely(Lex->call_statement_start(thd, &tmp)))
MYSQL_YYABORT;
}
#line 50908 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3625: /* sp_statement: ident_cli_directly_assignable $@256 opt_sp_cparam_list */
#line 18488 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->check_cte_dependencies_and_resolve_references())
MYSQL_YYABORT;
}
#line 50917 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3626: /* $@257: %empty */
#line 18493 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex_ident_sys tmp(thd, &(yyvsp[-2].ident_cli));
if (unlikely(!tmp.str) ||
unlikely(Lex->call_statement_start(thd, &tmp, &(yyvsp[0].ident_sys))))
MYSQL_YYABORT;
}
#line 50928 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3627: /* sp_statement: ident_cli_directly_assignable '.' ident $@257 opt_sp_cparam_list */
#line 18500 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->check_cte_dependencies_and_resolve_references())
MYSQL_YYABORT;
}
#line 50937 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3628: /* $@258: %empty */
#line 18505 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex_ident_sys tmp(thd, &(yyvsp[-4].ident_cli));
if (unlikely(Lex->call_statement_start(thd, &tmp, &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys))))
MYSQL_YYABORT;
}
#line 50947 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3629: /* sp_statement: ident_cli_directly_assignable '.' ident '.' ident $@258 opt_sp_cparam_list */
#line 18511 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->check_cte_dependencies_and_resolve_references())
MYSQL_YYABORT;
}
#line 50956 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3630: /* sp_if_then_statements: sp_proc_stmts1_implicit_block */
#line 18518 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 50962 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3631: /* sp_case_then_statements: sp_proc_stmts1_implicit_block */
#line 18522 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 50968 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3655: /* row_field_name: ident_directly_assignable */
#line 18572 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.spvar_definition)= Lex->row_field_name(thd, (yyvsp[0].ident_sys))))
MYSQL_YYABORT;
}
#line 50977 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3656: /* $@259: %empty */
#line 18580 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyvsp[-1].expr_lex)->sp_while_loop_expression(thd)))
MYSQL_YYABORT;
}
#line 50986 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3657: /* while_body: expr_lex LOOP_SYM $@259 sp_proc_stmts1 END LOOP_SYM */
#line 18585 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_while_loop_finalize(thd)))
MYSQL_YYABORT;
}
#line 50995 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3658: /* for_loop_statements: LOOP_SYM sp_proc_stmts1 END LOOP_SYM */
#line 18593 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 51001 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3660: /* sp_block_label: labels_declaration_oracle */
#line 18603 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->spcont->block_label_declare(&(yyvsp[0].lex_str))))
MYSQL_YYABORT;
(yyval.lex_str)= (yyvsp[0].lex_str);
}
#line 51011 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3661: /* remember_end_opt: %empty */
#line 18612 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (yychar == YYEMPTY)
(yyval.simple_string)= (char*) YYLIP->get_cpp_ptr_rtrim();
else
(yyval.simple_string)= (char*) YYLIP->get_cpp_tok_end_rtrim();
}
#line 51022 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3662: /* sp_opt_default: _empty */
#line 18621 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item) = NULL; }
#line 51028 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3663: /* sp_opt_default: DEFAULT expr */
#line 18622 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item) = (yyvsp[0].item); }
#line 51034 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3664: /* sp_opt_default: SET_VAR expr */
#line 18623 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item) = (yyvsp[0].item); }
#line 51040 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3665: /* sp_opt_inout: _empty */
#line 18627 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.spvar_mode)= sp_variable::MODE_IN; }
#line 51046 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3667: /* sp_opt_inout: IN_SYM OUT_SYM */
#line 18629 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.spvar_mode)= sp_variable::MODE_INOUT; }
#line 51052 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3668: /* $@260: %empty */
#line 18633 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sp_block_init(thd);
}
#line 51060 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3669: /* sp_proc_stmts1_implicit_block: $@260 sp_proc_stmts1 */
#line 18637 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_block_finalize(thd)))
MYSQL_YYABORT;
}
#line 51069 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3670: /* remember_lex: %empty */
#line 18645 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.lex)= thd->lex;
}
#line 51077 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3680: /* ident_directly_assignable: keyword_directly_assignable */
#line 18664 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyval.ident_sys).copy_keyword(thd, &(yyvsp[0].kwd))))
MYSQL_YYABORT;
}
#line 51086 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3682: /* ident_cli_directly_assignable: keyword_directly_assignable */
#line 18672 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ident_cli)= (yyvsp[0].kwd); }
#line 51092 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3683: /* $@261: %empty */
#line 18678 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->set_stmt_init();
if (sp_create_assignment_lex(thd, (yyvsp[-1].ident_cli).pos()))
MYSQL_YYABORT;
}
#line 51103 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3684: /* set_assign: ident_cli_directly_assignable SET_VAR $@261 set_expr_or_default */
#line 18685 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex_ident_sys tmp(thd, &(yyvsp[-3].ident_cli));
if (unlikely(!tmp.str) ||
unlikely(Lex->set_variable(&tmp, (yyvsp[0].item))) ||
unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY,
false)))
MYSQL_YYABORT;
}
#line 51116 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3685: /* $@262: %empty */
#line 18694 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->set_stmt_init();
if (sp_create_assignment_lex(thd, (yyvsp[-3].ident_cli).pos()))
MYSQL_YYABORT;
}
#line 51127 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3686: /* set_assign: ident_cli_directly_assignable '.' ident SET_VAR $@262 set_expr_or_default */
#line 18701 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
DBUG_ASSERT(lex->var_list.is_empty());
Lex_ident_sys tmp(thd, &(yyvsp[-5].ident_cli));
if (unlikely(!tmp.str) ||
unlikely(lex->set_variable(&tmp, &(yyvsp[-3].ident_sys), (yyvsp[0].item))) ||
unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY,
false)))
MYSQL_YYABORT;
}
#line 51142 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3687: /* $@263: %empty */
#line 18712 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (unlikely(!lex->is_trigger_new_or_old_reference(&(yyvsp[-3].ident_sys))))
{
thd->parse_error(ER_SYNTAX_ERROR, (yyvsp[-4].kwd).pos());
MYSQL_YYABORT;
}
lex->set_stmt_init();
if (sp_create_assignment_lex(thd, (yyvsp[-4].kwd).pos()))
MYSQL_YYABORT;
}
#line 51158 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3688: /* set_assign: COLON_ORACLE_SYM ident '.' ident SET_VAR $@263 set_expr_or_default */
#line 18724 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX_CSTRING tmp= { (yyvsp[-5].ident_sys).str, (yyvsp[-5].ident_sys).length };
if (unlikely(Lex->set_trigger_field(&tmp, &(yyvsp[-3].ident_sys), (yyvsp[0].item))) ||
unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY,
false)))
MYSQL_YYABORT;
}
#line 51170 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3689: /* labels_declaration_oracle: label_declaration_oracle */
#line 18735 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= (yyvsp[0].lex_str); }
#line 51176 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3690: /* labels_declaration_oracle: labels_declaration_oracle label_declaration_oracle */
#line 18736 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= (yyvsp[0].lex_str); }
#line 51182 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3691: /* label_declaration_oracle: SHIFT_LEFT label_ident SHIFT_RIGHT */
#line 18741 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_push_goto_label(thd, &(yyvsp[-1].ident_sys))))
MYSQL_YYABORT;
(yyval.lex_str)= (yyvsp[-1].ident_sys);
}
#line 51192 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3692: /* opt_exception_clause: _empty */
#line 18749 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 51198 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3693: /* opt_exception_clause: EXCEPTION_ORACLE_SYM exception_handlers */
#line 18750 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= (yyvsp[0].num); }
#line 51204 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3694: /* exception_handlers: exception_handler */
#line 18754 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 51210 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3695: /* exception_handlers: exception_handlers exception_handler */
#line 18755 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= (yyvsp[-1].num) + 1; }
#line 51216 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3696: /* $@264: %empty */
#line 18760 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_handler_declaration_init(thd, sp_handler::EXIT)))
MYSQL_YYABORT;
}
#line 51225 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3697: /* exception_handler: WHEN_SYM $@264 sp_hcond_list THEN_SYM sp_proc_stmts1_implicit_block */
#line 18767 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_handler_declaration_finalize(thd, sp_handler::EXIT)))
MYSQL_YYABORT;
}
#line 51234 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3698: /* sp_no_param: _empty */
#line 18775 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sphead->m_param_begin= Lex->sphead->m_param_end=
YYLIP->get_cpp_tok_start() + 1;
}
#line 51243 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3703: /* opt_sp_name: _empty */
#line 18793 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.spname)= NULL; }
#line 51249 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3704: /* opt_sp_name: sp_name */
#line 18794 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.spname)= (yyvsp[0].spname); }
#line 51255 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3705: /* opt_package_routine_end_name: _empty */
#line 18799 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= null_clex_str; }
#line 51261 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3706: /* opt_package_routine_end_name: ident */
#line 18800 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= (yyvsp[0].ident_sys); }
#line 51267 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3709: /* sp_instr_addr: %empty */
#line 18809 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.sp_instr_addr)= Lex->sphead->instructions(); }
#line 51273 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3710: /* $@265: %empty */
#line 18813 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sp_block_init(thd);
}
#line 51281 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3711: /* $@266: %empty */
#line 18817 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_block_with_exceptions_finalize_declarations(thd)))
MYSQL_YYABORT;
}
#line 51290 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3712: /* $@267: %empty */
#line 18823 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[-3].spblock).hndlrs+= (yyvsp[0].spblock_handlers).hndlrs;
if (unlikely(Lex->sp_block_finalize(thd, (yyvsp[-3].spblock))))
MYSQL_YYABORT;
}
#line 51300 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3714: /* create_package_chistic: COMMENT_SYM TEXT_STRING_sys */
#line 18833 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->sp_chistics.comment= (yyvsp[0].lex_str); }
#line 51306 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3715: /* create_package_chistic: sp_suid */
#line 18835 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->sp_chistics.suid= (yyvsp[0].sp_suid); }
#line 51312 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3716: /* create_package_chistics: create_package_chistic */
#line 18839 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 51318 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3717: /* create_package_chistics: create_package_chistics create_package_chistic */
#line 18840 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 51324 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3719: /* opt_create_package_chistics: create_package_chistics */
#line 18845 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 51330 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3720: /* $@268: %empty */
#line 18849 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->sp_chistics.init(); }
#line 51336 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3722: /* package_implementation_executable_section: END */
#line 18856 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_block_with_exceptions_add_empty(thd)))
MYSQL_YYABORT;
(yyval.spblock_handlers).init(0);
}
#line 51346 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3723: /* package_implementation_executable_section: BEGIN_ORACLE_SYM sp_block_statements_and_exceptions END */
#line 18861 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.spblock_handlers)= (yyvsp[-1].spblock_handlers); }
#line 51352 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3726: /* package_implementation_declare_section: package_implementation_declare_section_list1 package_implementation_declare_section_list2 */
#line 18873 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.spblock).join((yyvsp[-1].spblock), (yyvsp[0].spblock)); }
#line 51358 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3728: /* package_implementation_declare_section_list1: package_implementation_declare_section_list1 package_implementation_item_declaration */
#line 18880 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.spblock).join((yyvsp[-1].spblock), (yyvsp[0].spblock)); }
#line 51364 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3730: /* package_implementation_declare_section_list2: package_implementation_declare_section_list2 package_implementation_routine_definition */
#line 18887 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.spblock).join((yyvsp[-1].spblock), (yyvsp[0].spblock)); }
#line 51370 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3731: /* package_routine_lex: %empty */
#line 18891 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.lex)= new (thd->mem_root)
sp_lex_local(thd, thd->lex))))
MYSQL_YYABORT;
thd->m_parser_state->m_yacc.reset_before_substatement();
}
#line 51381 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3732: /* $@269: %empty */
#line 18902 "/home/buildbot/git/sql/sql_yacc.yy"
{
DBUG_ASSERT((yyvsp[-2].lex)->sphead->get_package());
(yyvsp[-1].lex)->sql_command= SQLCOM_CREATE_FUNCTION;
sp_name *spname= (yyvsp[-2].lex)->make_sp_name_package_routine(thd, &(yyvsp[0].ident_sys));
if (unlikely(!spname))
MYSQL_YYABORT;
thd->lex= (yyvsp[-1].lex);
if (unlikely(!(yyvsp[-1].lex)->make_sp_head_no_recursive(thd, spname,
&sp_handler_package_function,
NOT_AGGREGATE)))
MYSQL_YYABORT;
(yyvsp[-2].lex)->sphead->get_package()->m_current_routine= (yyvsp[-1].lex);
(void) is_native_function_with_warn(thd, &(yyvsp[0].ident_sys));
}
#line 51400 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3733: /* package_specification_function: remember_lex package_routine_lex ident $@269 opt_sp_parenthesized_fdparam_list RETURN_ORACLE_SYM sf_return_type sp_c_chistics */
#line 18919 "/home/buildbot/git/sql/sql_yacc.yy"
{
sp_head *sp= thd->lex->sphead;
sp->restore_thd_mem_root(thd);
thd->lex= (yyvsp[-7].lex);
(yyval.lex)= (yyvsp[-6].lex);
}
#line 51411 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3734: /* $@270: %empty */
#line 18929 "/home/buildbot/git/sql/sql_yacc.yy"
{
DBUG_ASSERT((yyvsp[-2].lex)->sphead->get_package());
(yyvsp[-1].lex)->sql_command= SQLCOM_CREATE_PROCEDURE;
sp_name *spname= (yyvsp[-2].lex)->make_sp_name_package_routine(thd, &(yyvsp[0].ident_sys));
if (unlikely(!spname))
MYSQL_YYABORT;
thd->lex= (yyvsp[-1].lex);
if (unlikely(!(yyvsp[-1].lex)->make_sp_head_no_recursive(thd, spname,
&sp_handler_package_procedure,
DEFAULT_AGGREGATE)))
MYSQL_YYABORT;
(yyvsp[-2].lex)->sphead->get_package()->m_current_routine= (yyvsp[-1].lex);
}
#line 51429 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3735: /* package_specification_procedure: remember_lex package_routine_lex ident $@270 opt_sp_parenthesized_pdparam_list sp_c_chistics */
#line 18944 "/home/buildbot/git/sql/sql_yacc.yy"
{
sp_head *sp= thd->lex->sphead;
sp->restore_thd_mem_root(thd);
thd->lex= (yyvsp[-5].lex);
(yyval.lex)= (yyvsp[-4].lex);
}
#line 51440 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3736: /* package_implementation_routine_definition: FUNCTION_SYM package_specification_function package_implementation_function_body ';' */
#line 18956 "/home/buildbot/git/sql/sql_yacc.yy"
{
sp_package *pkg= Lex->get_sp_package();
if (unlikely(pkg->add_routine_implementation((yyvsp[-2].lex))))
MYSQL_YYABORT;
pkg->m_current_routine= NULL;
(yyval.spblock).init();
}
#line 51452 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3737: /* package_implementation_routine_definition: PROCEDURE_SYM package_specification_procedure package_implementation_procedure_body ';' */
#line 18965 "/home/buildbot/git/sql/sql_yacc.yy"
{
sp_package *pkg= Lex->get_sp_package();
if (unlikely(pkg->add_routine_implementation((yyvsp[-2].lex))))
MYSQL_YYABORT;
pkg->m_current_routine= NULL;
(yyval.spblock).init();
}
#line 51464 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3738: /* package_implementation_routine_definition: package_specification_element */
#line 18972 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.spblock).init(); }
#line 51470 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3739: /* $@271: %empty */
#line 18978 "/home/buildbot/git/sql/sql_yacc.yy"
{
sp_package *pkg= Lex->get_sp_package();
sp_head *sp= pkg->m_current_routine->sphead;
thd->lex= pkg->m_current_routine;
sp->reset_thd_mem_root(thd);
sp->set_c_chistics(thd->lex->sp_chistics);
sp->set_body_start(thd, YYLIP->get_cpp_tok_start());
}
#line 51483 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3740: /* package_implementation_function_body: sp_tail_is remember_lex $@271 sp_body opt_package_routine_end_name */
#line 18987 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(thd->lex->sp_body_finalize_function(thd) ||
thd->lex->sphead->check_package_routine_end_name((yyvsp[0].lex_str))))
MYSQL_YYABORT;
thd->lex= (yyvsp[-3].lex);
}
#line 51494 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3741: /* $@272: %empty */
#line 18997 "/home/buildbot/git/sql/sql_yacc.yy"
{
sp_package *pkg= Lex->get_sp_package();
sp_head *sp= pkg->m_current_routine->sphead;
thd->lex= pkg->m_current_routine;
sp->reset_thd_mem_root(thd);
sp->set_c_chistics(thd->lex->sp_chistics);
sp->set_body_start(thd, YYLIP->get_cpp_tok_start());
}
#line 51507 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3742: /* package_implementation_procedure_body: sp_tail_is remember_lex $@272 sp_body opt_package_routine_end_name */
#line 19006 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(thd->lex->sp_body_finalize_procedure(thd) ||
thd->lex->sphead->check_package_routine_end_name((yyvsp[0].lex_str))))
MYSQL_YYABORT;
thd->lex= (yyvsp[-3].lex);
}
#line 51518 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3748: /* package_specification_element: FUNCTION_SYM package_specification_function ';' */
#line 19031 "/home/buildbot/git/sql/sql_yacc.yy"
{
sp_package *pkg= Lex->get_sp_package();
if (unlikely(pkg->add_routine_declaration((yyvsp[-1].lex))))
MYSQL_YYABORT;
pkg->m_current_routine= NULL;
}
#line 51529 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3749: /* package_specification_element: PROCEDURE_SYM package_specification_procedure ';' */
#line 19038 "/home/buildbot/git/sql/sql_yacc.yy"
{
sp_package *pkg= Lex->get_sp_package();
if (unlikely(pkg->add_routine_declaration((yyvsp[-1].lex))))
MYSQL_YYABORT;
pkg->m_current_routine= NULL;
}
#line 51540 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3750: /* sp_decl_variable_list_anchored: sp_decl_idents_init_vars optionally_qualified_column_ident PERCENT_ORACLE_SYM TYPE_SYM sp_opt_default */
#line 19050 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_variable_declarations_with_ref_finalize(thd, (yyvsp[-4].num), (yyvsp[-3].qualified_column_ident), (yyvsp[0].item))))
MYSQL_YYABORT;
(yyval.spblock).init_using_vars((yyvsp[-4].num));
}
#line 51550 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3751: /* sp_decl_variable_list_anchored: sp_decl_idents_init_vars optionally_qualified_column_ident PERCENT_ORACLE_SYM ROWTYPE_ORACLE_SYM sp_opt_default */
#line 19058 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_variable_declarations_rowtype_finalize(thd, (yyvsp[-4].num), (yyvsp[-3].qualified_column_ident), (yyvsp[0].item))))
MYSQL_YYABORT;
(yyval.spblock).init_using_vars((yyvsp[-4].num));
}
#line 51560 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3752: /* sp_param_name_and_mode: sp_param_name sp_opt_inout */
#line 19067 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[-1].spvar)->mode= (yyvsp[0].spvar_mode);
(yyval.spvar)= (yyvsp[-1].spvar);
}
#line 51569 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3753: /* sp_param: sp_param_name_and_mode field_type */
#line 19075 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_param_fill_definition((yyval.spvar)= (yyvsp[-1].spvar), (yyvsp[0].Lex_field_type))))
MYSQL_YYABORT;
}
#line 51578 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3754: /* sp_param: sp_param_name_and_mode ROW_SYM row_type_body */
#line 19080 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sphead->spvar_fill_row(thd, (yyval.spvar)= (yyvsp[-2].spvar), (yyvsp[0].spvar_definition_list))))
MYSQL_YYABORT;
}
#line 51587 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3756: /* sp_param_anchored: sp_param_name_and_mode sp_decl_ident '.' ident PERCENT_ORACLE_SYM TYPE_SYM */
#line 19089 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sphead->spvar_fill_type_reference(thd, (yyval.spvar)= (yyvsp[-5].spvar), (yyvsp[-4].ident_sys), (yyvsp[-2].ident_sys))))
MYSQL_YYABORT;
}
#line 51596 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3757: /* sp_param_anchored: sp_param_name_and_mode sp_decl_ident '.' ident '.' ident PERCENT_ORACLE_SYM TYPE_SYM */
#line 19094 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sphead->spvar_fill_type_reference(thd, (yyval.spvar)= (yyvsp[-7].spvar), (yyvsp[-6].ident_sys), (yyvsp[-4].ident_sys), (yyvsp[-2].ident_sys))))
MYSQL_YYABORT;
}
#line 51605 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3758: /* sp_param_anchored: sp_param_name_and_mode sp_decl_ident PERCENT_ORACLE_SYM ROWTYPE_ORACLE_SYM */
#line 19099 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sphead->spvar_fill_table_rowtype_reference(thd, (yyval.spvar)= (yyvsp[-3].spvar), (yyvsp[-2].ident_sys))))
MYSQL_YYABORT;
}
#line 51614 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3759: /* sp_param_anchored: sp_param_name_and_mode sp_decl_ident '.' ident PERCENT_ORACLE_SYM ROWTYPE_ORACLE_SYM */
#line 19104 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sphead->spvar_fill_table_rowtype_reference(thd, (yyval.spvar)= (yyvsp[-5].spvar), (yyvsp[-4].ident_sys), (yyvsp[-2].ident_sys))))
MYSQL_YYABORT;
}
#line 51623 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3760: /* $@273: %empty */
#line 19113 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= thd->lex;
lex->sphead->set_c_chistics(lex->sp_chistics);
lex->sphead->set_body_start(thd, YYLIP->get_cpp_tok_start());
}
#line 51633 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3761: /* sf_c_chistics_and_body_standalone: sp_c_chistics $@273 sp_tail_is sp_body force_lookahead */
#line 19119 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_body_finalize_function(thd)))
MYSQL_YYABORT;
}
#line 51642 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3762: /* $@274: %empty */
#line 19127 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!Lex->make_sp_head_no_recursive(thd, (yyvsp[0].spname),
&sp_handler_procedure,
DEFAULT_AGGREGATE)))
MYSQL_YYABORT;
}
#line 51653 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3763: /* $@275: %empty */
#line 19135 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sphead->set_c_chistics(Lex->sp_chistics);
Lex->sphead->set_body_start(thd, YYLIP->get_cpp_tok_start());
}
#line 51662 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3764: /* sp_tail_standalone: sp_name $@274 opt_sp_parenthesized_pdparam_list sp_c_chistics $@275 sp_tail_is sp_body opt_sp_name */
#line 19142 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_body_finalize_procedure_standalone(thd, (yyvsp[0].spname))))
MYSQL_YYABORT;
}
#line 51671 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3765: /* drop_routine: DROP FUNCTION_SYM opt_if_exists ident '.' ident */
#line 19150 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_drop_function((yyvsp[-3].object_ddl_options), (yyvsp[-2].ident_sys), (yyvsp[0].ident_sys)))
MYSQL_YYABORT;
}
#line 51680 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3766: /* drop_routine: DROP FUNCTION_SYM opt_if_exists ident */
#line 19155 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_drop_function((yyvsp[-1].object_ddl_options), (yyvsp[0].ident_sys)))
MYSQL_YYABORT;
}
#line 51689 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3767: /* drop_routine: DROP PROCEDURE_SYM opt_if_exists sp_name */
#line 19160 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_drop_procedure((yyvsp[-1].object_ddl_options), (yyvsp[0].spname)))
MYSQL_YYABORT;
}
#line 51698 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3768: /* drop_routine: DROP PACKAGE_ORACLE_SYM opt_if_exists sp_name */
#line 19165 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->set_command(SQLCOM_DROP_PACKAGE, (yyvsp[-1].object_ddl_options));
if (unlikely(lex->sphead))
my_yyabort_error((ER_SP_NO_DROP_SP, MYF(0), "PACKAGE"));
lex->spname= (yyvsp[0].spname);
}
#line 51710 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3769: /* drop_routine: DROP PACKAGE_ORACLE_SYM BODY_ORACLE_SYM opt_if_exists sp_name */
#line 19173 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->set_command(SQLCOM_DROP_PACKAGE_BODY, (yyvsp[-1].object_ddl_options));
if (unlikely(lex->sphead))
my_yyabort_error((ER_SP_NO_DROP_SP, MYF(0), "PACKAGE BODY"));
lex->spname= (yyvsp[0].spname);
}
#line 51722 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3770: /* $@276: %empty */
#line 19185 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_create_procedure_start((yyvsp[-3].object_ddl_options) | (yyvsp[0].object_ddl_options)))
MYSQL_YYABORT;
}
#line 51731 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3771: /* create_routine: create_or_replace definer_opt PROCEDURE_SYM opt_if_not_exists $@276 sp_tail_standalone */
#line 19190 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->stmt_create_routine_finalize();
}
#line 51739 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3772: /* $@277: %empty */
#line 19195 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_create_stored_function_start((yyvsp[-5].object_ddl_options) | (yyvsp[-1].object_ddl_options), (yyvsp[-3].sp_aggregate_type), (yyvsp[0].spname)))
MYSQL_YYABORT;
}
#line 51748 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3773: /* create_routine: create_or_replace definer opt_aggregate FUNCTION_SYM opt_if_not_exists sp_name $@277 opt_sp_parenthesized_fdparam_list RETURN_ORACLE_SYM sf_return_type sf_c_chistics_and_body_standalone opt_sp_name */
#line 19203 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_create_stored_function_finalize_standalone((yyvsp[0].spname)))
MYSQL_YYABORT;
}
#line 51757 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3774: /* $@278: %empty */
#line 19209 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_create_stored_function_start((yyvsp[-5].object_ddl_options) | (yyvsp[-1].object_ddl_options), (yyvsp[-3].sp_aggregate_type), (yyvsp[0].spname)))
MYSQL_YYABORT;
}
#line 51766 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3775: /* create_routine: create_or_replace no_definer opt_aggregate FUNCTION_SYM opt_if_not_exists sp_name $@278 opt_sp_parenthesized_fdparam_list RETURN_ORACLE_SYM sf_return_type sf_c_chistics_and_body_standalone opt_sp_name */
#line 19217 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_create_stored_function_finalize_standalone((yyvsp[0].spname)))
MYSQL_YYABORT;
}
#line 51775 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3776: /* create_routine: create_or_replace no_definer opt_aggregate FUNCTION_SYM opt_if_not_exists ident RETURNS_SYM udf_type SONAME_SYM TEXT_STRING_sys */
#line 19223 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_create_udf_function((yyvsp[-9].object_ddl_options) | (yyvsp[-5].object_ddl_options), (yyvsp[-7].sp_aggregate_type), (yyvsp[-4].ident_sys),
(Item_result) (yyvsp[-2].num), (yyvsp[0].lex_str)))
MYSQL_YYABORT;
}
#line 51785 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3777: /* $@279: %empty */
#line 19230 "/home/buildbot/git/sql/sql_yacc.yy"
{
sp_package *pkg;
if (unlikely(!(pkg= Lex->
create_package_start(thd,
SQLCOM_CREATE_PACKAGE,
&sp_handler_package_spec,
(yyvsp[-1].spname), (yyvsp[-5].object_ddl_options) | (yyvsp[-2].object_ddl_options)))))
MYSQL_YYABORT;
pkg->set_c_chistics(Lex->sp_chistics);
Lex->sphead->set_body_start(thd, YYLIP->get_cpp_tok_start());
}
#line 51801 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3778: /* create_routine: create_or_replace definer_opt PACKAGE_ORACLE_SYM opt_if_not_exists sp_name opt_create_package_chistics_init $@279 sp_tail_is opt_package_specification_element_list END remember_end_opt opt_sp_name */
#line 19244 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->create_package_finalize(thd, (yyvsp[-7].spname), (yyvsp[0].spname), (yyvsp[-1].simple_string))))
MYSQL_YYABORT;
}
#line 51810 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3779: /* $@280: %empty */
#line 19250 "/home/buildbot/git/sql/sql_yacc.yy"
{
sp_package *pkg;
if (unlikely(!(pkg= Lex->
create_package_start(thd,
SQLCOM_CREATE_PACKAGE_BODY,
&sp_handler_package_body,
(yyvsp[-1].spname), (yyvsp[-6].object_ddl_options) | (yyvsp[-2].object_ddl_options)))))
MYSQL_YYABORT;
pkg->set_c_chistics(Lex->sp_chistics);
Lex->sphead->set_body_start(thd, YYLIP->get_cpp_tok_start());
Lex->sp_block_init(thd);
}
#line 51827 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3780: /* $@281: %empty */
#line 19264 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_block_with_exceptions_finalize_declarations(thd)))
MYSQL_YYABORT;
}
#line 51836 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3781: /* $@282: %empty */
#line 19269 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[-2].spblock).hndlrs+= (yyvsp[0].spblock_handlers).hndlrs;
if (unlikely(Lex->sp_block_finalize(thd, (yyvsp[-2].spblock))))
MYSQL_YYABORT;
}
#line 51846 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3782: /* create_routine: create_or_replace definer_opt PACKAGE_ORACLE_SYM BODY_ORACLE_SYM opt_if_not_exists sp_name opt_create_package_chistics_init $@280 sp_tail_is package_implementation_declare_section $@281 package_implementation_executable_section $@282 remember_end_opt opt_sp_name */
#line 19275 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->create_package_finalize(thd, (yyvsp[-9].spname), (yyvsp[0].spname), (yyvsp[-1].simple_string))))
MYSQL_YYABORT;
}
#line 51855 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3783: /* opt_sp_decl_body_list: _empty */
#line 19283 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.spblock).init();
}
#line 51863 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3784: /* opt_sp_decl_body_list: sp_decl_body_list */
#line 19286 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.spblock)= (yyvsp[0].spblock); }
#line 51869 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3785: /* $@283: %empty */
#line 19291 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sphead->sp_add_instr_cpush_for_cursors(thd, Lex->spcont)))
MYSQL_YYABORT;
}
#line 51878 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3786: /* sp_decl_body_list: sp_decl_non_handler_list $@283 opt_sp_decl_handler_list */
#line 19296 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.spblock).join((yyvsp[-2].spblock), (yyvsp[0].spblock));
}
#line 51886 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3788: /* sp_decl_non_handler_list: sp_decl_non_handler ';' */
#line 19303 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.spblock)= (yyvsp[-1].spblock); }
#line 51892 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3789: /* sp_decl_non_handler_list: sp_decl_non_handler_list sp_decl_non_handler ';' */
#line 19305 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.spblock).join((yyvsp[-2].spblock), (yyvsp[-1].spblock));
}
#line 51900 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3790: /* sp_decl_handler_list: sp_decl_handler ';' */
#line 19311 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.spblock)= (yyvsp[-1].spblock); }
#line 51906 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3791: /* sp_decl_handler_list: sp_decl_handler_list sp_decl_handler ';' */
#line 19313 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.spblock).join((yyvsp[-2].spblock), (yyvsp[-1].spblock));
}
#line 51914 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3792: /* opt_sp_decl_handler_list: _empty */
#line 19319 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.spblock).init(); }
#line 51920 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3795: /* sp_decl_non_handler: ident_directly_assignable CONDITION_SYM FOR_SYM sp_cond */
#line 19326 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->spcont->declare_condition(thd, &(yyvsp[-3].ident_sys), (yyvsp[0].spcondvalue))))
MYSQL_YYABORT;
(yyval.spblock).vars= (yyval.spblock).hndlrs= (yyval.spblock).curs= 0;
(yyval.spblock).conds= 1;
}
#line 51931 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3796: /* sp_decl_non_handler: ident_directly_assignable EXCEPTION_ORACLE_SYM */
#line 19333 "/home/buildbot/git/sql/sql_yacc.yy"
{
sp_condition_value *spcond= new (thd->mem_root)
sp_condition_value_user_defined();
if (unlikely(!spcond) ||
unlikely(Lex->spcont->declare_condition(thd, &(yyvsp[-1].ident_sys), spcond)))
MYSQL_YYABORT;
(yyval.spblock).vars= (yyval.spblock).hndlrs= (yyval.spblock).curs= 0;
(yyval.spblock).conds= 1;
}
#line 51945 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3797: /* $@284: %empty */
#line 19343 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sp_block_init(thd);
}
#line 51953 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3798: /* sp_decl_non_handler: CURSOR_SYM ident_directly_assignable $@284 opt_parenthesized_cursor_formal_parameters IS sp_cursor_stmt */
#line 19348 "/home/buildbot/git/sql/sql_yacc.yy"
{
sp_pcontext *param_ctx= Lex->spcont;
if (unlikely(Lex->sp_block_finalize(thd)))
MYSQL_YYABORT;
if (unlikely(Lex->sp_declare_cursor(thd, &(yyvsp[-4].ident_sys), (yyvsp[0].sp_cursor_stmt), param_ctx, false)))
MYSQL_YYABORT;
(yyval.spblock).vars= (yyval.spblock).conds= (yyval.spblock).hndlrs= 0;
(yyval.spblock).curs= 1;
}
#line 51967 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3804: /* sp_proc_stmt: labels_declaration_oracle sp_labelable_stmt */
#line 19366 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 51973 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3815: /* sp_labelable_stmt: NULL_SYM */
#line 19380 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 51979 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3820: /* $@285: %empty */
#line 19394 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sp_block_init(thd, &(yyvsp[-1].lex_str));
if (unlikely(Lex->sp_block_with_exceptions_finalize_declarations(thd)))
MYSQL_YYABORT;
}
#line 51989 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3821: /* sp_labeled_block: sp_block_label BEGIN_ORACLE_SYM $@285 sp_block_statements_and_exceptions END sp_opt_label */
#line 19402 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_block_finalize(thd, Lex_spblock((yyvsp[-2].spblock_handlers)), &(yyvsp[0].lex_str))))
MYSQL_YYABORT;
}
#line 51998 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3822: /* $@286: %empty */
#line 19408 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sp_block_init(thd, &(yyvsp[-1].lex_str));
}
#line 52006 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3823: /* $@287: %empty */
#line 19412 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_block_with_exceptions_finalize_declarations(thd)))
MYSQL_YYABORT;
}
#line 52015 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3824: /* sp_labeled_block: sp_block_label DECLARE_ORACLE_SYM $@286 opt_sp_decl_body_list $@287 BEGIN_ORACLE_SYM sp_block_statements_and_exceptions END sp_opt_label */
#line 19420 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[-5].spblock).hndlrs+= (yyvsp[-2].spblock_handlers).hndlrs;
if (unlikely(Lex->sp_block_finalize(thd, (yyvsp[-5].spblock), &(yyvsp[0].lex_str))))
MYSQL_YYABORT;
}
#line 52025 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3827: /* $@288: %empty */
#line 19434 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->maybe_start_compound_statement(thd)))
MYSQL_YYABORT;
Lex->sp_block_init(thd);
if (unlikely(Lex->sp_block_with_exceptions_finalize_declarations(thd)))
MYSQL_YYABORT;
}
#line 52037 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3828: /* sp_unlabeled_block: BEGIN_ORACLE_SYM opt_not_atomic $@288 sp_block_statements_and_exceptions END */
#line 19443 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_block_finalize(thd, Lex_spblock((yyvsp[-1].spblock_handlers)))))
MYSQL_YYABORT;
}
#line 52046 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3829: /* $@289: %empty */
#line 19448 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->maybe_start_compound_statement(thd)))
MYSQL_YYABORT;
Lex->sp_block_init(thd);
}
#line 52056 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3830: /* $@290: %empty */
#line 19454 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_block_with_exceptions_finalize_declarations(thd)))
MYSQL_YYABORT;
}
#line 52065 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3831: /* sp_unlabeled_block: DECLARE_ORACLE_SYM $@289 opt_sp_decl_body_list $@290 BEGIN_ORACLE_SYM sp_block_statements_and_exceptions END */
#line 19461 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[-4].spblock).hndlrs+= (yyvsp[-1].spblock_handlers).hndlrs;
if (unlikely(Lex->sp_block_finalize(thd, (yyvsp[-4].spblock))))
MYSQL_YYABORT;
}
#line 52075 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3832: /* $@291: %empty */
#line 19471 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_block_with_exceptions_finalize_executable_section(thd, (yyvsp[-1].sp_instr_addr))))
MYSQL_YYABORT;
}
#line 52084 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 3833: /* sp_block_statements_and_exceptions: sp_instr_addr sp_proc_stmts $@291 opt_exception_clause */
#line 19476 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_block_with_exceptions_finalize_exceptions(thd, (yyvsp[-3].sp_instr_addr), (yyvsp[0].num))))
MYSQL_YYABORT;
(yyval.spblock_handlers).init((yyvsp[0].num));
}
#line 52094 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
#line 52098 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
that yytoken be updated with the new translation. We take the
approach of translating immediately before every use of yytoken.
One alternative is translating here after every semantic action,
but that translation would be missed if the semantic action invokes
YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
incorrect destructor might then be invoked immediately. In the
case of YYERROR or YYBACKUP, subsequent parser actions might lead
to an incorrect destructor call or verbose syntax error message
before the lookahead is translated. */
YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
YYPOPSTACK (yylen);
yylen = 0;
*++yyvsp = yyval;
/* Now 'shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
{
const int yylhs = yyr1[yyn] - YYNTOKENS;
const int yyi = yypgoto[yylhs] + *yyssp;
yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
? yytable[yyi]
: yydefgoto[yylhs]);
}
goto yynewstate;
/*--------------------------------------.
| yyerrlab -- here on detecting error. |
`--------------------------------------*/
yyerrlab:
/* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
++yynerrs;
yyerror (thd, YY_("syntax error"));
}
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse lookahead token after an
error, discard it. */
if (yychar <= YYEOF)
{
/* Return failure if at end of input. */
if (yychar == YYEOF)
YYABORT;
}
else
{
yydestruct ("Error: discarding",
yytoken, &yylval, thd);
yychar = YYEMPTY;
}
}
/* Else will try to reuse lookahead token after shifting the error
token. */
goto yyerrlab1;
/*---------------------------------------------------.
| yyerrorlab -- error raised explicitly by YYERROR. |
`---------------------------------------------------*/
yyerrorlab:
/* Pacify compilers when the user code never invokes YYERROR and the
label yyerrorlab therefore never appears in user code. */
if (0)
YYERROR;
++yynerrs;
/* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */
YYPOPSTACK (yylen);
yylen = 0;
YY_STACK_PRINT (yyss, yyssp);
yystate = *yyssp;
goto yyerrlab1;
/*-------------------------------------------------------------.
| yyerrlab1 -- common code for both syntax error and YYERROR. |
`-------------------------------------------------------------*/
yyerrlab1:
yyerrstatus = 3; /* Each real token shifted decrements this. */
/* Pop stack until we find a state that shifts the error token. */
for (;;)
{
yyn = yypact[yystate];
if (!yypact_value_is_default (yyn))
{
yyn += YYSYMBOL_YYerror;
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
{
yyn = yytable[yyn];
if (0 < yyn)
break;
}
}
/* Pop the current state because it cannot handle the error token. */
if (yyssp == yyss)
YYABORT;
yydestruct ("Error: popping",
YY_ACCESSING_SYMBOL (yystate), yyvsp, thd);
YYPOPSTACK (1);
yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
}
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval;
YY_IGNORE_MAYBE_UNINITIALIZED_END
/* Shift the error token. */
YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
yystate = yyn;
goto yynewstate;
/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here. |
`-------------------------------------*/
yyacceptlab:
yyresult = 0;
goto yyreturnlab;
/*-----------------------------------.
| yyabortlab -- YYABORT comes here. |
`-----------------------------------*/
yyabortlab:
yyresult = 1;
goto yyreturnlab;
/*-----------------------------------------------------------.
| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
`-----------------------------------------------------------*/
yyexhaustedlab:
yyerror (thd, YY_("memory exhausted"));
yyresult = 2;
goto yyreturnlab;
/*----------------------------------------------------------.
| yyreturnlab -- parsing is finished, clean up and return. |
`----------------------------------------------------------*/
yyreturnlab:
if (yychar != YYEMPTY)
{
/* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
yytoken = YYTRANSLATE (yychar);
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval, thd);
}
/* Do not reclaim the symbols of the rule whose action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
YY_STACK_PRINT (yyss, yyssp);
while (yyssp != yyss)
{
yydestruct ("Cleanup: popping",
YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, thd);
YYPOPSTACK (1);
}
#ifndef yyoverflow
if (yyss != yyssa)
YYSTACK_FREE (yyss);
#endif
return yyresult;
}