)))
MYSQL_YYABORT;
(yyval.sp_assignment_lex_list)->push_back((yyvsp[0].assignment_lex), thd->mem_root);
}
#line 32457 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32466 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32472 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32478 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32487 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32496 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32505 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32514 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32520 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32529 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32548 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32568 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32588 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32597 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32606 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32616 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32670 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32688 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32697 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32703 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 434: /* case_stmt_body: searched_when_clause_list */
#line 4213 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 32709 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32719 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32728 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32737 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32746 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32761 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 445: /* sp_opt_label: %empty */
#line 4271 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= null_clex_str; }
#line 32767 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32773 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 447: /* opt_sp_for_loop_direction: %empty */
#line 4277 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 32779 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 448: /* opt_sp_for_loop_direction: REVERSE_SYM */
#line 4278 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= -1; }
#line 32785 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32794 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32802 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32813 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32823 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32838 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32847 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32856 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32865 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32871 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32880 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32886 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32895 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32906 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32915 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32924 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32933 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32939 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32948 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32956 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32965 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32973 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32984 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 32995 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33007 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33016 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33024 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33030 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33036 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 477: /* trg_event: INSERT */
#line 4447 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->trg_chistics.event= TRG_EVENT_INSERT; }
#line 33042 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33048 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33054 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 480: /* $@64: %empty */
#line 4456 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->create_info.option_list= NULL; }
#line 33060 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33066 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33072 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33087 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 484: /* create_like: LIKE table_ident */
#line 4473 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table)= (yyvsp[0].table); }
#line 33093 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33099 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 486: /* opt_create_select: %empty */
#line 4478 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33105 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33115 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33124 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33136 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33150 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 491: /* opt_partitioning: %empty */
#line 4542 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33156 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33171 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33187 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33205 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33213 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 498: /* $@67: %empty */
#line 4599 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->safe_to_cache_query= 1; }
#line 33219 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33230 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 501: /* $@68: %empty */
#line 4612 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->part_type= HASH_PARTITION; }
#line 33236 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 502: /* part_type_def: opt_linear HASH_SYM $@68 part_func */
#line 4613 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33242 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33248 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33254 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 505: /* $@69: %empty */
#line 4619 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->parsing_place= IN_PART_FUNC;
}
#line 33262 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33271 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33277 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33286 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 510: /* opt_linear: %empty */
#line 4638 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33292 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33298 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33304 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33322 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 514: /* part_field_list: %empty */
#line 4663 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33328 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 515: /* part_field_list: part_field_item_list */
#line 4664 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33334 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 516: /* part_field_item_list: part_field_item */
#line 4668 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33340 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33346 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33361 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33371 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33383 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33392 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 522: /* opt_num_parts: %empty */
#line 4717 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33398 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33412 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 524: /* opt_sub_part: %empty */
#line 4731 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33418 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 525: /* $@71: %empty */
#line 4733 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->subpart_type= HASH_PARTITION; }
#line 33424 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33430 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33440 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33446 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 529: /* sub_part_field_list: sub_part_field_item */
#line 4746 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33452 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33458 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33473 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33486 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 533: /* opt_num_subparts: %empty */
#line 4777 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33492 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33505 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33519 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33542 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 537: /* part_def_list: part_definition */
#line 4822 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33548 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 538: /* part_def_list: part_def_list ',' part_definition */
#line 4823 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33554 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33574 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33580 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33592 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33612 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33629 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33635 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33652 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 548: /* opt_part_values: VALUES_IN_SYM $@75 part_values_in */
#line 4910 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33658 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33669 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33680 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33701 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33723 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 553: /* part_func_max: part_value_item */
#line 4963 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33729 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33760 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33773 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 556: /* part_value_list: part_value_item */
#line 5006 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33779 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 557: /* part_value_list: part_value_list ',' part_value_item */
#line 5007 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33785 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33799 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 559: /* $@77: %empty */
#line 5021 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33805 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33830 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 561: /* part_value_item_list: part_value_expr_item */
#line 5046 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33836 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33842 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33857 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33875 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33893 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33920 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 567: /* sub_part_list: sub_part_definition */
#line 5120 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33926 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 568: /* sub_part_list: sub_part_list ',' sub_part_definition */
#line 5121 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33932 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33969 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33975 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 33985 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 572: /* opt_part_options: %empty */
#line 5171 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33991 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 573: /* opt_part_options: part_option_list */
#line 5172 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33997 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 574: /* part_option_list: part_option_list part_option */
#line 5176 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34003 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 575: /* part_option_list: part_option */
#line 5177 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34009 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 576: /* part_option: server_part_option */
#line 5181 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34015 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34024 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 578: /* opt_subpart_options: %empty */
#line 5190 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34030 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 579: /* opt_subpart_options: subpart_option_list */
#line 5191 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34036 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 580: /* subpart_option_list: subpart_option_list server_part_option */
#line 5195 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34042 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 581: /* subpart_option_list: server_part_option */
#line 5196 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34048 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34054 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34064 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34074 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34080 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34086 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34092 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34098 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34104 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34110 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 591: /* opt_versioning_rotation: %empty */
#line 5229 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34116 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 592: /* $@79: %empty */
#line 5230 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->clause_that_disallows_subselect= "INTERVAL"; }
#line 34122 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34134 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34145 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 595: /* opt_versioning_interval_start: %empty */
#line 5251 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= NULL;
}
#line 34153 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34161 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 597: /* opt_vers_auto_part: %empty */
#line 5262 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= 0;
}
#line 34169 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 598: /* opt_vers_auto_part: AUTO_SYM */
#line 5266 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= 1;
}
#line 34177 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 599: /* opt_as: %empty */
#line 5275 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34183 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 600: /* opt_as: AS */
#line 5276 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34189 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 601: /* opt_create_database_options: %empty */
#line 5280 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34195 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 602: /* opt_create_database_options: create_database_options */
#line 5281 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34201 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 603: /* create_database_options: create_database_option */
#line 5285 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34207 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 604: /* create_database_options: create_database_options create_database_option */
#line 5286 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34213 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 605: /* create_database_option: default_collation */
#line 5290 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34219 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 606: /* create_database_option: default_charset */
#line 5291 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34225 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34234 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34242 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34250 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 610: /* opt_if_not_exists: %empty */
#line 5312 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.object_ddl_options).init();
}
#line 34258 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34266 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 612: /* create_or_replace: CREATE */
#line 5323 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.object_ddl_options).init();
}
#line 34274 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34282 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34301 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34310 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34319 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34328 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34337 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34346 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34355 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34374 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34384 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34403 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34412 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34431 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34441 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34463 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34472 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34481 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34490 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34499 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34508 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34517 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34525 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34551 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34560 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34569 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34578 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 648: /* create_table_option: TABLESPACE ident */
#line 5548 "/home/buildbot/git/sql/sql_yacc.yy"
{ /* Compatiblity with MySQL */ }
#line 34584 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34590 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34596 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34606 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34615 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34624 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34632 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34641 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34652 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34663 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34672 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34681 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34701 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34710 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34720 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34731 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34743 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 668: /* row_types: DEFAULT */
#line 5671 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.row_type)= ROW_TYPE_DEFAULT; }
#line 34749 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 669: /* row_types: FIXED_SYM */
#line 5672 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.row_type)= ROW_TYPE_FIXED; }
#line 34755 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 670: /* row_types: DYNAMIC_SYM */
#line 5673 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.row_type)= ROW_TYPE_DYNAMIC; }
#line 34761 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 671: /* row_types: COMPRESSED_SYM */
#line 5674 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.row_type)= ROW_TYPE_COMPRESSED; }
#line 34767 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 672: /* row_types: REDUNDANT_SYM */
#line 5675 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.row_type)= ROW_TYPE_REDUNDANT; }
#line 34773 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 673: /* row_types: COMPACT_SYM */
#line 5676 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.row_type)= ROW_TYPE_COMPACT; }
#line 34779 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 674: /* row_types: PAGE_SYM */
#line 5677 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.row_type)= ROW_TYPE_PAGE; }
#line 34785 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34791 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34797 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34803 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 678: /* udf_type: STRING_SYM */
#line 5687 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.num) = (int) STRING_RESULT; }
#line 34809 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 679: /* udf_type: REAL */
#line 5688 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.num) = (int) REAL_RESULT; }
#line 34815 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 680: /* udf_type: DECIMAL_SYM */
#line 5689 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.num) = (int) DECIMAL_RESULT; }
#line 34821 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 681: /* udf_type: INT_SYM */
#line 5690 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.num) = (int) INT_RESULT; }
#line 34827 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34835 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34843 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 686: /* field_list_item: column_def */
#line 5714 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 34849 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 690: /* field_list_item: PERIOD_SYM period_for_application_time */
#line 5718 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 34855 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34861 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34872 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34882 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34888 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34898 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34904 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34914 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34920 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34930 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34936 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34946 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34952 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34962 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34968 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34982 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 34992 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35000 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35009 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35018 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35024 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35030 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35041 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 713: /* opt_constraint_no_id: %empty */
#line 5837 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35047 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 714: /* opt_constraint_no_id: CONSTRAINT */
#line 5838 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35053 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 715: /* opt_constraint: %empty */
#line 5842 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= null_clex_str; }
#line 35059 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 716: /* opt_constraint: constraint */
#line 5843 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= (yyvsp[0].lex_str); }
#line 35065 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35071 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35091 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35114 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35123 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35134 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35145 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 724: /* opt_serial_attribute: %empty */
#line 5912 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35151 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 725: /* opt_serial_attribute: opt_serial_attribute_list */
#line 5913 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35157 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 726: /* opt_serial_attribute_list: opt_serial_attribute_list serial_attribute */
#line 5917 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35163 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 728: /* opt_asrow_attribute: %empty */
#line 5922 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35169 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 729: /* opt_asrow_attribute: opt_asrow_attribute_list */
#line 5923 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35175 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 730: /* opt_asrow_attribute_list: opt_asrow_attribute_list asrow_attribute */
#line 5927 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35181 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35187 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35193 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35202 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35210 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35218 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35228 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35238 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 740: /* opt_generated_always: %empty */
#line 5963 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35244 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 741: /* opt_generated_always: GENERATED_SYM ALWAYS_SYM */
#line 5964 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35250 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35258 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35266 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35274 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35282 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 746: /* vcol_opt_attribute: %empty */
#line 5987 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35288 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 747: /* vcol_opt_attribute: vcol_opt_attribute_list */
#line 5988 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35294 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 748: /* vcol_opt_attribute_list: vcol_opt_attribute_list vcol_attribute */
#line 5992 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35300 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35310 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35320 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35326 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 753: /* vcol_attribute: INVISIBLE_SYM */
#line 6011 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->invisible= INVISIBLE_USER;
}
#line 35334 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35349 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35361 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35372 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35384 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35398 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35407 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35415 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35423 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35432 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35438 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35444 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35450 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35459 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35467 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35473 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35491 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35499 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35507 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35515 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35521 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35532 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35538 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35544 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35550 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35556 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35562 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35568 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35576 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35585 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35593 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35601 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35609 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35618 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35626 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35634 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35654 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35660 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35671 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35682 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35690 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35698 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35706 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35714 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35722 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35730 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35738 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35746 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35752 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35758 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35764 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35770 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35776 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35782 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35788 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35796 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35802 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35808 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 820: /* char: CHAR_SYM */
#line 6306 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35814 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 821: /* nchar: NCHAR_SYM */
#line 6310 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35820 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 822: /* nchar: NATIONAL_SYM CHAR_SYM */
#line 6311 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35826 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 823: /* varchar: char VARYING */
#line 6315 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35832 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 824: /* varchar: VARCHAR */
#line 6316 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35838 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 825: /* nvarchar: NATIONAL_SYM VARCHAR */
#line 6320 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35844 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 826: /* nvarchar: NVARCHAR_SYM */
#line 6321 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35850 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 827: /* nvarchar: NCHAR_SYM VARCHAR */
#line 6322 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35856 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 828: /* nvarchar: NATIONAL_SYM CHAR_SYM VARYING */
#line 6323 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35862 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 829: /* nvarchar: NCHAR_SYM VARYING */
#line 6324 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35868 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 830: /* int_type: INT_SYM */
#line 6328 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.type_handler)= &type_handler_slong; }
#line 35874 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 831: /* int_type: TINYINT */
#line 6329 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.type_handler)= &type_handler_stiny; }
#line 35880 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 832: /* int_type: SMALLINT */
#line 6330 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.type_handler)= &type_handler_sshort; }
#line 35886 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 833: /* int_type: MEDIUMINT */
#line 6331 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.type_handler)= &type_handler_sint24; }
#line 35892 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 834: /* int_type: BIGINT */
#line 6332 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.type_handler)= &type_handler_slonglong; }
#line 35898 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35908 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 836: /* real_type: DOUBLE_SYM */
#line 6342 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.type_handler)= &type_handler_double; }
#line 35914 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35920 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 838: /* srid_option: %empty */
#line 6348 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_field->srid= 0; }
#line 35926 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35934 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 840: /* float_options: %empty */
#line 6357 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_length_and_dec).reset(); }
#line 35940 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35946 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 844: /* field_options: %empty */
#line 6367 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 0; }
#line 35952 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 845: /* field_options: SIGNED_SYM */
#line 6368 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 0; }
#line 35958 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 846: /* field_options: UNSIGNED */
#line 6369 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= UNSIGNED_FLAG; }
#line 35964 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 847: /* field_options: ZEROFILL */
#line 6370 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= UNSIGNED_FLAG | ZEROFILL_FLAG; }
#line 35970 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35976 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35982 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35988 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 35994 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36000 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36006 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36012 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36018 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36024 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36030 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 859: /* opt_field_scale: %empty */
#line 6400 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_length_and_dec).reset(); }
#line 36036 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 861: /* opt_precision: %empty */
#line 6405 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_length_and_dec).reset(); }
#line 36042 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36048 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36057 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36067 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36076 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36088 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36094 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36105 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36113 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36119 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 872: /* opt_compression_method: %empty */
#line 6455 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.const_simple_string)= NULL; }
#line 36125 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36131 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 874: /* opt_compressed: %empty */
#line 6460 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36137 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 875: /* opt_compressed: compressed */
#line 6461 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 36143 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 876: /* opt_enable: %empty */
#line 6465 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36149 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 877: /* opt_enable: ENABLE_SYM */
#line 6466 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 36155 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36164 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36173 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36183 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36191 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36201 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36209 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36223 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36233 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36243 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 889: /* charset: CHAR_SYM SET */
#line 6543 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.kwd)= (yyvsp[-1].kwd); }
#line 36249 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 890: /* charset: CHARSET */
#line 6544 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.kwd)= (yyvsp[0].kwd); }
#line 36255 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36266 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 892: /* charset_name: BINARY */
#line 6555 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)= &my_charset_bin; }
#line 36272 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36278 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 894: /* charset_name_or_default: DEFAULT */
#line 6560 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)=NULL; }
#line 36284 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 895: /* opt_load_data_charset: %empty */
#line 6564 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)= NULL; }
#line 36290 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36296 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36309 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36315 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36321 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36327 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36336 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36342 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36348 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 904: /* opt_default: %empty */
#line 6600 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36354 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 905: /* opt_default: DEFAULT */
#line 6601 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36360 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36366 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 907: /* charset_or_alias: ASCII_SYM */
#line 6606 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)= &my_charset_latin1; }
#line 36372 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36381 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36387 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36395 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36403 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36412 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36418 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36427 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36435 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36445 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36453 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36461 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 920: /* opt_bin_mod: %empty */
#line 6660 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= false; }
#line 36467 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 921: /* opt_bin_mod: BINARY */
#line 6661 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= true; }
#line 36473 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36485 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36491 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 924: /* ws_level_flag_desc: ASC */
#line 6678 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 0; }
#line 36497 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36503 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36509 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 927: /* ws_level_flags: %empty */
#line 6686 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 0; }
#line 36515 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36521 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36527 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36533 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36542 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36550 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36556 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36562 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36573 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36579 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36585 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 938: /* opt_ws_levels: %empty */
#line 6728 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 0; }
#line 36591 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36597 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36605 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 943: /* opt_ref_list: %empty */
#line 6750 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ref_list.empty(); }
#line 36611 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36622 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36635 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36641 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36647 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36653 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36659 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36669 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36679 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36689 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36699 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36709 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 956: /* delete_option: RESTRICT */
#line 6820 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_fk_option)= FK_OPTION_RESTRICT; }
#line 36715 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 957: /* delete_option: CASCADE */
#line 6821 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_fk_option)= FK_OPTION_CASCADE; }
#line 36721 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36727 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36733 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36739 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36745 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36751 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 963: /* key_or_index: KEY_SYM */
#line 6833 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36757 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 964: /* key_or_index: INDEX_SYM */
#line 6834 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36763 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 965: /* opt_key_or_index: %empty */
#line 6838 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36769 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 967: /* keys_or_index: KEYS */
#line 6843 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36775 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 968: /* keys_or_index: INDEX_SYM */
#line 6844 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36781 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 969: /* keys_or_index: INDEXES */
#line 6845 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36787 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 970: /* fulltext: FULLTEXT_SYM */
#line 6849 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_type)= Key::FULLTEXT;}
#line 36793 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36806 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 972: /* normal_key_options: %empty */
#line 6865 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36812 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36818 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 974: /* fulltext_key_options: %empty */
#line 6870 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36824 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36830 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 976: /* spatial_key_options: %empty */
#line 6875 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36836 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36842 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36848 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36854 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36860 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36866 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36872 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36878 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36884 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36893 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36899 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36907 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36915 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36923 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36934 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36940 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36946 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36952 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1004: /* ignorability: IGNORED_SYM */
#line 6962 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= true; }
#line 36958 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1005: /* ignorability: NOT_SYM IGNORED_SYM */
#line 6963 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= false; }
#line 36964 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36973 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36982 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1008: /* opt_without_overlaps: %empty */
#line 6980 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36988 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 36997 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37007 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37020 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1012: /* opt_ident: %empty */
#line 7007 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= null_clex_str; }
#line 37026 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37032 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37038 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37044 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37064 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37080 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37095 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37105 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37119 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37129 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37142 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37154 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37163 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37169 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37178 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37184 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37195 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37201 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37212 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37218 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37241 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37261 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37271 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37277 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37286 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37298 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37312 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37323 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37329 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37337 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37345 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37353 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37361 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37369 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37379 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1052: /* ev_alter_on_schedule_completion: %empty */
#line 7256 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0;}
#line 37385 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37391 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37397 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37403 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1056: /* opt_ev_rename_to: %empty */
#line 7263 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0;}
#line 37409 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37422 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1058: /* opt_ev_sql_stmt: %empty */
#line 7276 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0;}
#line 37428 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37434 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1060: /* ident_or_empty: %empty */
#line 7282 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ident_sys)= Lex_ident_sys(); }
#line 37440 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37452 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37464 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37474 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37484 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37499 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37514 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37528 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37543 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37554 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37568 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37577 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37591 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37625 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37636 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37644 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37652 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37668 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37674 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37683 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37691 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37704 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37712 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1097: /* $@113: %empty */
#line 7519 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.partition_flags|= ALTER_PARTITION_REORGANIZE;
}
#line 37720 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37729 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1099: /* alt_part_name_list: alt_part_name_item */
#line 7530 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37735 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37741 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37751 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37762 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37771 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37779 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37789 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37800 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37808 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37817 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37828 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37839 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37853 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37868 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37882 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37897 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37911 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37921 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37931 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37942 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37956 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37965 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37975 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37984 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 37998 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38007 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38016 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38025 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38033 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38042 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38051 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38060 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38068 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38080 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38089 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38098 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38107 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38116 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1147: /* opt_column: %empty */
#line 7805 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38122 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1148: /* opt_column: COLUMN_SYM */
#line 7806 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38128 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1149: /* opt_ignore: %empty */
#line 7810 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ignore= 0;}
#line 38134 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1150: /* opt_ignore: IGNORE_SYM */
#line 7811 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ignore= 1;}
#line 38140 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1151: /* $@114: %empty */
#line 7815 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ignore= 0;}
#line 38146 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1157: /* alter_option: IGNORE_SYM */
#line 7829 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ignore= 1;}
#line 38152 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38161 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1159: /* opt_restrict: %empty */
#line 7838 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->drop_mode= DROP_DEFAULT; }
#line 38167 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1160: /* opt_restrict: RESTRICT */
#line 7839 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->drop_mode= DROP_RESTRICT; }
#line 38173 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1161: /* opt_restrict: CASCADE */
#line 7840 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->drop_mode= DROP_CASCADE; }
#line 38179 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1162: /* opt_place: %empty */
#line 7844 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= null_clex_str; }
#line 38185 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38194 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38204 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1165: /* opt_to: %empty */
#line 7859 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38210 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1166: /* opt_to: TO_SYM */
#line 7860 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38216 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1167: /* opt_to: '=' */
#line 7861 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38222 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1168: /* opt_to: AS */
#line 7862 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38228 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38239 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38245 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38256 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1172: /* slave: START_SYM ALL SLAVES slave_thread_opts $@116 */
#line 7882 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38262 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38273 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38284 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38301 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1176: /* opt_start_transaction_option_list: %empty */
#line 7917 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= 0;
}
#line 38309 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38317 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38325 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38333 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38341 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38349 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38357 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1183: /* $@117: %empty */
#line 7953 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->slave_thd_opt= 0; }
#line 38363 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1184: /* slave_thread_opts: $@117 slave_thread_opt_list */
#line 7955 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38369 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1187: /* slave_thread_opt: %empty */
#line 7964 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38375 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38381 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38387 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1190: /* slave_until: %empty */
#line 7970 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38393 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38406 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38414 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38425 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38431 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1197: /* opt_checksum_type: %empty */
#line 8004 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags= 0; }
#line 38437 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1198: /* opt_checksum_type: QUICK */
#line 8005 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags= T_QUICK; }
#line 38443 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38449 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1201: /* $@119: %empty */
#line 8012 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->table_type= TABLE_TYPE_VIEW; }
#line 38455 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38469 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38481 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38487 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1206: /* opt_mi_repair_type: mi_repair_types */
#line 8039 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38493 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1207: /* mi_repair_types: mi_repair_type */
#line 8043 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38499 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1208: /* mi_repair_types: mi_repair_type mi_repair_types */
#line 8044 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38505 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1209: /* mi_repair_type: QUICK */
#line 8048 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags|= T_QUICK; }
#line 38511 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38517 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38523 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1212: /* opt_view_repair_type: %empty */
#line 8054 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 38529 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38535 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38541 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38555 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38567 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1220: /* opt_persistent_stat_clause: %empty */
#line 8091 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38573 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38581 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1222: /* persistent_stat_spec: ALL */
#line 8100 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38587 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38593 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1224: /* persistent_column_stat_spec: ALL */
#line 8106 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38599 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38610 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1226: /* persistent_column_stat_spec: '(' $@122 table_column_list ')' */
#line 8116 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 38616 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1227: /* persistent_index_stat_spec: ALL */
#line 8120 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38622 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38633 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1229: /* persistent_index_stat_spec: '(' $@123 table_index_list ')' */
#line 8130 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 38639 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1230: /* table_column_list: %empty */
#line 8135 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38645 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38654 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38663 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1233: /* table_index_list: %empty */
#line 8150 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38669 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38679 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38690 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38701 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38711 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1241: /* $@124: %empty */
#line 8192 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->table_type= TABLE_TYPE_VIEW; }
#line 38717 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38731 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38745 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38751 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1246: /* opt_mi_check_type: mi_check_types */
#line 8220 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38757 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1247: /* mi_check_types: mi_check_type */
#line 8224 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38763 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1248: /* mi_check_types: mi_check_type mi_check_types */
#line 8225 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38769 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1249: /* mi_check_type: QUICK */
#line 8229 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags|= T_QUICK; }
#line 38775 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38781 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38787 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38793 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38799 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38805 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1255: /* opt_view_check_type: %empty */
#line 8238 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 38811 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38817 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38831 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38843 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1259: /* opt_no_write_to_binlog: %empty */
#line 8264 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 38849 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38855 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1261: /* opt_no_write_to_binlog: LOCAL_SYM */
#line 8266 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 38861 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38872 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38880 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38888 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38898 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38908 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38924 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1270: /* $@128: %empty */
#line 8324 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.reset();
}
#line 38932 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38942 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38954 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38966 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38972 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38978 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38990 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 38998 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39010 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39022 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1288: /* $@130: %empty */
#line 8421 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.partition_flags|= ALTER_PARTITION_ADMIN;
}
#line 39030 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39040 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1292: /* cache_key_list_or_empty: %empty */
#line 8437 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 39046 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1294: /* opt_ignore_leaves: %empty */
#line 8443 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 39052 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39058 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39069 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39080 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39091 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39103 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39112 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39126 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39135 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39151 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39157 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39163 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1306: /* $@136: %empty */
#line 8527 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->parsed_TVC_start())
MYSQL_YYABORT;
}
#line 39172 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39181 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39194 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1309: /* $@138: %empty */
#line 8549 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->parsing_place= SELECT_LIST;
}
#line 39202 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39210 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39218 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39226 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39235 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39245 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39251 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39257 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39269 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39280 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39289 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39298 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39304 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39315 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39325 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39336 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39347 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39359 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39365 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39371 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39377 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39386 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39399 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39410 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39420 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39430 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1340: /* opt_history_unit: %empty */
#line 8864 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.vers_range_unit)= VERS_TIMESTAMP;
}
#line 39438 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39446 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1342: /* opt_history_unit: TIMESTAMP */
#line 8872 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.vers_range_unit)= VERS_TIMESTAMP;
}
#line 39454 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39467 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39475 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39483 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39499 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1347: /* opt_for_portion_of_time_clause: %empty */
#line 8915 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= false;
}
#line 39507 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39515 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1349: /* opt_for_system_time_clause: %empty */
#line 8926 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= false;
}
#line 39523 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39531 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39539 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39547 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39555 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39563 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39576 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39589 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39599 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39609 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1362: /* opt_select_lock_type: %empty */
#line 9000 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lock).empty();
}
#line 39617 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39625 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1364: /* opt_lock_wait_timeout_new: %empty */
#line 9011 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lock).empty();
}
#line 39633 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39643 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39653 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39663 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39684 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39693 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39716 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39724 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39732 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39740 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1376: /* select_alias: %empty */
#line 9102 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=null_clex_str;}
#line 39746 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39752 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39758 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1379: /* select_alias: ident */
#line 9105 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].ident_sys); }
#line 39764 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39770 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1381: /* opt_default_time_precision: %empty */
#line 9110 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= NOT_FIXED_DEC; }
#line 39776 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1382: /* opt_default_time_precision: '(' ')' */
#line 9111 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= NOT_FIXED_DEC; }
#line 39782 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39788 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1384: /* opt_time_precision: %empty */
#line 9116 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 39794 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1385: /* opt_time_precision: '(' ')' */
#line 9117 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 39800 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39806 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1387: /* optional_braces: %empty */
#line 9122 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 39812 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1388: /* optional_braces: '(' ')' */
#line 9123 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 39818 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39873 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39884 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39931 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39941 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39951 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39961 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39971 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39981 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 39991 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40001 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40011 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40021 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40031 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40041 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40051 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40061 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40074 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40084 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40096 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40106 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40119 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40129 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40141 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40155 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40165 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40176 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40187 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40199 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40209 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40222 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40232 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40242 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40252 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40262 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40273 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40283 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40293 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40303 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40313 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40323 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40333 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40343 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40353 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40363 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40373 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40383 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40393 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40403 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1449: /* comp_op: '=' */
#line 9558 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.boolfunc2creator) = &comp_eq_creator; }
#line 40409 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1450: /* comp_op: GE */
#line 9559 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.boolfunc2creator) = &comp_ge_creator; }
#line 40415 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1451: /* comp_op: '>' */
#line 9560 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.boolfunc2creator) = &comp_gt_creator; }
#line 40421 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1452: /* comp_op: LE */
#line 9561 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.boolfunc2creator) = &comp_le_creator; }
#line 40427 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1453: /* comp_op: '<' */
#line 9562 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.boolfunc2creator) = &comp_lt_creator; }
#line 40433 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1454: /* comp_op: NE */
#line 9563 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.boolfunc2creator) = &comp_ne_creator; }
#line 40439 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1455: /* all_or_any: ALL */
#line 9567 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 1; }
#line 40445 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1456: /* all_or_any: ANY_SYM */
#line 9568 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 0; }
#line 40451 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40459 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40465 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40471 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40477 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40483 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40489 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40495 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40501 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40507 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40513 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40519 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40528 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40536 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40559 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40570 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40579 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40585 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40591 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40597 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40603 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40612 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40618 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40624 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40630 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40636 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40642 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40648 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40654 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40660 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40666 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40678 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40690 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40701 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40711 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40720 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40734 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40743 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40752 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40762 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40771 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40781 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40796 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40807 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40816 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40825 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40834 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40843 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40852 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40861 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40870 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1522: /* primary_expr: '(' parenthesized_expr ')' */
#line 9852 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)= (yyvsp[-1].item); }
#line 40876 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40885 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40895 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40905 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1528: /* simple_expr: '+' simple_expr */
#line 9879 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= (yyvsp[0].item);
}
#line 40913 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40923 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40933 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40943 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40953 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40964 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40974 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40984 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 40994 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41007 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41020 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41030 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41040 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41050 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41060 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41079 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41094 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41104 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41114 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41124 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41134 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41144 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41156 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41167 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41175 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41185 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41197 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41207 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41215 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41223 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41231 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41239 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41250 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41260 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41271 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41282 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41292 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41302 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41312 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41322 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41333 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41343 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1573: /* function_call_nonkeyword: ROWNUM_SYM '(' ')' */
#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 41353 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41364 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41374 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 41384 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1577: /* 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 41393 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1578: /* 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 41402 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1579: /* 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 41412 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1580: /* 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 41422 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1581: /* 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 41431 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1582: /* 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 41442 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1583: /* 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 41453 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1584: /* 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 41464 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1585: /* 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 41474 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1586: /* 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 41484 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1587: /* 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 41494 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1588: /* 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 41505 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1589: /* 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 41515 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1590: /* 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 41525 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1591: /* 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 41535 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1592: /* 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 41550 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1593: /* 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 41561 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1594: /* 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 41571 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1595: /* 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 41583 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1596: /* 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 41593 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1597: /* 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 41603 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1598: /* 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 41613 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1599: /* 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 41623 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1600: /* 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 41635 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1601: /* 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 41651 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1602: /* 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 41662 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1603: /* @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 41685 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1604: /* 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 41746 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1605: /* 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 41756 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1606: /* 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 41766 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1607: /* 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 41776 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1608: /* 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 41785 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1609: /* 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 41794 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1610: /* 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 41803 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1611: /* 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 41812 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1612: /* 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 41821 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1613: /* 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 41830 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1614: /* 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 41839 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1615: /* 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 41845 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1616: /* fulltext_options: IN_SYM BOOLEAN_SYM MODE_SYM */
#line 10575 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= FT_BOOL; }
#line 41851 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1617: /* opt_natural_language_mode: %empty */
#line 10579 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= FT_NL; }
#line 41857 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1618: /* 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 41863 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1619: /* opt_query_expansion: %empty */
#line 10584 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 41869 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1620: /* opt_query_expansion: WITH QUERY_SYM EXPANSION_SYM */
#line 10585 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= FT_EXPAND; }
#line 41875 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1621: /* opt_udf_expr_list: %empty */
#line 10589 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item_list)= NULL; }
#line 41881 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1622: /* opt_udf_expr_list: udf_expr_list */
#line 10590 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item_list)= (yyvsp[0].item_list); }
#line 41887 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1623: /* 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 41898 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1624: /* 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 41907 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1625: /* 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 41935 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1626: /* 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 41945 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1627: /* 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 41955 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1628: /* 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 41965 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1629: /* 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 41975 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1630: /* 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 41985 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1631: /* 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 41998 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1632: /* 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 42008 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1633: /* $@143: %empty */
#line 10682 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->in_sum_expr++; }
#line 42014 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1634: /* $@144: %empty */
#line 10684 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->in_sum_expr--; }
#line 42020 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1635: /* 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 42030 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1636: /* 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 42040 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1637: /* 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 42050 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1638: /* 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 42060 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1639: /* 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 42070 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1640: /* 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 42080 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1641: /* 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 42090 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1642: /* 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 42100 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1643: /* 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 42110 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1644: /* 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 42120 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1645: /* 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 42130 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1646: /* $@145: %empty */
#line 10757 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->in_sum_expr++; }
#line 42136 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1647: /* 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 42156 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1648: /* $@146: %empty */
#line 10777 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->in_sum_expr++; }
#line 42162 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1649: /* 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 42193 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1650: /* $@147: %empty */
#line 10807 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->in_sum_expr++; }
#line 42199 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1651: /* 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 42212 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1652: /* 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 42224 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1653: /* 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 42243 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1656: /* 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 42259 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1657: /* 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 42269 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1658: /* 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 42279 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1659: /* 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 42289 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1660: /* 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 42299 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1661: /* 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 42309 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1662: /* 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 42319 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1663: /* 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 42329 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1664: /* 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 42339 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1665: /* 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 42349 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1666: /* 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 42363 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1667: /* 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 42373 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1668: /* 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 42387 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1669: /* 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 42397 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1670: /* 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 42416 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1671: /* $@148: %empty */
#line 10989 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->prepare_add_window_spec(thd); }
#line 42422 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1672: /* 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 42430 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1673: /* 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 42448 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1674: /* 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 42458 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1675: /* 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 42468 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1676: /* 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 42477 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1677: /* 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 42487 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1678: /* $@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 42496 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1679: /* variable: '@' $@149 variable_aux */
#line 11050 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= (yyvsp[0].item);
}
#line 42504 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1680: /* 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 42523 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1681: /* 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 42540 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1682: /* 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 42549 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1683: /* 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 42558 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1684: /* opt_distinct: %empty */
#line 11097 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 0; }
#line 42564 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1685: /* opt_distinct: DISTINCT */
#line 11098 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 1; }
#line 42570 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1686: /* 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 42580 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1687: /* opt_gconcat_separator: SEPARATOR_SYM text_string */
#line 11108 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.string) = (yyvsp[0].string); }
#line 42586 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1690: /* 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 42595 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1691: /* 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 42604 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1692: /* opt_glimit_clause: %empty */
#line 11130 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 0; }
#line 42610 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1693: /* opt_glimit_clause: glimit_clause */
#line 11131 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 1; }
#line 42616 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1694: /* glimit_clause: LIMIT glimit_options */
#line 11137 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
}
#line 42624 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1695: /* glimit_options: limit_options */
#line 11144 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->limit_params= (yyvsp[0].select_limit);
}
#line 42632 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1696: /* $@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 42645 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1697: /* 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 42654 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1698: /* 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 42660 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1699: /* 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 42670 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1700: /* 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 42680 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1701: /* 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 42690 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1702: /* 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 42698 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1703: /* cast_type: cast_type_numeric */
#line 11193 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type)= (yyvsp[0].Lex_cast_type); }
#line 42704 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1704: /* cast_type: cast_type_temporal */
#line 11194 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type)= (yyvsp[0].Lex_cast_type); }
#line 42710 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1705: /* 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 42719 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1706: /* cast_type_numeric: INT_SYM */
#line 11203 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_slonglong); }
#line 42725 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1707: /* cast_type_numeric: SIGNED_SYM */
#line 11204 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_slonglong); }
#line 42731 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1708: /* 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 42737 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1709: /* cast_type_numeric: UNSIGNED */
#line 11206 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_ulonglong); }
#line 42743 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1710: /* cast_type_numeric: UNSIGNED INT_SYM */
#line 11207 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_ulonglong); }
#line 42749 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1711: /* 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 42755 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1712: /* cast_type_numeric: FLOAT_SYM */
#line 11209 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_float); }
#line 42761 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1713: /* 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 42767 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1714: /* cast_type_temporal: DATE_SYM */
#line 11214 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_newdate); }
#line 42773 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1715: /* 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 42779 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1716: /* 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 42785 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1717: /* 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 42793 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1718: /* opt_expr_list: %empty */
#line 11224 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item_list)= NULL; }
#line 42799 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1719: /* opt_expr_list: expr_list */
#line 11225 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item_list)= (yyvsp[0].item_list);}
#line 42805 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1720: /* 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 42814 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1721: /* 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 42823 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1722: /* ident_list_arg: ident_list */
#line 11242 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item_list)= (yyvsp[0].item_list); }
#line 42829 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1723: /* ident_list_arg: '(' ident_list ')' */
#line 11243 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item_list)= (yyvsp[-1].item_list); }
#line 42835 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1724: /* 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 42846 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1725: /* 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 42855 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1726: /* 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 42868 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1727: /* 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 42879 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1729: /* 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 42889 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1730: /* table_ref: table_factor */
#line 11293 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)= (yyvsp[0].table_list); }
#line 42895 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1731: /* 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 42908 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1732: /* json_text_literal: TEXT_STRING */
#line 11307 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->json_table->m_text_literal_cs= NULL;
}
#line 42916 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1733: /* 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 42924 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1734: /* 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 42933 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1736: /* json_text_literal_or_num: NUM */
#line 11324 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->json_table->m_text_literal_cs= NULL;
}
#line 42941 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1737: /* 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 42949 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1738: /* 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 42957 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1739: /* 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 42965 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1740: /* 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 42971 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1741: /* json_table_columns_clause: COLUMNS '(' json_table_columns_list ')' */
#line 11347 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 42977 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1743: /* json_table_columns_list: json_table_columns_list ',' json_table_column */
#line 11353 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 42983 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1744: /* $@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 43006 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1745: /* 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 43019 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1746: /* $@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 43031 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1747: /* 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 43040 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1748: /* 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 43053 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1749: /* 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 43068 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1750: /* 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 43081 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1755: /* json_opt_on_empty_or_error: %empty */
#line 11442 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 43087 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1760: /* 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 43095 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1761: /* 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 43103 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1762: /* 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 43114 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1763: /* 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 43122 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1764: /* 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 43130 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1765: /* $@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 43140 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1766: /* $@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 43157 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1767: /* 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 43185 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1768: /* esc_table_ref: table_ref */
#line 11535 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)=(yyvsp[0].table_list); }
#line 43191 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1769: /* esc_table_ref: '{' ident table_ref '}' */
#line 11536 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)=(yyvsp[-1].table_list); }
#line 43197 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1770: /* 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 43206 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1771: /* 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 43215 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1772: /* 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 43225 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1773: /* $@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 43239 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1774: /* 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 43250 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1775: /* $@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 43260 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1776: /* 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 43270 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1777: /* 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 43282 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1778: /* $@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 43296 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1779: /* 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 43308 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1780: /* $@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 43318 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1781: /* 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 43328 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1782: /* 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 43341 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1783: /* $@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 43355 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1784: /* 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 43368 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1785: /* $@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 43378 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1786: /* 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 43389 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1787: /* 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 43403 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1788: /* inner_join: JOIN_SYM */
#line 11697 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 0; }
#line 43409 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1789: /* inner_join: INNER_SYM JOIN_SYM */
#line 11698 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 0; }
#line 43415 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1790: /* inner_join: STRAIGHT_JOIN */
#line 11699 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 1; }
#line 43421 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1791: /* normal_join: inner_join */
#line 11703 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = (yyvsp[0].num); }
#line 43427 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1792: /* normal_join: CROSS JOIN_SYM */
#line 11704 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 0; }
#line 43433 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1793: /* opt_use_partition: %empty */
#line 11712 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.string_list)= 0;}
#line 43439 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1795: /* 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 43449 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1796: /* table_factor: table_primary_ident_opt_parens */
#line 11726 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)= (yyvsp[0].table_list); }
#line 43455 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1797: /* table_factor: table_primary_derived_opt_parens */
#line 11727 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)= (yyvsp[0].table_list); }
#line 43461 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1798: /* 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 43470 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1799: /* table_factor: table_reference_list_parens */
#line 11733 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)= (yyvsp[0].table_list); }
#line 43476 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1800: /* table_factor: table_function */
#line 11734 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)= (yyvsp[0].table_list); }
#line 43482 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1801: /* 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 43488 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1802: /* 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 43494 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1803: /* 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 43500 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1804: /* 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 43506 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1805: /* 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 43512 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1806: /* 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 43521 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1807: /* 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 43533 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1808: /* 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 43542 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1809: /* join_table_parens: '(' join_table_parens ')' */
#line 11773 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)= (yyvsp[-1].table_list); }
#line 43548 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1810: /* 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 43561 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1811: /* 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 43577 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1812: /* 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 43586 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1813: /* opt_outer: %empty */
#line 11822 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 43592 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1814: /* opt_outer: OUTER */
#line 11823 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 43598 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1815: /* 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 43607 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1816: /* index_hint_clause: FOR_SYM JOIN_SYM */
#line 11832 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= INDEX_HINT_MASK_JOIN; }
#line 43613 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1817: /* index_hint_clause: FOR_SYM ORDER_SYM BY */
#line 11833 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= INDEX_HINT_MASK_ORDER; }
#line 43619 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1818: /* index_hint_clause: FOR_SYM GROUP_SYM BY */
#line 11834 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= INDEX_HINT_MASK_GROUP; }
#line 43625 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1819: /* index_hint_type: FORCE_SYM */
#line 11838 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.index_hint)= INDEX_HINT_FORCE; }
#line 43631 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1820: /* index_hint_type: IGNORE_SYM */
#line 11839 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.index_hint)= INDEX_HINT_IGNORE; }
#line 43637 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1821: /* $@161: %empty */
#line 11844 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->set_index_hint_type((yyvsp[-2].index_hint), (yyvsp[0].num));
}
#line 43645 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1823: /* $@162: %empty */
#line 11849 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->set_index_hint_type(INDEX_HINT_USE, (yyvsp[0].num));
}
#line 43653 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1828: /* $@163: %empty */
#line 11862 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->alloc_index_hints(thd); }
#line 43659 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1830: /* $@164: %empty */
#line 11866 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->clear_index_hints(); }
#line 43665 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1832: /* opt_key_usage_list: %empty */
#line 11871 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->add_index_hint(thd, NULL, 0); }
#line 43671 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1833: /* opt_key_usage_list: key_usage_list */
#line 11872 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 43677 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1834: /* 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 43683 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1835: /* key_usage_element: PRIMARY_SYM */
#line 11879 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->add_index_hint(thd, "PRIMARY", 7); }
#line 43689 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1838: /* 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 43704 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1839: /* 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 43719 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1840: /* interval: interval_time_stamp */
#line 11913 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 43725 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1841: /* interval: DAY_HOUR_SYM */
#line 11914 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_DAY_HOUR; }
#line 43731 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1842: /* interval: DAY_MICROSECOND_SYM */
#line 11915 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_DAY_MICROSECOND; }
#line 43737 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1843: /* interval: DAY_MINUTE_SYM */
#line 11916 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_DAY_MINUTE; }
#line 43743 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1844: /* interval: DAY_SECOND_SYM */
#line 11917 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_DAY_SECOND; }
#line 43749 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1845: /* interval: HOUR_MICROSECOND_SYM */
#line 11918 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_HOUR_MICROSECOND; }
#line 43755 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1846: /* interval: HOUR_MINUTE_SYM */
#line 11919 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_HOUR_MINUTE; }
#line 43761 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1847: /* interval: HOUR_SECOND_SYM */
#line 11920 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_HOUR_SECOND; }
#line 43767 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1848: /* interval: MINUTE_MICROSECOND_SYM */
#line 11921 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_MINUTE_MICROSECOND; }
#line 43773 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1849: /* interval: MINUTE_SECOND_SYM */
#line 11922 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_MINUTE_SECOND; }
#line 43779 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1850: /* interval: SECOND_MICROSECOND_SYM */
#line 11923 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_SECOND_MICROSECOND; }
#line 43785 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1851: /* interval: YEAR_MONTH_SYM */
#line 11924 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_YEAR_MONTH; }
#line 43791 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1852: /* interval_time_stamp: DAY_SYM */
#line 11928 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval_time_st)=INTERVAL_DAY; }
#line 43797 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1853: /* interval_time_stamp: WEEK_SYM */
#line 11929 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval_time_st)=INTERVAL_WEEK; }
#line 43803 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1854: /* interval_time_stamp: HOUR_SYM */
#line 11930 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval_time_st)=INTERVAL_HOUR; }
#line 43809 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1855: /* interval_time_stamp: MINUTE_SYM */
#line 11931 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval_time_st)=INTERVAL_MINUTE; }
#line 43815 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1856: /* interval_time_stamp: MONTH_SYM */
#line 11932 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval_time_st)=INTERVAL_MONTH; }
#line 43821 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1857: /* interval_time_stamp: QUARTER_SYM */
#line 11933 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval_time_st)=INTERVAL_QUARTER; }
#line 43827 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1858: /* interval_time_stamp: SECOND_SYM */
#line 11934 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval_time_st)=INTERVAL_SECOND; }
#line 43833 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1859: /* interval_time_stamp: MICROSECOND_SYM */
#line 11935 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval_time_st)=INTERVAL_MICROSECOND; }
#line 43839 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1860: /* interval_time_stamp: YEAR_SYM */
#line 11936 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval_time_st)=INTERVAL_YEAR; }
#line 43845 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1861: /* date_time_type: DATE_SYM */
#line 11940 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.date_time_type)=MYSQL_TIMESTAMP_DATE;}
#line 43851 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1862: /* date_time_type: TIME_SYM */
#line 11941 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.date_time_type)=MYSQL_TIMESTAMP_TIME;}
#line 43857 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1863: /* date_time_type: DATETIME */
#line 11942 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.date_time_type)=MYSQL_TIMESTAMP_DATETIME;}
#line 43863 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1864: /* date_time_type: TIMESTAMP */
#line 11943 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.date_time_type)=MYSQL_TIMESTAMP_DATETIME;}
#line 43869 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1868: /* opt_table_alias_clause: %empty */
#line 11953 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str_ptr)=0; }
#line 43875 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1869: /* 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 43881 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1870: /* 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 43891 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1873: /* opt_where_clause: %empty */
#line 11972 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->where= 0; }
#line 43897 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1874: /* $@165: %empty */
#line 11974 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->parsing_place= IN_WHERE;
}
#line 43905 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1875: /* 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 43917 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1877: /* $@166: %empty */
#line 11990 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->parsing_place= IN_HAVING;
}
#line 43925 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1878: /* 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 43937 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1881: /* 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 43946 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1882: /* 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 43955 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1883: /* olap_opt: %empty */
#line 12026 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 43961 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1884: /* 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 43982 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1885: /* 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 44001 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1886: /* opt_window_clause: %empty */
#line 12067 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44007 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1887: /* opt_window_clause: WINDOW_SYM window_def_list */
#line 12070 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44013 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1890: /* 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 44026 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1891: /* $@167: %empty */
#line 12092 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->prepare_add_window_spec(thd); }
#line 44032 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1892: /* 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 44038 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1893: /* opt_window_ref: %empty */
#line 12100 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44044 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1894: /* 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 44054 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1895: /* opt_window_partition_clause: %empty */
#line 12110 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 44060 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1897: /* opt_window_order_clause: %empty */
#line 12115 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 44066 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1898: /* 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 44072 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1899: /* opt_window_frame_clause: %empty */
#line 12120 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44078 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1900: /* 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 44093 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1901: /* window_frame_units: ROWS_SYM */
#line 12135 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.frame_units)= Window_frame::UNITS_ROWS; }
#line 44099 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1902: /* window_frame_units: RANGE_SYM */
#line 12136 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.frame_units)= Window_frame::UNITS_RANGE; }
#line 44105 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1903: /* 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 44119 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1904: /* 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 44129 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1905: /* 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 44140 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1906: /* 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 44151 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1907: /* 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 44162 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1908: /* 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 44168 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1909: /* 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 44179 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1910: /* 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 44190 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1911: /* opt_window_frame_exclusion: %empty */
#line 12201 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.frame_exclusion)= Window_frame::EXCL_NONE; }
#line 44196 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1912: /* 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 44202 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1913: /* 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 44208 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1914: /* 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 44214 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1915: /* 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 44220 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1916: /* 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 44226 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1920: /* 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 44236 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1921: /* opt_order_clause: %empty */
#line 12242 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_order)= NULL; }
#line 44242 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1922: /* opt_order_clause: order_clause */
#line 12244 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_order)= (yyvsp[0].select_order); }
#line 44248 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1923: /* $@168: %empty */
#line 12249 "/home/buildbot/git/sql/sql_yacc.yy"
{
thd->where= "ORDER clause";
}
#line 44256 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1924: /* 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 44264 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1925: /* 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 44274 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1926: /* 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 44284 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1927: /* order_dir: %empty */
#line 12274 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 44290 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1928: /* order_dir: ASC */
#line 12275 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 44296 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1929: /* order_dir: DESC */
#line 12276 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 44302 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1930: /* opt_limit_clause: %empty */
#line 12282 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_limit).clear(); }
#line 44308 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1931: /* opt_limit_clause: limit_clause */
#line 12284 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_limit)= (yyvsp[0].select_limit); }
#line 44314 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1932: /* 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 44325 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1933: /* 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 44334 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1934: /* 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 44343 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1935: /* 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 44355 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1936: /* 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 44369 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1937: /* 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 44383 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1938: /* 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 44394 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1939: /* 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 44405 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1940: /* 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 44416 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1945: /* only_or_with_ties: ONLY_SYM */
#line 12373 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 44422 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1946: /* only_or_with_ties: WITH TIES_SYM */
#line 12374 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 44428 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1947: /* opt_global_limit_clause: opt_limit_clause */
#line 12380 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->limit_params= (yyvsp[0].select_limit);
}
#line 44436 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1948: /* 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 44447 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1949: /* 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 44458 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1950: /* 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 44469 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1951: /* 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 44478 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1952: /* 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 44487 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1953: /* limit_option: param_marker */
#line 12421 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[0].item_param)->limit_clause_param= TRUE;
}
#line 44495 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1954: /* 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 44505 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1955: /* 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 44515 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1956: /* 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 44525 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1957: /* limit_rows_option: limit_option */
#line 12446 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->limit_rows_examined= (yyvsp[0].item);
}
#line 44533 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1958: /* 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 44542 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1959: /* 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 44553 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1960: /* delete_limit_clause: LIMIT ROWS_SYM EXAMINED_SYM */
#line 12464 "/home/buildbot/git/sql/sql_yacc.yy"
{ thd->parse_error(); MYSQL_YYABORT; }
#line 44559 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1961: /* 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 44565 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1962: /* 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 44574 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1963: /* 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 44583 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1964: /* 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 44596 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1965: /* opt_order_limit_lock: %empty */
#line 12492 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->pop_select();
(yyval.order_limit_lock)= NULL;
}
#line 44605 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1966: /* 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 44611 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1969: /* opt_procedure_or_into: %empty */
#line 12509 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lock).empty();
}
#line 44619 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1970: /* 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 44627 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1971: /* 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 44641 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1972: /* 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 44653 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1973: /* 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 44665 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1976: /* 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 44671 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1977: /* 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 44677 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1978: /* 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 44683 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1979: /* 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 44689 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1980: /* 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 44695 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1981: /* 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 44701 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1982: /* 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 44707 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1983: /* 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 44713 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1984: /* 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 44719 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1985: /* 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 44725 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1986: /* 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 44731 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1987: /* 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 44737 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1988: /* real_ulong_num: dec_num_error */
#line 12573 "/home/buildbot/git/sql/sql_yacc.yy"
{ MYSQL_YYABORT; }
#line 44743 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1989: /* 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 44749 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1990: /* 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 44755 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1991: /* 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 44761 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1992: /* 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 44767 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1993: /* 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 44773 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1994: /* 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 44779 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1995: /* 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 44785 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1996: /* 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 44791 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1997: /* 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 44797 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1998: /* 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 44803 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1999: /* 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 44809 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2000: /* 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 44815 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2001: /* 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 44821 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2002: /* real_ulonglong_num: dec_num_error */
#line 12596 "/home/buildbot/git/sql/sql_yacc.yy"
{ MYSQL_YYABORT; }
#line 44827 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2003: /* dec_num_error: dec_num */
#line 12601 "/home/buildbot/git/sql/sql_yacc.yy"
{ thd->parse_error(ER_ONLY_INTEGERS_ALLOWED); }
#line 44833 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2006: /* 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 44839 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2007: /* choice: DEFAULT */
#line 12611 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.choice)= HA_CHOICE_UNDEF; }
#line 44845 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2008: /* bool: ulong_num */
#line 12615 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= (yyvsp[0].ulong_num) != 0; }
#line 44851 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2009: /* bool: TRUE_SYM */
#line 12616 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 1; }
#line 44857 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2010: /* bool: FALSE_SYM */
#line 12617 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 0; }
#line 44863 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2011: /* $@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 44891 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2012: /* 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 44900 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2013: /* procedure_list: %empty */
#line 12653 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44906 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2014: /* procedure_list: procedure_list2 */
#line 12654 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44912 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2017: /* 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 44923 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2018: /* $@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 44935 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2019: /* select_var_list_init: $@170 select_var_list */
#line 12681 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44941 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2021: /* select_var_list: select_var_ident */
#line 12686 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44947 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2022: /* 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 44968 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2023: /* 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 44982 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2024: /* 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 44991 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2025: /* 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 45000 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2026: /* into: INTO into_destination */
#line 12733 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 45006 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2027: /* $@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 45021 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2028: /* $@172: %empty */
#line 12749 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->exchange->cs= (yyvsp[0].charset); }
#line 45027 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2030: /* 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 45046 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2031: /* into_destination: select_var_list_init */
#line 12767 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
}
#line 45054 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2032: /* $@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 45066 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2033: /* 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 45077 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2034: /* $@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 45088 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2035: /* 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 45094 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2036: /* $@175: %empty */
#line 12809 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->main_select_push())
MYSQL_YYABORT;
}
#line 45103 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2037: /* 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 45125 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2038: /* 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 45135 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2039: /* 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 45143 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2040: /* 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 45151 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2041: /* $@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 45162 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2042: /* drop: DROP VIEW_SYM opt_if_exists $@176 table_list opt_restrict */
#line 12853 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 45168 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2043: /* 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 45177 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2044: /* 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 45187 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2045: /* 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 45196 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2046: /* $@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 45208 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2047: /* drop: DROP opt_temporary SEQUENCE_SYM opt_if_exists $@177 table_list */
#line 12880 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 45214 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2051: /* 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 45227 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2052: /* 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 45241 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2055: /* 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 45255 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2056: /* opt_if_exists_table_element: %empty */
#line 12934 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->check_exists= FALSE;
(yyval.num)= 0;
}
#line 45264 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2057: /* 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 45273 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2058: /* opt_if_exists: %empty */
#line 12947 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.object_ddl_options).set(DDL_options_st::OPT_NONE);
}
#line 45281 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2059: /* 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 45289 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2060: /* opt_temporary: %empty */
#line 12957 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 45295 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2061: /* opt_temporary: TEMPORARY */
#line 12958 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= HA_LEX_CREATE_TMP_TABLE; }
#line 45301 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2062: /* $@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 45312 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2063: /* $@179: %empty */
#line 12973 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->set_lock_for_tables((yyvsp[-3].lock_type), true, false);
}
#line 45320 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2064: /* 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 45329 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2065: /* $@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 45340 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2066: /* $@181: %empty */
#line 12993 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->set_lock_for_tables((yyvsp[-2].lock_type), true, false);
}
#line 45348 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2067: /* 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 45357 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2068: /* 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 45369 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2069: /* 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 45379 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2070: /* 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 45392 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2072: /* insert_lock_option: HIGH_PRIORITY */
#line 13031 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lock_type)= TL_WRITE; }
#line 45398 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2073: /* replace_lock_option: %empty */
#line 13035 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lock_type)= TL_WRITE_DEFAULT; }
#line 45404 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2075: /* insert_replace_option: LOW_PRIORITY */
#line 13040 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; }
#line 45410 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2076: /* 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 45420 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2079: /* $@182: %empty */
#line 13052 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->save_parsing_place= Select->parsing_place;
}
#line 45428 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2080: /* 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 45439 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2081: /* insert_field_spec: insert_values */
#line 13065 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 45445 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2082: /* insert_field_spec: insert_field_list insert_values */
#line 13066 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 45451 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2083: /* $@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 45464 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2085: /* 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 45472 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2088: /* 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 45478 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2089: /* fields: insert_ident */
#line 13094 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); }
#line 45484 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2090: /* insert_values: create_select_query_expression */
#line 13100 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 45490 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2095: /* 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 45501 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2096: /* equal: '=' */
#line 13124 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 45507 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2097: /* equal: SET_VAR */
#line 13125 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 45513 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2098: /* opt_equal: %empty */
#line 13129 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 45519 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2099: /* opt_equal: equal */
#line 13130 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 45525 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2100: /* opt_with: opt_equal */
#line 13134 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 45531 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2101: /* opt_with: WITH */
#line 13135 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 45537 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2102: /* opt_by: opt_equal */
#line 13139 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 45543 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2103: /* opt_by: BY */
#line 13140 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 45549 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2104: /* $@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 45558 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2105: /* 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 45570 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2106: /* $@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 45579 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2107: /* 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 45591 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2108: /* opt_values: %empty */
#line 13176 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 45597 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2110: /* opt_values_with_names: %empty */
#line 13181 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 45603 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2112: /* 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 45612 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2113: /* 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 45621 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2114: /* 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 45633 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2115: /* 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 45645 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2116: /* expr_or_ignore: expr */
#line 13218 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)= (yyvsp[0].item);}
#line 45651 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2117: /* 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 45661 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2118: /* expr_or_ignore_or_default: expr_or_ignore */
#line 13228 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)= (yyvsp[0].item);}
#line 45667 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2119: /* 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 45677 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2121: /* $@186: %empty */
#line 13239 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->duplicates= DUP_UPDATE; }
#line 45683 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2122: /* $@187: %empty */
#line 13241 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->parsing_place= IN_UPDATE_ON_DUP_KEY;
}
#line 45691 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2123: /* 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 45699 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2124: /* 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 45714 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2125: /* update_table_list: join_table_list */
#line 13263 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)= (yyvsp[0].table_list); }
#line 45720 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2126: /* $@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 45733 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2127: /* $@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 45756 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2128: /* $@190: %empty */
#line 13299 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyvsp[-1].select_order))
Select->order_list= *((yyvsp[-1].select_order));
}
#line 45765 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2129: /* 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 45771 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2132: /* 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 45782 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2133: /* 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 45791 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2136: /* 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 45802 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2137: /* opt_low_priority: %empty */
#line 13341 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lock_type)= TL_WRITE_DEFAULT; }
#line 45808 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2138: /* opt_low_priority: LOW_PRIORITY */
#line 13342 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; }
#line 45814 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2139: /* $@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 45830 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2140: /* 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 45839 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2141: /* opt_delete_system_time: %empty */
#line 13369 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->vers_conditions.init(SYSTEM_TIME_HISTORY);
}
#line 45847 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2142: /* 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 45855 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2143: /* delete_part2: opt_delete_options single_multi */
#line 13379 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 45861 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2144: /* 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 45872 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2145: /* 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 45888 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2146: /* 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 45897 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2147: /* 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 45909 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2148: /* $@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 45919 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2149: /* $@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 45928 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2150: /* 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 45934 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2151: /* $@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 45944 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2152: /* $@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 45953 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2153: /* 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 45959 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2154: /* opt_returning: %empty */
#line 13451 "/home/buildbot/git/sql/sql_yacc.yy"
{
DBUG_ASSERT(!Lex->has_returning());
}
#line 45967 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2155: /* $@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 45997 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2156: /* 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 46006 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2159: /* 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 46025 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2160: /* 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 46044 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2161: /* opt_wild: %empty */
#line 13526 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46050 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2162: /* opt_wild: '.' '*' */
#line 13527 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46056 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2163: /* opt_delete_options: %empty */
#line 13531 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46062 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2164: /* opt_delete_options: opt_delete_option opt_delete_options */
#line 13532 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46068 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2165: /* opt_delete_option: QUICK */
#line 13536 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->options|= OPTION_QUICK; }
#line 46074 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2166: /* opt_delete_option: LOW_PRIORITY */
#line 13537 "/home/buildbot/git/sql/sql_yacc.yy"
{ YYPS->m_lock_type= TL_WRITE_LOW_PRIORITY; }
#line 46080 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2167: /* opt_delete_option: IGNORE_SYM */
#line 13538 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ignore= 1; }
#line 46086 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2168: /* $@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 46101 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2169: /* $@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 46113 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2170: /* 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 46119 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2177: /* profile_def: CPU_SYM */
#line 13579 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_options|= PROFILE_CPU;
}
#line 46127 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2178: /* profile_def: MEMORY_SYM */
#line 13583 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_options|= PROFILE_MEMORY;
}
#line 46135 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2179: /* profile_def: BLOCK_SYM IO_SYM */
#line 13587 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_options|= PROFILE_BLOCK_IO;
}
#line 46143 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2180: /* profile_def: CONTEXT_SYM SWITCHES_SYM */
#line 13591 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_options|= PROFILE_CONTEXT;
}
#line 46151 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2181: /* profile_def: PAGE_SYM FAULTS_SYM */
#line 13595 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_options|= PROFILE_PAGE_FAULTS;
}
#line 46159 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2182: /* profile_def: IPC_SYM */
#line 13599 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_options|= PROFILE_IPC;
}
#line 46167 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2183: /* profile_def: SWAPS_SYM */
#line 13603 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_options|= PROFILE_SWAPS;
}
#line 46175 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2184: /* profile_def: SOURCE_SYM */
#line 13607 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_options|= PROFILE_SOURCE;
}
#line 46183 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2185: /* profile_def: ALL */
#line 13611 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_options|= PROFILE_ALL;
}
#line 46191 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2186: /* opt_profile_args: %empty */
#line 13618 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_query_id= 0;
}
#line 46199 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2187: /* 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 46207 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2188: /* $@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 46222 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2189: /* 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 46231 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2190: /* 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 46242 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2191: /* 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 46254 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2192: /* 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 46266 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2193: /* 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 46278 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2194: /* 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 46290 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2195: /* 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 46302 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2196: /* 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 46313 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2197: /* 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 46324 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2198: /* 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 46334 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2199: /* 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 46340 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2200: /* show_param: ENGINE_SYM ALL show_engine_param */
#line 13719 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->create_info.db_type= NULL; }
#line 46346 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2201: /* 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 46359 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2202: /* show_param: master_or_binary LOGS_SYM */
#line 13730 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_SHOW_BINLOGS;
}
#line 46367 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2203: /* show_param: SLAVE HOSTS_SYM */
#line 13734 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_SHOW_SLAVE_HOSTS;
}
#line 46375 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2204: /* $@200: %empty */
#line 13738 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_BINLOG_EVENTS;
}
#line 46384 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2206: /* $@201: %empty */
#line 13744 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_RELAYLOG_EVENTS;
}
#line 46393 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2207: /* 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 46399 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2208: /* 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 46412 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2209: /* 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 46423 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2210: /* show_param: AUTHORS_SYM */
#line 13767 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_SHOW_AUTHORS;
}
#line 46432 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2211: /* show_param: CONTRIBUTORS_SYM */
#line 13772 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_SHOW_CONTRIBUTORS;
}
#line 46441 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2212: /* show_param: PRIVILEGES */
#line 13777 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_SHOW_PRIVILEGES;
}
#line 46450 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2213: /* 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 46459 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2214: /* 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 46468 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2215: /* show_param: WARNINGS opt_global_limit_clause */
#line 13792 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->sql_command = SQLCOM_SHOW_WARNS;}
#line 46474 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2216: /* show_param: ERRORS opt_global_limit_clause */
#line 13794 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->sql_command = SQLCOM_SHOW_ERRORS;}
#line 46480 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2217: /* show_param: PROFILES_SYM */
#line 13796 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->sql_command = SQLCOM_SHOW_PROFILES; }
#line 46486 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2218: /* 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 46497 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2219: /* 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 46509 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2220: /* show_param: opt_full PROCESSLIST_SYM */
#line 13813 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->sql_command= SQLCOM_SHOW_PROCESSLIST;}
#line 46515 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2221: /* 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 46527 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2222: /* 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 46538 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2223: /* 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 46549 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2224: /* 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 46561 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2225: /* 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 46571 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2226: /* 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 46580 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2227: /* 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 46592 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2228: /* 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 46604 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2229: /* 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 46616 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2230: /* show_param: BINLOG_SYM STATUS_SYM */
#line 13880 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_SHOW_BINLOG_STAT;
}
#line 46624 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2231: /* show_param: MASTER_SYM STATUS_SYM */
#line 13884 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_SHOW_BINLOG_STAT;
}
#line 46632 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2232: /* 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 46643 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2233: /* 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 46654 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2234: /* 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 46665 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2235: /* 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 46676 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2236: /* 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 46686 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2237: /* 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 46696 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2238: /* 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 46706 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2239: /* 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 46716 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2240: /* 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 46726 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2241: /* 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 46738 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2242: /* 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 46747 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2243: /* 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 46758 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2244: /* 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 46769 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2245: /* 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 46780 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2246: /* 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 46791 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2247: /* 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 46802 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2248: /* 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 46813 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2249: /* 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 46822 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2250: /* 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 46831 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2251: /* 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 46840 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2252: /* 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 46849 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2253: /* 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 46858 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2254: /* 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 46870 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2255: /* 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 46882 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2256: /* 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 46905 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2257: /* show_engine_param: STATUS_SYM */
#line 14068 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->sql_command= SQLCOM_SHOW_ENGINE_STATUS; }
#line 46911 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2258: /* show_engine_param: MUTEX_SYM */
#line 14070 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->sql_command= SQLCOM_SHOW_ENGINE_MUTEX; }
#line 46917 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2259: /* show_engine_param: LOGS_SYM */
#line 14072 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->sql_command= SQLCOM_SHOW_ENGINE_LOGS; }
#line 46923 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2264: /* opt_db: %empty */
#line 14086 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= null_clex_str; }
#line 46929 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2265: /* opt_db: from_or_in ident */
#line 14087 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= (yyvsp[0].ident_sys); }
#line 46935 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2266: /* opt_full: %empty */
#line 14091 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->verbose=0; }
#line 46941 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2267: /* opt_full: FULL */
#line 14092 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->verbose=1; }
#line 46947 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2270: /* binlog_in: %empty */
#line 14101 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->mi.log_file_name = 0; }
#line 46953 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2271: /* 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 46959 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2272: /* binlog_from: %empty */
#line 14106 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->mi.pos = 4; /* skip magic number */ }
#line 46965 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2273: /* binlog_from: FROM ulonglong_num */
#line 14107 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->mi.pos = (yyvsp[0].ulonglong_number); }
#line 46971 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2274: /* wild_and_where: %empty */
#line 14111 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.simple_string)= 0; }
#line 46977 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2275: /* 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 46990 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2276: /* 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 47001 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2277: /* $@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 47018 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2278: /* 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 47027 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2279: /* $@203: %empty */
#line 14151 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->describe|= DESCRIBE_NORMAL; }
#line 47033 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2280: /* 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 47042 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2289: /* analyze_stmt_command: ANALYZE_SYM opt_format_json explainable_command */
#line 14175 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->analyze_stmt= true;
}
#line 47050 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2290: /* opt_extended_describe: EXTENDED_SYM */
#line 14181 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->describe|= DESCRIBE_EXTENDED; }
#line 47056 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2291: /* opt_extended_describe: EXTENDED_SYM ALL */
#line 14183 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->describe|= DESCRIBE_EXTENDED | DESCRIBE_EXTENDED2; }
#line 47062 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2292: /* opt_extended_describe: PARTITIONS_SYM */
#line 14184 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->describe|= DESCRIBE_PARTITIONS; }
#line 47068 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2293: /* opt_extended_describe: opt_format_json */
#line 14185 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47074 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2294: /* opt_format_json: %empty */
#line 14189 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47080 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2295: /* 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 47094 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2296: /* opt_describe_column: %empty */
#line 14203 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47100 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2297: /* opt_describe_column: text_string */
#line 14204 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->wild= (yyvsp[0].string); }
#line 47106 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2298: /* 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 47118 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2299: /* 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 47140 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2300: /* $@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 47151 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2301: /* flush: FLUSH_SYM opt_no_write_to_binlog $@204 flush_options */
#line 14251 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47157 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2302: /* $@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 47171 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2303: /* flush_options: table_or_tables $@205 opt_table_list opt_flush_lock */
#line 14266 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47177 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2304: /* flush_options: flush_options_list */
#line 14268 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47183 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2305: /* opt_flush_lock: %empty */
#line 14272 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47189 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2306: /* 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 47203 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2307: /* 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 47209 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2308: /* $@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 47223 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2309: /* flush_lock: FOR_SYM $@206 EXPORT_SYM */
#line 14297 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47229 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2311: /* flush_options_list: flush_option */
#line 14303 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47235 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2312: /* flush_option: ERROR_SYM LOGS_SYM */
#line 14308 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_ERROR_LOG; }
#line 47241 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2313: /* flush_option: ENGINE_SYM LOGS_SYM */
#line 14310 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_ENGINE_LOG; }
#line 47247 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2314: /* flush_option: GENERAL LOGS_SYM */
#line 14312 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_GENERAL_LOG; }
#line 47253 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2315: /* flush_option: SLOW LOGS_SYM */
#line 14314 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_SLOW_LOG; }
#line 47259 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2316: /* flush_option: BINARY LOGS_SYM opt_delete_gtid_domain */
#line 14316 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_BINARY_LOG; }
#line 47265 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2317: /* 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 47277 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2318: /* flush_option: QUERY_SYM CACHE_SYM */
#line 14326 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_QUERY_CACHE_FREE; }
#line 47283 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2319: /* flush_option: HOSTS_SYM */
#line 14328 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_HOSTS; }
#line 47289 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2320: /* flush_option: PRIVILEGES */
#line 14330 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_GRANT; }
#line 47295 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2321: /* 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 47304 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2322: /* flush_option: STATUS_SYM */
#line 14337 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_STATUS; }
#line 47310 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2323: /* 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 47322 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2324: /* flush_option: MASTER_SYM */
#line 14347 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_MASTER; }
#line 47328 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2325: /* flush_option: DES_KEY_FILE */
#line 14349 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_DES_KEY_FILE; }
#line 47334 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2326: /* flush_option: RESOURCES */
#line 14351 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_USER_RESOURCES; }
#line 47340 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2327: /* flush_option: SSL_SYM */
#line 14353 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_SSL;}
#line 47346 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2328: /* flush_option: THREADS_SYM */
#line 14355 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_THREADS;}
#line 47352 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2329: /* 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 47370 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2330: /* opt_table_list: %empty */
#line 14373 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47376 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2331: /* opt_table_list: table_list */
#line 14374 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47382 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2332: /* backup: BACKUP_SYM backup_statements */
#line 14378 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47388 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2333: /* 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 47404 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2334: /* $@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 47415 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2335: /* 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 47427 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2336: /* 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 47438 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2337: /* opt_delete_gtid_domain: %empty */
#line 14419 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47444 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2338: /* opt_delete_gtid_domain: DELETE_DOMAIN_ID_SYM '=' '(' delete_domain_id_list ')' */
#line 14421 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47450 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2342: /* 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 47467 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2343: /* optional_flush_tables_arguments: %empty */
#line 14446 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.num)= 0;}
#line 47473 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2344: /* optional_flush_tables_arguments: AND_SYM DISABLE_SYM CHECKPOINT_SYM */
#line 14447 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.num)= REFRESH_CHECKPOINT; }
#line 47479 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2345: /* $@208: %empty */
#line 14452 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_RESET; lex->type=0;
}
#line 47488 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2346: /* reset: RESET_SYM $@208 reset_options */
#line 14457 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47494 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2349: /* $@209: %empty */
#line 14466 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_SLAVE; }
#line 47500 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2350: /* reset_option: SLAVE $@209 optional_connection_name slave_reset_options optional_for_channel */
#line 14469 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 47506 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2351: /* $@210: %empty */
#line 14471 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->type|= REFRESH_MASTER;
Lex->next_binlog_file_number= 0;
}
#line 47515 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2353: /* reset_option: QUERY_SYM CACHE_SYM */
#line 14476 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_QUERY_CACHE;}
#line 47521 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2354: /* slave_reset_options: %empty */
#line 14480 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->reset_slave_info.all= false; }
#line 47527 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2355: /* slave_reset_options: ALL */
#line 14481 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->reset_slave_info.all= true; }
#line 47533 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2356: /* master_reset_options: %empty */
#line 14485 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47539 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2357: /* 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 47547 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2358: /* 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 47555 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2359: /* $@211: %empty */
#line 14498 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->clause_that_disallows_subselect= "PURGE..BEFORE"; }
#line 47561 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2360: /* 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 47571 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2361: /* $@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 47583 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2362: /* 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 47591 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2363: /* kill_type: %empty */
#line 14526 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= (int) KILL_HARD_BIT; }
#line 47597 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2364: /* kill_type: HARD_SYM */
#line 14527 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= (int) KILL_HARD_BIT; }
#line 47603 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2365: /* kill_type: SOFT_SYM */
#line 14528 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 47609 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2366: /* kill_option: opt_connection kill_expr */
#line 14532 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= (int) KILL_CONNECTION; }
#line 47615 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2367: /* kill_option: QUERY_SYM kill_expr */
#line 14533 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= (int) KILL_QUERY; }
#line 47621 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2368: /* 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 47631 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2369: /* opt_connection: %empty */
#line 14543 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 47637 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2370: /* opt_connection: CONNECTION_SYM */
#line 14544 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 47643 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2371: /* kill_expr: expr */
#line 14549 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->value_list.push_front((yyval.item), thd->mem_root);
}
#line 47651 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2372: /* 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 47660 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2373: /* $@213: %empty */
#line 14560 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->sql_command= SQLCOM_SHUTDOWN; }
#line 47666 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2374: /* shutdown: SHUTDOWN $@213 shutdown_option */
#line 14561 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47672 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2375: /* shutdown_option: %empty */
#line 14565 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->is_shutdown_wait_for_slaves= false; }
#line 47678 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2376: /* 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 47686 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2377: /* 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 47696 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2378: /* $@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 47714 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2379: /* $@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 47729 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2380: /* $@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 47746 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2381: /* $@217: %empty */
#line 14625 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->exchange->cs= (yyvsp[0].charset); }
#line 47752 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2382: /* 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 47760 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2383: /* data_or_xml: DATA_SYM */
#line 14636 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.filetype)= FILETYPE_CSV; }
#line 47766 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2384: /* data_or_xml: XML_SYM */
#line 14637 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.filetype)= FILETYPE_XML; }
#line 47772 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2385: /* opt_local: %empty */
#line 14641 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)=0;}
#line 47778 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2386: /* opt_local: LOCAL_SYM */
#line 14642 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)=1;}
#line 47784 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2387: /* load_data_lock: %empty */
#line 14646 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lock_type)= TL_WRITE_DEFAULT; }
#line 47790 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2388: /* 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 47802 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2389: /* load_data_lock: LOW_PRIORITY */
#line 14655 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; }
#line 47808 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2390: /* opt_duplicate: %empty */
#line 14659 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->duplicates=DUP_ERROR; }
#line 47814 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2391: /* opt_duplicate: REPLACE */
#line 14660 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->duplicates=DUP_REPLACE; }
#line 47820 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2392: /* opt_duplicate: IGNORE_SYM */
#line 14661 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ignore= 1; }
#line 47826 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2397: /* 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 47835 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2398: /* 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 47846 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2399: /* 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 47855 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2400: /* 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 47864 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2405: /* 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 47873 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2406: /* 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 47882 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2407: /* opt_xml_rows_identified_by: %empty */
#line 14723 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 47888 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2408: /* 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 47894 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2410: /* 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 47903 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2411: /* lines_or_rows: LINES */
#line 14738 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 47909 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2412: /* lines_or_rows: ROWS_SYM */
#line 14739 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 47915 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2413: /* opt_field_or_var_spec: %empty */
#line 14743 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47921 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2414: /* opt_field_or_var_spec: '(' fields_or_vars ')' */
#line 14744 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47927 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2415: /* opt_field_or_var_spec: '(' ')' */
#line 14745 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47933 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2416: /* 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 47939 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2417: /* 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 47945 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2418: /* field_or_var: simple_ident_nospvar */
#line 14756 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.item)= (yyvsp[0].item);}
#line 47951 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2419: /* 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 47967 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2420: /* opt_load_data_set_spec: %empty */
#line 14772 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47973 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2421: /* opt_load_data_set_spec: SET load_data_set_list */
#line 14773 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47979 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2424: /* 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 47991 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2425: /* 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 48000 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2426: /* 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 48009 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2427: /* 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 48018 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2428: /* 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 48027 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2429: /* 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 48039 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2430: /* text_string: hex_or_bin_String */
#line 14826 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.string)= (yyvsp[0].string); }
#line 48045 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2431: /* 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 48057 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2432: /* 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 48069 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2433: /* 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 48085 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2434: /* 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 48096 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2435: /* 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 48106 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2436: /* 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 48117 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2437: /* signed_literal: '+' NUM_literal */
#line 14885 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item) = (yyvsp[0].item_num); }
#line 48123 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2438: /* 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 48132 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2439: /* literal: text_literal */
#line 14894 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item) = (yyvsp[0].item_basic_constant); }
#line 48138 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2440: /* literal: NUM_literal */
#line 14895 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item) = (yyvsp[0].item_num); }
#line 48144 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2441: /* literal: temporal_literal */
#line 14896 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)= (yyvsp[0].item); }
#line 48150 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2442: /* 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 48168 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2443: /* 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 48178 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2444: /* 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 48188 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2445: /* 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 48198 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2446: /* 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 48208 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2447: /* 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 48218 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2448: /* 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 48240 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2449: /* 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 48254 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2450: /* 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 48268 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2451: /* 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 48278 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2452: /* 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 48289 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2453: /* 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 48299 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2454: /* 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 48310 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2455: /* 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 48321 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2456: /* 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 48332 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2457: /* $@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 48352 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2458: /* 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 48361 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2459: /* opt_recursive: %empty */
#line 15054 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 48367 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2460: /* opt_recursive: RECURSIVE_SYM */
#line 15055 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 48373 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2463: /* 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 48395 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2464: /* opt_cycle: %empty */
#line 15090 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ident_sys_list)= NULL; }
#line 48401 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2465: /* $@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 48412 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2466: /* 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 48420 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2467: /* 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 48429 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2468: /* 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 48435 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2470: /* 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 48443 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2471: /* 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 48453 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2472: /* 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 48462 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2473: /* 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 48475 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2474: /* insert_ident: simple_ident_nospvar */
#line 15161 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)=(yyvsp[0].item); }
#line 48481 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2475: /* insert_ident: table_wild */
#line 15162 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)=(yyvsp[0].item); }
#line 48487 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2476: /* 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 48496 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2477: /* 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 48505 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2478: /* 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 48514 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2479: /* 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 48523 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2480: /* order_ident: expr */
#line 15192 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)=(yyvsp[0].item); }
#line 48529 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2481: /* 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 48538 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2482: /* 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 48547 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2483: /* 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 48557 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2484: /* 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 48566 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2485: /* 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 48575 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2486: /* 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 48584 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2487: /* 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 48593 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2488: /* 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 48602 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2489: /* 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 48612 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2490: /* 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 48621 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2491: /* field_ident: ident */
#line 15255 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].ident_sys);}
#line 48627 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2492: /* 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 48642 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2493: /* 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 48654 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2494: /* field_ident: '.' ident */
#line 15275 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].ident_sys);}
#line 48660 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2495: /* 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 48670 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2496: /* 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 48680 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2497: /* 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 48691 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2498: /* 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 48701 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2499: /* 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 48711 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2500: /* 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 48722 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2505: /* ident_cli: keyword_ident */
#line 15333 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ident_cli)= (yyvsp[0].kwd); }
#line 48728 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2506: /* 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 48737 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2509: /* 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 48743 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2510: /* 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 48749 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2511: /* 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 48758 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2512: /* 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 48767 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2513: /* 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 48776 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2514: /* 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 48785 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2516: /* 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 48794 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2517: /* ident_cli_set_usual_case: IDENT_cli */
#line 15394 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ident_cli)= (yyvsp[0].ident_cli); }
#line 48800 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2518: /* 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 48806 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2520: /* 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 48815 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2521: /* 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 48824 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2523: /* 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 48833 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2525: /* 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 48842 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2526: /* ident_or_text: ident */
#line 15432 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].ident_sys);}
#line 48848 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2527: /* ident_or_text: TEXT_STRING_sys */
#line 15433 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].lex_str);}
#line 48854 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2528: /* ident_or_text: LEX_HOSTNAME */
#line 15434 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].lex_str);}
#line 48860 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2529: /* 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 48875 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2530: /* 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 48908 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2531: /* 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 48919 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2534: /* 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 48929 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3262: /* $@220: %empty */
#line 16359 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->set_stmt_init();
}
#line 48938 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 48947 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 48957 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 48966 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3268: /* $@222: %empty */
#line 16385 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->option_type= (yyvsp[0].var_type);
}
#line 48974 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 48988 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 48997 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49006 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3280: /* $@225: %empty */
#line 16438 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->option_type= (yyvsp[0].var_type);
}
#line 49014 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3283: /* option_type: GLOBAL_SYM */
#line 16446 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.var_type)=OPT_GLOBAL; }
#line 49020 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3284: /* option_type: LOCAL_SYM */
#line 16447 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.var_type)=OPT_SESSION; }
#line 49026 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3285: /* option_type: SESSION_SYM */
#line 16448 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.var_type)=OPT_SESSION; }
#line 49032 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3286: /* opt_var_type: %empty */
#line 16452 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.var_type)=OPT_SESSION; }
#line 49038 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3287: /* opt_var_type: GLOBAL_SYM */
#line 16453 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.var_type)=OPT_GLOBAL; }
#line 49044 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3288: /* opt_var_type: LOCAL_SYM */
#line 16454 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.var_type)=OPT_SESSION; }
#line 49050 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3289: /* opt_var_type: SESSION_SYM */
#line 16455 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.var_type)=OPT_SESSION; }
#line 49056 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3290: /* opt_var_ident_type: %empty */
#line 16459 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.var_type)=OPT_DEFAULT; }
#line 49062 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49068 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49074 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49080 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3294: /* $@226: %empty */
#line 16471 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->main_select_push(false))
MYSQL_YYABORT;
}
#line 49089 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49101 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3296: /* $@227: %empty */
#line 16484 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->main_select_push(false))
MYSQL_YYABORT;
}
#line 49110 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49123 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3298: /* $@228: %empty */
#line 16498 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->main_select_push(false))
MYSQL_YYABORT;
}
#line 49132 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49143 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49152 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49164 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49173 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49185 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49194 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49204 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49213 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49225 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49234 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49246 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49255 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49266 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49281 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49291 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49300 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49310 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49319 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49329 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49338 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49348 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49370 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49385 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49396 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49408 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49434 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49454 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49469 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49478 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49490 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49499 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49509 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49518 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49528 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49548 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49567 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49573 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49579 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49585 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49591 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49597 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3344: /* isolation_types: SERIALIZABLE_SYM */
#line 16827 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.tx_isolation)= ISO_SERIALIZABLE; }
#line 49603 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49612 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49621 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49633 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3348: /* set_expr_or_default: expr */
#line 16853 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)=(yyvsp[0].item); }
#line 49639 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3349: /* set_expr_or_default: DEFAULT */
#line 16854 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)=0; }
#line 49645 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49655 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49665 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49675 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49687 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49693 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3355: /* opt_lock_wait_timeout: %empty */
#line 16892 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 49699 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49709 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49719 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3358: /* table_or_tables: TABLE_SYM */
#line 16908 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 49725 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3359: /* table_or_tables: TABLES */
#line 16909 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 49731 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49751 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3363: /* lock_option: READ_SYM */
#line 16937 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= TL_READ_NO_INSERT; }
#line 49757 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3364: /* lock_option: WRITE_SYM */
#line 16938 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= TL_WRITE_DEFAULT; }
#line 49763 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49771 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49777 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3367: /* lock_option: READ_SYM LOCAL_SYM */
#line 16945 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= TL_READ; }
#line 49783 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49795 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3369: /* unlock: UNLOCK_SYM $@243 table_or_tables */
#line 16958 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 49801 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3370: /* $@244: %empty */
#line 16967 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->main_select_push())
MYSQL_YYABORT;
}
#line 49810 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49818 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49831 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49844 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49866 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49892 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49898 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49904 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3378: /* handler_scan_function: FIRST_SYM */
#line 17044 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ha_read_mode = RFIRST; }
#line 49910 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3379: /* handler_scan_function: NEXT_SYM */
#line 17045 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ha_read_mode = RNEXT; }
#line 49916 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3380: /* handler_rkey_function: FIRST_SYM */
#line 17049 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ha_read_mode = RFIRST; }
#line 49922 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3381: /* handler_rkey_function: NEXT_SYM */
#line 17050 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ha_read_mode = RNEXT; }
#line 49928 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3382: /* handler_rkey_function: PREV_SYM */
#line 17051 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ha_read_mode = RPREV; }
#line 49934 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3383: /* handler_rkey_function: LAST_SYM */
#line 17052 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ha_read_mode = RLAST; }
#line 49940 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49952 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3385: /* handler_rkey_function: handler_rkey_mode $@246 '(' values ')' */
#line 17062 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 49958 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49964 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49970 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49976 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49982 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 49988 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3391: /* revoke: REVOKE clear_privileges revoke_command */
#line 17077 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 49994 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50003 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50012 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50020 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50029 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50039 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50045 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50051 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3399: /* grant: GRANT clear_privileges grant_command */
#line 17117 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 50057 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50066 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50075 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50084 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50096 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3404: /* opt_with_admin: %empty */
#line 17150 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->definer = 0; }
#line 50102 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50108 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3406: /* opt_with_admin_option: %empty */
#line 17155 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->with_admin_option= false; }
#line 50114 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50120 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50129 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50138 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50148 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50171 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50180 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50189 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50200 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50208 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50218 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50226 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3425: /* column_privilege: SELECT_SYM */
#line 17257 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= SELECT_ACL; }
#line 50232 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3426: /* column_privilege: INSERT */
#line 17258 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= INSERT_ACL; }
#line 50238 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3427: /* column_privilege: UPDATE_SYM */
#line 17259 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= UPDATE_ACL; }
#line 50244 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3428: /* column_privilege: REFERENCES */
#line 17260 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= REFERENCES_ACL; }
#line 50250 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3429: /* object_privilege: SELECT_SYM */
#line 17264 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= SELECT_ACL; }
#line 50256 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3430: /* object_privilege: INSERT */
#line 17265 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= INSERT_ACL; }
#line 50262 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3431: /* object_privilege: UPDATE_SYM */
#line 17266 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= UPDATE_ACL; }
#line 50268 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3432: /* object_privilege: REFERENCES */
#line 17267 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= REFERENCES_ACL; }
#line 50274 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3433: /* object_privilege: DELETE_SYM */
#line 17268 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= DELETE_ACL;}
#line 50280 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3434: /* object_privilege: USAGE */
#line 17269 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= NO_ACL; }
#line 50286 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3435: /* object_privilege: INDEX_SYM */
#line 17270 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= INDEX_ACL;}
#line 50292 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3436: /* object_privilege: ALTER */
#line 17271 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= ALTER_ACL;}
#line 50298 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3437: /* object_privilege: CREATE */
#line 17272 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= CREATE_ACL;}
#line 50304 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3438: /* object_privilege: DROP */
#line 17273 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= DROP_ACL;}
#line 50310 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3439: /* object_privilege: EXECUTE_SYM */
#line 17274 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= EXECUTE_ACL;}
#line 50316 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3440: /* object_privilege: RELOAD */
#line 17275 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= RELOAD_ACL;}
#line 50322 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3441: /* object_privilege: SHUTDOWN */
#line 17276 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= SHUTDOWN_ACL;}
#line 50328 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3442: /* object_privilege: PROCESS */
#line 17277 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= PROCESS_ACL;}
#line 50334 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3443: /* object_privilege: FILE_SYM */
#line 17278 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= FILE_ACL;}
#line 50340 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3444: /* object_privilege: GRANT OPTION */
#line 17279 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= GRANT_ACL;}
#line 50346 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3445: /* object_privilege: SHOW DATABASES */
#line 17280 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= SHOW_DB_ACL;}
#line 50352 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3446: /* object_privilege: SUPER_SYM */
#line 17281 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= SUPER_ACL;}
#line 50358 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3447: /* object_privilege: CREATE TEMPORARY TABLES */
#line 17282 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= CREATE_TMP_ACL;}
#line 50364 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3448: /* object_privilege: LOCK_SYM TABLES */
#line 17283 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= LOCK_TABLES_ACL; }
#line 50370 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3449: /* object_privilege: REPLICATION SLAVE */
#line 17284 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= REPL_SLAVE_ACL; }
#line 50376 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50382 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3451: /* object_privilege: CREATE VIEW_SYM */
#line 17286 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= CREATE_VIEW_ACL; }
#line 50388 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3452: /* object_privilege: SHOW VIEW_SYM */
#line 17287 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= SHOW_VIEW_ACL; }
#line 50394 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3453: /* object_privilege: CREATE ROUTINE_SYM */
#line 17288 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= CREATE_PROC_ACL; }
#line 50400 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3454: /* object_privilege: ALTER ROUTINE_SYM */
#line 17289 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= ALTER_PROC_ACL; }
#line 50406 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3455: /* object_privilege: CREATE USER_SYM */
#line 17290 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= CREATE_USER_ACL; }
#line 50412 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3456: /* object_privilege: EVENT_SYM */
#line 17291 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= EVENT_ACL;}
#line 50418 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3457: /* object_privilege: TRIGGER_SYM */
#line 17292 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= TRIGGER_ACL; }
#line 50424 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3458: /* object_privilege: CREATE TABLESPACE */
#line 17293 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= CREATE_TABLESPACE_ACL; }
#line 50430 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50436 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3460: /* object_privilege: SET USER_SYM */
#line 17295 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= SET_USER_ACL; }
#line 50442 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50448 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50454 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50460 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50466 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50472 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50478 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50484 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50490 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50496 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3470: /* object_privilege: SLAVE MONITOR_SYM */
#line 17305 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= SLAVE_MONITOR_ACL; }
#line 50502 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3471: /* opt_and: %empty */
#line 17309 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 50508 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3472: /* opt_and: AND_SYM */
#line 17310 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 50514 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50525 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50536 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50547 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50560 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50570 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50581 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50590 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50599 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50608 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50617 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50626 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50635 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50644 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50654 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50664 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50673 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50681 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50691 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50699 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50708 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50717 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50727 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50737 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50745 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50753 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50761 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50769 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50778 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50787 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50796 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50805 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50814 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3512: /* resource_option_list: resource_option_list resource_option */
#line 17528 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 50820 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3513: /* resource_option_list: resource_option */
#line 17529 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 50826 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3514: /* opt_resource_options: %empty */
#line 17533 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 50832 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3516: /* opt_grant_options: %empty */
#line 17539 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= NO_ACL; }
#line 50838 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50844 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3518: /* opt_grant_option: %empty */
#line 17544 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= NO_ACL; }
#line 50850 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3519: /* opt_grant_option: WITH GRANT OPTION */
#line 17545 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= GRANT_ACL; }
#line 50856 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50862 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3522: /* grant_option: GRANT OPTION */
#line 17554 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= GRANT_ACL;}
#line 50868 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3523: /* grant_option: resource_option */
#line 17555 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= NO_ACL; }
#line 50874 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50884 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3525: /* begin_stmt_mariadb: BEGIN_MARIADB_SYM $@247 opt_work */
#line 17565 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 50890 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50900 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3527: /* opt_not: %empty */
#line 17578 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 50906 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3528: /* opt_not: not */
#line 17579 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 50912 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3529: /* opt_work: %empty */
#line 17583 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 50918 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3530: /* opt_work: WORK_SYM */
#line 17584 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 50924 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3531: /* opt_chain: %empty */
#line 17589 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_yes_no_unk)= TVL_UNKNOWN; }
#line 50930 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50936 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50942 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3534: /* opt_release: %empty */
#line 17596 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_yes_no_unk)= TVL_UNKNOWN; }
#line 50948 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50954 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50960 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50973 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50986 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 50996 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51006 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51016 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51026 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51032 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51038 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51044 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3546: /* union_option: %empty */
#line 17672 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)=1; }
#line 51050 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3547: /* union_option: DISTINCT */
#line 17673 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)=1; }
#line 51056 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3548: /* union_option: ALL */
#line 17674 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)=0; }
#line 51062 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3549: /* query_expression_option: STRAIGHT_JOIN */
#line 17678 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->options|= SELECT_STRAIGHT_JOIN; }
#line 51068 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51078 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3551: /* query_expression_option: DISTINCT */
#line 17685 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->options|= SELECT_DISTINCT; }
#line 51084 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3552: /* query_expression_option: UNIQUE_SYM */
#line 17686 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->options|= SELECT_DISTINCT; }
#line 51090 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51096 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51102 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51108 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51114 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3557: /* query_expression_option: ALL */
#line 17691 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->options|= SELECT_ALL; }
#line 51120 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51135 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51144 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51150 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51156 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51162 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3565: /* opt_view_suid: %empty */
#line 17740 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.view_suid)= VIEW_SUID_DEFAULT; }
#line 51168 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51174 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51180 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51186 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3569: /* view_list_opt: %empty */
#line 17751 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 51192 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3570: /* view_list_opt: '(' view_list ')' */
#line 17752 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 51198 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51208 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51218 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51228 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51237 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3575: /* view_check_option: %empty */
#line 17785 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= VIEW_CHECK_NONE; }
#line 51243 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51249 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51255 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51261 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51267 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51273 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51283 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51292 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51301 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51309 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51317 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51325 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51350 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51373 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51383 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51392 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51400 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51408 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51416 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51424 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51432 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51441 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3597: /* opt_format_xid: %empty */
#line 17938 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= false; }
#line 51447 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51464 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51475 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51486 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51500 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3602: /* begin_or_start: BEGIN_MARIADB_SYM */
#line 17982 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 51506 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3603: /* begin_or_start: BEGIN_ORACLE_SYM */
#line 17983 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 51512 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3604: /* begin_or_start: START_SYM */
#line 17984 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 51518 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3605: /* opt_join_or_resume: %empty */
#line 17988 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->xa_opt=XA_NONE; }
#line 51524 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51530 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51536 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3608: /* opt_one_phase: %empty */
#line 17994 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->xa_opt=XA_NONE; }
#line 51542 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51548 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3610: /* opt_suspend: %empty */
#line 18000 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->xa_opt=XA_NONE; }
#line 51554 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3611: /* $@255: %empty */
#line 18002 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->xa_opt=XA_SUSPEND; }
#line 51560 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3613: /* opt_migrate: %empty */
#line 18007 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 51566 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51572 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51581 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51589 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51598 "/home/buildbot/git/mkdist/sql/yy_mariadb.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 51607 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3619: /* keep_gcc_happy: IMPOSSIBLE_ACTION */
#line 18039 "/home/buildbot/git/sql/sql_yacc.yy"
{
YYERROR;
}
#line 51615 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3653: /* row_field_name: ident */
#line 18122 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.spvar_definition)= Lex->row_field_name(thd, (yyvsp[0].ident_sys))))
MYSQL_YYABORT;
}
#line 51624 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3654: /* $@256: %empty */
#line 18130 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyvsp[-1].expr_lex)->sp_while_loop_expression(thd)))
MYSQL_YYABORT;
}
#line 51633 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3655: /* while_body: expr_lex DO_SYM $@256 sp_proc_stmts1 END WHILE_SYM */
#line 18135 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_while_loop_finalize(thd)))
MYSQL_YYABORT;
}
#line 51642 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3656: /* for_loop_statements: DO_SYM sp_proc_stmts1 END FOR_SYM */
#line 18143 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 51648 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3657: /* sp_label: label_ident ':' */
#line 18147 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= (yyvsp[-1].ident_sys); }
#line 51654 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3659: /* sp_block_label: sp_label */
#line 18156 "/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 51664 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3660: /* sp_opt_default: _empty */
#line 18164 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item) = NULL; }
#line 51670 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3661: /* sp_opt_default: DEFAULT expr */
#line 18165 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item) = (yyvsp[0].item); }
#line 51676 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3662: /* sp_decl_variable_list_anchored: sp_decl_idents_init_vars TYPE_SYM OF_SYM optionally_qualified_column_ident sp_opt_default */
#line 18172 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_variable_declarations_with_ref_finalize(thd, (yyvsp[-4].num), (yyvsp[-1].qualified_column_ident), (yyvsp[0].item))))
MYSQL_YYABORT;
(yyval.spblock).init_using_vars((yyvsp[-4].num));
}
#line 51686 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3663: /* sp_decl_variable_list_anchored: sp_decl_idents_init_vars ROW_SYM TYPE_SYM OF_SYM optionally_qualified_column_ident sp_opt_default */
#line 18180 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_variable_declarations_rowtype_finalize(thd, (yyvsp[-5].num), (yyvsp[-1].qualified_column_ident), (yyvsp[0].item))))
MYSQL_YYABORT;
(yyval.spblock).init_using_vars((yyvsp[-5].num));
}
#line 51696 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3664: /* sp_param_name_and_mode: sp_parameter_type sp_param_name */
#line 18189 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[0].spvar)->mode= (yyvsp[-1].spvar_mode);
(yyval.spvar)= (yyvsp[0].spvar);
}
#line 51705 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3666: /* sp_param: sp_param_name_and_mode field_type */
#line 18198 "/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 51714 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3667: /* sp_param: sp_param_name_and_mode ROW_SYM row_type_body */
#line 18203 "/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 51723 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3669: /* sp_param_anchored: sp_param_name_and_mode TYPE_SYM OF_SYM ident '.' ident */
#line 18212 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sphead->spvar_fill_type_reference(thd,
(yyval.spvar)= (yyvsp[-5].spvar), (yyvsp[-2].ident_sys),
(yyvsp[0].ident_sys))))
MYSQL_YYABORT;
}
#line 51734 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3670: /* sp_param_anchored: sp_param_name_and_mode TYPE_SYM OF_SYM ident '.' ident '.' ident */
#line 18219 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sphead->spvar_fill_type_reference(thd, (yyval.spvar)= (yyvsp[-7].spvar),
(yyvsp[-4].ident_sys), (yyvsp[-2].ident_sys), (yyvsp[0].ident_sys))))
MYSQL_YYABORT;
}
#line 51744 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3671: /* sp_param_anchored: sp_param_name_and_mode ROW_SYM TYPE_SYM OF_SYM ident */
#line 18225 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sphead->spvar_fill_table_rowtype_reference(thd, (yyval.spvar)= (yyvsp[-4].spvar), (yyvsp[0].ident_sys))))
MYSQL_YYABORT;
}
#line 51753 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3672: /* sp_param_anchored: sp_param_name_and_mode ROW_SYM TYPE_SYM OF_SYM ident '.' ident */
#line 18230 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sphead->spvar_fill_table_rowtype_reference(thd, (yyval.spvar)= (yyvsp[-6].spvar), (yyvsp[-2].ident_sys), (yyvsp[0].ident_sys))))
MYSQL_YYABORT;
}
#line 51762 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3673: /* $@257: %empty */
#line 18239 "/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 51772 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3674: /* sf_c_chistics_and_body_standalone: sp_c_chistics $@257 sp_proc_stmt_in_returns_clause force_lookahead */
#line 18245 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_body_finalize_function(thd)))
MYSQL_YYABORT;
}
#line 51781 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3675: /* $@258: %empty */
#line 18253 "/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 51792 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3676: /* $@259: %empty */
#line 18261 "/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 51801 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3677: /* sp_tail_standalone: sp_name $@258 sp_parenthesized_pdparam_list sp_c_chistics $@259 sp_proc_stmt force_lookahead */
#line 18266 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_body_finalize_procedure(thd)))
MYSQL_YYABORT;
}
#line 51810 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3678: /* drop_routine: DROP FUNCTION_SYM opt_if_exists ident '.' ident */
#line 18274 "/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 51819 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3679: /* drop_routine: DROP FUNCTION_SYM opt_if_exists ident */
#line 18279 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_drop_function((yyvsp[-1].object_ddl_options), (yyvsp[0].ident_sys)))
MYSQL_YYABORT;
}
#line 51828 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3680: /* drop_routine: DROP PROCEDURE_SYM opt_if_exists sp_name */
#line 18284 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_drop_procedure((yyvsp[-1].object_ddl_options), (yyvsp[0].spname)))
MYSQL_YYABORT;
}
#line 51837 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3681: /* $@260: %empty */
#line 18293 "/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 51846 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3682: /* create_routine: create_or_replace definer_opt PROCEDURE_SYM opt_if_not_exists $@260 sp_tail_standalone */
#line 18298 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->stmt_create_routine_finalize();
}
#line 51854 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3683: /* $@261: %empty */
#line 18303 "/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 51863 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3684: /* create_routine: create_or_replace definer opt_aggregate FUNCTION_SYM opt_if_not_exists sp_name $@261 sp_parenthesized_fdparam_list RETURNS_SYM sf_return_type sf_c_chistics_and_body_standalone */
#line 18310 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->stmt_create_routine_finalize();
}
#line 51871 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3685: /* $@262: %empty */
#line 18315 "/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 51880 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3686: /* create_routine: create_or_replace no_definer opt_aggregate FUNCTION_SYM opt_if_not_exists sp_name $@262 sp_parenthesized_fdparam_list RETURNS_SYM sf_return_type sf_c_chistics_and_body_standalone */
#line 18322 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->stmt_create_routine_finalize();
}
#line 51888 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3687: /* 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 18327 "/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 51898 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3688: /* sp_decls: _empty */
#line 18337 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.spblock).init();
}
#line 51906 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3689: /* sp_decls: sp_decls sp_decl ';' */
#line 18341 "/home/buildbot/git/sql/sql_yacc.yy"
{
// We check for declarations out of (standard) order this way
// because letting the grammar rules reflect it caused tricky
// shift/reduce conflicts with the wrong result. (And we get
// better error handling this way.)
if (unlikely(Lex->sp_declarations_join(&(yyval.spblock), (yyvsp[-2].spblock), (yyvsp[-1].spblock))))
MYSQL_YYABORT;
}
#line 51919 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3690: /* sp_decl: DECLARE_MARIADB_SYM sp_decl_body */
#line 18352 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.spblock)= (yyvsp[0].spblock); }
#line 51925 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3692: /* sp_decl_body: sp_decl_ident CONDITION_SYM FOR_SYM sp_cond */
#line 18359 "/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 51936 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3694: /* $@263: %empty */
#line 18367 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sp_block_init(thd);
}
#line 51944 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3695: /* sp_decl_body: sp_decl_ident CURSOR_SYM $@263 opt_parenthesized_cursor_formal_parameters FOR_SYM sp_cursor_stmt */
#line 18372 "/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[-5].ident_sys), (yyvsp[0].sp_cursor_stmt), param_ctx, true)))
MYSQL_YYABORT;
(yyval.spblock).vars= (yyval.spblock).conds= (yyval.spblock).hndlrs= 0;
(yyval.spblock).curs= 1;
}
#line 51958 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3713: /* $@264: %empty */
#line 18423 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sp_block_init(thd, &(yyvsp[-1].lex_str));
}
#line 51966 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3714: /* sp_labeled_block: sp_block_label BEGIN_MARIADB_SYM $@264 sp_decls sp_proc_stmts END sp_opt_label */
#line 18430 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_block_finalize(thd, (yyvsp[-3].spblock), &(yyvsp[0].lex_str))))
MYSQL_YYABORT;
}
#line 51975 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3715: /* $@265: %empty */
#line 18438 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sp_block_init(thd);
}
#line 51983 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3716: /* sp_unlabeled_block: BEGIN_MARIADB_SYM $@265 sp_decls sp_proc_stmts END */
#line 18444 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_block_finalize(thd, (yyvsp[-2].spblock))))
MYSQL_YYABORT;
}
#line 51992 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3717: /* $@266: %empty */
#line 18452 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->maybe_start_compound_statement(thd)))
MYSQL_YYABORT;
Lex->sp_block_init(thd);
}
#line 52002 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3718: /* sp_unlabeled_block_not_atomic: BEGIN_MARIADB_SYM not ATOMIC_SYM $@266 sp_decls sp_proc_stmts END */
#line 18460 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_block_finalize(thd, (yyvsp[-2].spblock))))
MYSQL_YYABORT;
}
#line 52011 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
#line 52015 "/home/buildbot/git/mkdist/sql/yy_mariadb.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;
}