)))
MYSQL_YYABORT;
(yyval.sp_assignment_lex_list)->push_back((yyvsp[0].assignment_lex), thd->mem_root);
}
#line 31158 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 395:
#line 3822 "/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 31169 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 396:
#line 3829 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.sp_assignment_lex_list)= NULL; }
#line 31177 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 397:
#line 3830 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.sp_assignment_lex_list)= (yyvsp[-1].sp_assignment_lex_list); }
#line 31185 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 401:
#line 3841 "/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 31196 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 402:
#line 3849 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_add_cfetch(thd, &(yyvsp[-1].ident_sys))))
MYSQL_YYABORT;
}
#line 31207 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 403:
#line 3854 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_add_cfetch(thd, &(yyvsp[-1].ident_sys))))
MYSQL_YYABORT;
}
#line 31218 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 404:
#line 3859 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_add_cfetch(thd, &(yyvsp[-1].ident_sys))))
MYSQL_YYABORT;
}
#line 31229 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 405:
#line 3866 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 31237 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 406:
#line 3868 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_add_agg_cfetch()))
MYSQL_YYABORT;
}
#line 31248 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 407:
#line 3876 "/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 31269 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 408:
#line 3894 "/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 31291 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 409:
#line 3910 "/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 31313 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 410:
#line 3929 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyvsp[-1].expr_lex)->sp_if_expr(thd)))
MYSQL_YYABORT;
}
#line 31324 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 411:
#line 3934 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyvsp[-3].expr_lex)->sp_if_after_statements(thd)))
MYSQL_YYABORT;
}
#line 31335 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 412:
#line 3939 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sphead->backpatch(lex->spcont->pop_label());
}
#line 31347 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 417:
#line 3955 "/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 31403 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 418:
#line 4008 "/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 31423 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 419:
#line 4025 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyvsp[0].expr_lex)->case_stmt_action_expr()))
MYSQL_YYABORT;
}
#line 31434 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 420:
#line 4030 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 31442 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 421:
#line 4032 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 31450 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 426:
#line 4047 "/home/buildbot/git/sql/sql_yacc.yy"
{
/* Simple case: = */
if (unlikely((yyvsp[0].expr_lex)->case_stmt_action_when(true)))
MYSQL_YYABORT;
}
#line 31462 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 427:
#line 4054 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->case_stmt_action_then()))
MYSQL_YYABORT;
}
#line 31473 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 428:
#line 4062 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyvsp[0].expr_lex)->case_stmt_action_when(false)))
MYSQL_YYABORT;
}
#line 31484 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 429:
#line 4068 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->case_stmt_action_then()))
MYSQL_YYABORT;
}
#line 31495 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 430:
#line 4076 "/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 31512 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 432:
#line 4090 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= null_clex_str; }
#line 31520 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 433:
#line 4091 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= (yyvsp[0].ident_sys); }
#line 31528 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 434:
#line 4096 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 31536 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 435:
#line 4097 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= -1; }
#line 31544 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 436:
#line 4102 "/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 31555 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 437:
#line 4111 "/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 31565 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 438:
#line 4115 "/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 31578 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 439:
#line 4122 "/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 31590 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 440:
#line 4131 "/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 31607 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 441:
#line 4145 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyvsp[-2].expr_lex)->sp_repeat_loop_finalize(thd))
MYSQL_YYABORT;
}
#line 31618 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 442:
#line 4153 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_pop_loop_label(thd, &(yyvsp[0].lex_str))))
MYSQL_YYABORT;
}
#line 31629 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 443:
#line 4161 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_push_loop_label(thd, &(yyvsp[-1].lex_str))))
MYSQL_YYABORT;
}
#line 31640 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 444:
#line 4166 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 31648 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 445:
#line 4168 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_push_loop_label(thd, &(yyvsp[-1].lex_str))))
MYSQL_YYABORT;
}
#line 31659 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 446:
#line 4173 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 31667 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 447:
#line 4175 "/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 31678 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 448:
#line 4180 "/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 31691 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 449:
#line 4187 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_for_loop_finalize(thd, (yyvsp[-2].for_loop))))
MYSQL_YYABORT;
}
#line 31702 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 450:
#line 4192 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_for_loop_outer_block_finalize(thd, (yyvsp[-4].for_loop))))
MYSQL_YYABORT;
}
#line 31713 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 451:
#line 4197 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_push_loop_label(thd, &(yyvsp[-1].lex_str))))
MYSQL_YYABORT;
}
#line 31724 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 452:
#line 4202 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 31732 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 453:
#line 4207 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_push_loop_empty_label(thd)))
MYSQL_YYABORT;
}
#line 31743 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 454:
#line 4212 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sp_pop_loop_empty_label(thd);
}
#line 31753 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 455:
#line 4216 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_push_loop_empty_label(thd)))
MYSQL_YYABORT;
}
#line 31764 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 456:
#line 4221 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sp_pop_loop_empty_label(thd);
}
#line 31774 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 457:
#line 4225 "/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 31787 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 458:
#line 4232 "/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 31800 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 459:
#line 4239 "/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 31814 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 460:
#line 4247 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_push_loop_empty_label(thd)))
MYSQL_YYABORT;
}
#line 31825 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 461:
#line 4252 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sp_pop_loop_empty_label(thd);
}
#line 31835 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 462:
#line 4259 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->trg_chistics.action_time= TRG_ACTION_BEFORE; }
#line 31843 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 463:
#line 4261 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->trg_chistics.action_time= TRG_ACTION_AFTER; }
#line 31851 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 464:
#line 4266 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->trg_chistics.event= TRG_EVENT_INSERT; }
#line 31859 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 465:
#line 4268 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->trg_chistics.event= TRG_EVENT_UPDATE; }
#line 31867 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 466:
#line 4270 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->trg_chistics.event= TRG_EVENT_DELETE; }
#line 31875 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 470:
#line 4304 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 31883 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 471:
#line 4306 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->alter_tablespace_info->logfile_group_name= (yyvsp[0].ident_sys).str;
}
#line 31894 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 472:
#line 4316 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_tablespace_info->ts_alter_tablespace_type= ALTER_TABLESPACE_ADD_FILE;
}
#line 31904 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 473:
#line 4322 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_tablespace_info->ts_alter_tablespace_type= ALTER_TABLESPACE_DROP_FILE;
}
#line 31914 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 478:
#line 4345 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 31922 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 525:
#line 4439 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->alter_tablespace_info->data_file_name= (yyvsp[0].lex_str).str;
}
#line 31933 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 526:
#line 4447 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->alter_tablespace_info->undo_file_name= (yyvsp[0].lex_str).str;
}
#line 31944 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 527:
#line 4455 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->alter_tablespace_info->redo_file_name= (yyvsp[0].lex_str).str;
}
#line 31955 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 528:
#line 4463 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->alter_tablespace_info= (new (thd->mem_root)
st_alter_tablespace());
if (unlikely(lex->alter_tablespace_info == NULL))
MYSQL_YYABORT;
lex->alter_tablespace_info->tablespace_name= (yyvsp[0].ident_sys).str;
lex->sql_command= SQLCOM_ALTER_TABLESPACE;
}
#line 31971 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 529:
#line 4476 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->alter_tablespace_info= (new (thd->mem_root)
st_alter_tablespace());
if (unlikely(lex->alter_tablespace_info == NULL))
MYSQL_YYABORT;
lex->alter_tablespace_info->logfile_group_name= (yyvsp[0].ident_sys).str;
lex->sql_command= SQLCOM_ALTER_TABLESPACE;
}
#line 31987 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 530:
#line 4489 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->alter_tablespace_info->ts_access_mode= TS_READ_ONLY;
}
#line 31998 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 531:
#line 4494 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->alter_tablespace_info->ts_access_mode= TS_READ_WRITE;
}
#line 32009 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 532:
#line 4499 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->alter_tablespace_info->ts_access_mode= TS_NOT_ACCESSIBLE;
}
#line 32020 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 533:
#line 4507 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->alter_tablespace_info->initial_size= (yyvsp[0].ulonglong_number);
}
#line 32031 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 534:
#line 4515 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->alter_tablespace_info->autoextend_size= (yyvsp[0].ulonglong_number);
}
#line 32042 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 535:
#line 4523 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->alter_tablespace_info->max_size= (yyvsp[0].ulonglong_number);
}
#line 32053 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 536:
#line 4531 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->alter_tablespace_info->extent_size= (yyvsp[0].ulonglong_number);
}
#line 32064 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 537:
#line 4539 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->alter_tablespace_info->undo_buffer_size= (yyvsp[0].ulonglong_number);
}
#line 32075 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 538:
#line 4547 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->alter_tablespace_info->redo_buffer_size= (yyvsp[0].ulonglong_number);
}
#line 32086 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 539:
#line 4555 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (unlikely(lex->alter_tablespace_info->nodegroup_id != UNDEF_NODEGROUP))
my_yyabort_error((ER_FILEGROUP_OPTION_ONLY_ONCE,MYF(0),"NODEGROUP"));
lex->alter_tablespace_info->nodegroup_id= (yyvsp[0].ulong_num);
}
#line 32099 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 540:
#line 4565 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (unlikely(lex->alter_tablespace_info->ts_comment != NULL))
my_yyabort_error((ER_FILEGROUP_OPTION_ONLY_ONCE,MYF(0),"COMMENT"));
lex->alter_tablespace_info->ts_comment= (yyvsp[0].lex_str).str;
}
#line 32112 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 541:
#line 4575 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (unlikely(lex->alter_tablespace_info->storage_engine != NULL))
my_yyabort_error((ER_FILEGROUP_OPTION_ONLY_ONCE, MYF(0),
"STORAGE ENGINE"));
lex->alter_tablespace_info->storage_engine= (yyvsp[0].db_type);
}
#line 32126 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 544:
#line 4591 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->alter_tablespace_info->wait_until_completed= TRUE;
}
#line 32137 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 545:
#line 4596 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (unlikely(!(lex->alter_tablespace_info->wait_until_completed)))
my_yyabort_error((ER_FILEGROUP_OPTION_ONLY_ONCE,MYF(0),"NO_WAIT"));
lex->alter_tablespace_info->wait_until_completed= FALSE;
}
#line 32150 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 546:
#line 4605 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulonglong_number)= (yyvsp[0].ulonglong_number);}
#line 32158 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 547:
#line 4607 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyvsp[0].ident_sys).to_size_number(&(yyval.ulonglong_number)))
MYSQL_YYABORT;
}
#line 32169 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 548:
#line 4619 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->create_info.option_list= NULL; }
#line 32177 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 549:
#line 4620 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32185 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 550:
#line 4621 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32193 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 551:
#line 4623 "/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 32210 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 552:
#line 4636 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table)= (yyvsp[0].table); }
#line 32218 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 553:
#line 4637 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table)= (yyvsp[-1].table); }
#line 32226 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 554:
#line 4641 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32234 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 556:
#line 4647 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->parsed_insert_select((yyvsp[0].select_lex_unit)->first_select()))
MYSQL_YYABORT;
}
#line 32245 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 557:
#line 4652 "/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 32259 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 558:
#line 4663 "/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 32275 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 559:
#line 4699 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32283 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 561:
#line 4705 "/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 32300 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 563:
#line 4720 "/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 32318 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 564:
#line 4735 "/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 32338 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 565:
#line 4749 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->pop_select(); //main select
}
#line 32348 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 566:
#line 4756 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->safe_to_cache_query= 1; }
#line 32356 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 568:
#line 4762 "/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 32369 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 569:
#line 4769 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->part_type= HASH_PARTITION; }
#line 32377 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 570:
#line 4770 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32385 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 571:
#line 4772 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->part_type= RANGE_PARTITION; }
#line 32393 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 572:
#line 4774 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->part_type= RANGE_PARTITION; }
#line 32401 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 573:
#line 4776 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->parsing_place= IN_PART_FUNC;
}
#line 32411 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 574:
#line 4780 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->part_info->part_type= LIST_PARTITION;
Select->parsing_place= NO_MATTER;
}
#line 32422 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 575:
#line 4785 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->part_type= LIST_PARTITION; }
#line 32430 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 576:
#line 4787 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->part_info->vers_init_info(thd)))
MYSQL_YYABORT;
}
#line 32441 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 578:
#line 4795 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32449 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 579:
#line 4797 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->linear_hash_ind= TRUE;}
#line 32457 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 580:
#line 4802 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->key_algorithm= partition_info::KEY_ALGORITHM_NONE;}
#line 32465 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 581:
#line 4804 "/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 32485 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 582:
#line 4820 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32493 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 583:
#line 4821 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32501 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 584:
#line 4825 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32509 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 585:
#line 4826 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32517 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 586:
#line 4831 "/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 32534 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 587:
#line 4845 "/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 32546 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 588:
#line 4855 "/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 32560 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 589:
#line 4866 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->part_info->set_part_expr(thd, (yyvsp[-1].item), TRUE)))
MYSQL_YYABORT;
}
#line 32571 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 590:
#line 4874 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32579 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 591:
#line 4876 "/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 32595 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 592:
#line 4888 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32603 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 593:
#line 4890 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->subpart_type= HASH_PARTITION; }
#line 32611 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 594:
#line 4891 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32619 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 595:
#line 4894 "/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 32631 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 596:
#line 4899 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32639 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 597:
#line 4903 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32647 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 598:
#line 4904 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32655 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 599:
#line 4909 "/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 32672 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 600:
#line 4923 "/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 32687 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 601:
#line 4934 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32695 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 602:
#line 4936 "/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 32710 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 603:
#line 4948 "/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 32726 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 604:
#line 4958 "/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 32751 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 605:
#line 4979 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32759 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 606:
#line 4980 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32767 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 607:
#line 4985 "/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 32789 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 608:
#line 5004 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32797 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 609:
#line 5009 "/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 32811 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 610:
#line 5020 "/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 32833 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 611:
#line 5036 "/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 32852 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 612:
#line 5048 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32860 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 613:
#line 5050 "/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 32879 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 614:
#line 5062 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32887 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 615:
#line 5064 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->part_values_current(thd))
MYSQL_YYABORT;
}
#line 32898 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 616:
#line 5069 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->part_values_history(thd))
MYSQL_YYABORT;
}
#line 32909 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 617:
#line 5074 "/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 32932 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 618:
#line 5094 "/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 32956 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 619:
#line 5111 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32964 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 620:
#line 5116 "/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 32997 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 621:
#line 5143 "/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 33012 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 622:
#line 5154 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33020 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 623:
#line 5155 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33028 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 624:
#line 5160 "/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 33044 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 625:
#line 5169 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33052 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 626:
#line 5171 "/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 33079 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 627:
#line 5194 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33087 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 628:
#line 5195 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33095 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 629:
#line 5200 "/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 33112 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 630:
#line 5211 "/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 33132 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 631:
#line 5229 "/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 33152 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 632:
#line 5243 "/home/buildbot/git/sql/sql_yacc.yy"
{
partition_info *part_info= Lex->part_info;
if (part_info->num_subparts != 0)
{
if (unlikely(part_info->num_subparts !=
part_info->count_curr_subparts))
{
thd->parse_error(ER_PARTITION_WRONG_NO_SUBPART_ERROR);
MYSQL_YYABORT;
}
}
else if (part_info->count_curr_subparts > 0)
{
if (unlikely(part_info->partitions.elements > 1))
{
thd->parse_error(ER_PARTITION_WRONG_NO_SUBPART_ERROR);
MYSQL_YYABORT;
}
part_info->num_subparts= part_info->count_curr_subparts;
}
part_info->count_curr_subparts= 0;
}
#line 33181 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 633:
#line 5268 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33189 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 634:
#line 5269 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33197 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 635:
#line 5274 "/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 33236 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 636:
#line 5306 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33244 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 637:
#line 5311 "/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 33256 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 638:
#line 5319 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33264 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 639:
#line 5320 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33272 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 640:
#line 5324 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33280 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 641:
#line 5325 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33288 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 642:
#line 5330 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->curr_part_elem->tablespace_name= (yyvsp[0].lex_str).str; }
#line 33296 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 643:
#line 5332 "/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 33308 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 644:
#line 5338 "/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 33320 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 645:
#line 5344 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->curr_part_elem->nodegroup_id= (uint16) (yyvsp[0].ulong_num); }
#line 33328 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 646:
#line 5346 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->curr_part_elem->part_max_rows= (ha_rows) (yyvsp[0].ulonglong_number); }
#line 33336 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 647:
#line 5348 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->curr_part_elem->part_min_rows= (ha_rows) (yyvsp[0].ulonglong_number); }
#line 33344 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 648:
#line 5350 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->curr_part_elem->data_file_name= (yyvsp[0].lex_str).str; }
#line 33352 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 649:
#line 5352 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->curr_part_elem->index_file_name= (yyvsp[0].lex_str).str; }
#line 33360 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 650:
#line 5354 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->curr_part_elem->part_comment= (yyvsp[0].lex_str).str; }
#line 33368 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 651:
#line 5358 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33376 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 652:
#line 5360 "/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[-2].item), (yyvsp[-1].interval), (yyvsp[0].item), table_name)))
MYSQL_YYABORT;
}
#line 33389 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 653:
#line 5367 "/home/buildbot/git/sql/sql_yacc.yy"
{
partition_info *part_info= Lex->part_info;
if (unlikely(part_info->vers_set_limit((yyvsp[0].ulonglong_number))))
{
my_error(ER_PART_WRONG_VALUE, MYF(0),
Lex->create_last_non_select_table->table_name.str,
"LIMIT");
MYSQL_YYABORT;
}
}
#line 33406 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 654:
#line 5382 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= NULL;
}
#line 33416 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 655:
#line 5386 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= (yyvsp[0].item);
}
#line 33426 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 656:
#line 5396 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33434 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 657:
#line 5397 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33442 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 658:
#line 5401 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33450 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 659:
#line 5402 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33458 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 660:
#line 5406 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33466 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 661:
#line 5407 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33474 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 662:
#line 5411 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33482 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 663:
#line 5412 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33490 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 664:
#line 5414 "/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 33501 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 665:
#line 5422 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->check_exists= FALSE;
}
#line 33511 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 666:
#line 5426 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->check_exists= TRUE;
}
#line 33521 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 667:
#line 5433 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.object_ddl_options).init();
}
#line 33531 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 668:
#line 5437 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.object_ddl_options).set(DDL_options_st::OPT_IF_NOT_EXISTS);
}
#line 33541 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 669:
#line 5444 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.object_ddl_options).init();
}
#line 33551 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 670:
#line 5448 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.object_ddl_options).set(DDL_options_st::OPT_OR_REPLACE);
}
#line 33561 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 678:
#line 5471 "/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 33582 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 679:
#line 5486 "/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 33593 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 680:
#line 5491 "/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 33604 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 681:
#line 5496 "/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 33615 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 682:
#line 5501 "/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 33626 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 683:
#line 5506 "/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 33637 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 684:
#line 5511 "/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 33648 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 685:
#line 5516 "/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 33669 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 686:
#line 5531 "/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 33681 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 687:
#line 5537 "/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 33702 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 688:
#line 5552 "/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 33713 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 689:
#line 5557 "/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 33734 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 690:
#line 5572 "/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 33746 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 691:
#line 5578 "/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 33770 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 692:
#line 5596 "/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 33781 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 693:
#line 5601 "/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 33792 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 694:
#line 5606 "/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 33803 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 695:
#line 5611 "/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 33814 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 696:
#line 5616 "/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 33825 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 697:
#line 5621 "/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 33836 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 698:
#line 5626 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->first_select_lex()->table_list.save_and_clear(&Lex->save_list);
}
#line 33846 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 699:
#line 5630 "/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 33874 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 702:
#line 5654 "/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 33885 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 703:
#line 5659 "/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 33896 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 704:
#line 5664 "/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 33907 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 705:
#line 5669 "/home/buildbot/git/sql/sql_yacc.yy"
{Lex->create_info.tablespace= (yyvsp[0].ident_sys).str;}
#line 33915 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 706:
#line 5671 "/home/buildbot/git/sql/sql_yacc.yy"
{Lex->create_info.storage_media= HA_SM_DISK;}
#line 33923 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 707:
#line 5673 "/home/buildbot/git/sql/sql_yacc.yy"
{Lex->create_info.storage_media= HA_SM_MEMORY;}
#line 33931 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 708:
#line 5675 "/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 33943 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 709:
#line 5681 "/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 33954 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 710:
#line 5686 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.used_fields|= HA_CREATE_USED_TRANSACTIONAL;
Lex->create_info.transactional= (yyvsp[0].choice);
}
#line 33965 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 711:
#line 5691 "/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));
(void) new (thd->mem_root)
engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].lex_str), true,
&Lex->create_info.option_list,
&Lex->option_list_last);
}
#line 33980 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 712:
#line 5700 "/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));
(void) new (thd->mem_root)
engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].ident_sys), false,
&Lex->create_info.option_list,
&Lex->option_list_last);
}
#line 33995 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 713:
#line 5709 "/home/buildbot/git/sql/sql_yacc.yy"
{
(void) new (thd->mem_root)
engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].ulonglong_number), &Lex->create_info.option_list,
&Lex->option_list_last, thd->mem_root);
}
#line 34007 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 714:
#line 5715 "/home/buildbot/git/sql/sql_yacc.yy"
{
(void) new (thd->mem_root)
engine_option_value((yyvsp[-2].ident_sys), &Lex->create_info.option_list,
&Lex->option_list_last);
}
#line 34019 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 715:
#line 5721 "/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 34030 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 719:
#line 5735 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->create_info.options & HA_LEX_CREATE_TMP_TABLE))
{
if (DBUG_EVALUATE_IF("sysvers_force", 0, 1))
{
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 34052 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 720:
#line 5754 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->create_info.add_table_option_default_charset((yyvsp[0].charset))))
MYSQL_YYABORT;
}
#line 34063 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 721:
#line 5762 "/home/buildbot/git/sql/sql_yacc.yy"
{
HA_CREATE_INFO *cinfo= &Lex->create_info;
if (unlikely((cinfo->used_fields & HA_CREATE_USED_DEFAULT_CHARSET) &&
cinfo->default_table_charset && (yyvsp[0].charset) &&
!((yyvsp[0].charset)= merge_charset_and_collation(cinfo->default_table_charset,
(yyvsp[0].charset)))))
MYSQL_YYABORT;
Lex->create_info.default_table_charset= (yyvsp[0].charset);
Lex->create_info.used_fields|= HA_CREATE_USED_DEFAULT_CHARSET;
}
#line 34081 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 722:
#line 5777 "/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 34094 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 723:
#line 5787 "/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 34108 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 724:
#line 5797 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.row_type)= ROW_TYPE_DEFAULT; }
#line 34116 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 725:
#line 5798 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.row_type)= ROW_TYPE_FIXED; }
#line 34124 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 726:
#line 5799 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.row_type)= ROW_TYPE_DYNAMIC; }
#line 34132 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 727:
#line 5800 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.row_type)= ROW_TYPE_COMPRESSED; }
#line 34140 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 728:
#line 5801 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.row_type)= ROW_TYPE_REDUNDANT; }
#line 34148 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 729:
#line 5802 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.row_type)= ROW_TYPE_COMPACT; }
#line 34156 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 730:
#line 5803 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.row_type)= ROW_TYPE_PAGE; }
#line 34164 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 731:
#line 5807 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= MERGE_INSERT_DISABLED; }
#line 34172 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 732:
#line 5808 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= MERGE_INSERT_TO_FIRST; }
#line 34180 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 733:
#line 5809 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= MERGE_INSERT_TO_LAST; }
#line 34188 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 734:
#line 5813 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.num) = (int) STRING_RESULT; }
#line 34196 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 735:
#line 5814 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.num) = (int) REAL_RESULT; }
#line 34204 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 736:
#line 5815 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.num) = (int) DECIMAL_RESULT; }
#line 34212 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 737:
#line 5816 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.num) = (int) INT_RESULT; }
#line 34220 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 738:
#line 5822 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_last_non_select_table= Lex->last_table();
}
#line 34230 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 739:
#line 5829 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_last_non_select_table= Lex->last_table();
}
#line 34240 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 742:
#line 5840 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 34248 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 746:
#line 5844 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 34256 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 747:
#line 5849 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.create_field)= (yyvsp[0].create_field); }
#line 34264 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 748:
#line 5851 "/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 34277 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 749:
#line 5861 "/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 34289 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 750:
#line 5866 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 34297 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 751:
#line 5868 "/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 34309 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 752:
#line 5873 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 34317 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 753:
#line 5875 "/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 34329 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 754:
#line 5880 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 34337 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 755:
#line 5882 "/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 34349 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 756:
#line 5887 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 34357 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 757:
#line 5891 "/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 34369 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 758:
#line 5896 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 34377 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 759:
#line 5899 "/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 34389 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 760:
#line 5904 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 34397 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 761:
#line 5906 "/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 34413 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 762:
#line 5916 "/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 34425 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 763:
#line 5925 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->add_constraint((yyvsp[-1].lex_str), (yyvsp[0].virtual_column), FALSE);
}
#line 34435 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 764:
#line 5933 "/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 34446 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 765:
#line 5941 "/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 34457 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 766:
#line 5948 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.virtual_column)= (Virtual_column_info*) 0; }
#line 34465 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 767:
#line 5949 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.virtual_column)= (yyvsp[0].virtual_column);}
#line 34473 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 768:
#line 5954 "/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 34486 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 769:
#line 5963 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34494 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 770:
#line 5964 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34502 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 771:
#line 5968 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= null_clex_str; }
#line 34510 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 772:
#line 5969 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= (yyvsp[0].lex_str); }
#line 34518 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 773:
#line 5973 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].lex_str); }
#line 34526 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 774:
#line 5978 "/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), NULL);
(yyval.create_field)= f;
lex->parsing_options.lookup_keywords_after_qualifier= true;
}
#line 34548 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 775:
#line 5994 "/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 34573 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 776:
#line 6016 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->set_attributes(thd, (yyvsp[0].Lex_field_type), Lex->charset,
COLUMN_DEFINITION_TABLE_FIELD);
}
#line 34584 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 778:
#line 6022 "/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;
}
#line 34596 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 780:
#line 6031 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34604 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 781:
#line 6032 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34612 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 782:
#line 6036 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34620 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 784:
#line 6041 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34628 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 785:
#line 6042 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34636 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 786:
#line 6046 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34644 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 788:
#line 6051 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 34652 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 792:
#line 6056 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->vcol_info= (yyvsp[0].virtual_column);
Lex->last_field->flags&= ~NOT_NULL_FLAG; // undo automatic NOT NULL for timestamps
}
#line 34663 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 794:
#line 6062 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->last_field_generated_always_as_row_start())
MYSQL_YYABORT;
}
#line 34674 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 795:
#line 6067 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->last_field_generated_always_as_row_end())
MYSQL_YYABORT;
}
#line 34685 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 796:
#line 6074 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34693 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 797:
#line 6075 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34701 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 798:
#line 6080 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->vcol_info->set_stored_in_db_flag(FALSE);
}
#line 34711 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 799:
#line 6084 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->vcol_info->set_stored_in_db_flag(FALSE);
}
#line 34721 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 800:
#line 6088 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->vcol_info->set_stored_in_db_flag(TRUE);
}
#line 34731 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 801:
#line 6092 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->vcol_info->set_stored_in_db_flag(TRUE);
}
#line 34741 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 802:
#line 6098 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34749 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 803:
#line 6099 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34757 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 804:
#line 6103 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34765 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 806:
#line 6109 "/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 34777 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 807:
#line 6115 "/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 34789 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 808:
#line 6120 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_field->comment= (yyvsp[0].lex_str); }
#line 34797 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 809:
#line 6122 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->invisible= INVISIBLE_USER;
}
#line 34807 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 810:
#line 6129 "/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 34824 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 811:
#line 6140 "/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 34838 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 813:
#line 6152 "/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 34851 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 814:
#line 6162 "/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 34865 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 815:
#line 6170 "/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 34881 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 819:
#line 6186 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.virtual_column)= add_virtual_expression(thd, (yyvsp[0].item)))))
MYSQL_YYABORT;
}
#line 34892 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 820:
#line 6193 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->map_data_type(Lex_ident_sys(), &((yyval.Lex_field_type)= (yyvsp[0].Lex_field_type)));
}
#line 34902 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 821:
#line 6200 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->map_data_type(Lex_ident_sys(), &((yyval.Lex_field_type)= (yyvsp[0].Lex_field_type)));
}
#line 34912 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 822:
#line 6204 "/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 34923 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 828:
#line 6217 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->set_field_type_udt(&(yyval.Lex_field_type), (yyvsp[-2].ident_sys), (yyvsp[-1].Lex_length_and_dec)))
MYSQL_YYABORT;
}
#line 34934 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 829:
#line 6222 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->set_field_type_udt(&(yyval.Lex_field_type), (yyvsp[-2].kwd), (yyvsp[-1].Lex_length_and_dec)))
MYSQL_YYABORT;
}
#line 34945 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 830:
#line 6227 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->set_field_type_udt(&(yyval.Lex_field_type), (yyvsp[-2].kwd), (yyvsp[-1].Lex_length_and_dec)))
MYSQL_YYABORT;
}
#line 34956 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 831:
#line 6235 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set_handler_length_flags((yyvsp[-2].type_handler), (yyvsp[-1].const_simple_string), (uint32) (yyvsp[0].ulong_num));
}
#line 34966 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 832:
#line 6238 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set((yyvsp[-2].type_handler), (yyvsp[-1].Lex_length_and_dec)); }
#line 34974 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 833:
#line 6240 "/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).length() && !(yyvsp[-1].Lex_length_and_dec).dec())
{
int err;
ulonglong tmp_length= my_strtoll10((yyvsp[-1].Lex_length_and_dec).length(), NULL, &err);
if (unlikely(err || tmp_length > PRECISION_FOR_DOUBLE))
my_yyabort_error((ER_WRONG_FIELD_SPEC, MYF(0),
Lex->last_field->field_name.str));
if (tmp_length > PRECISION_FOR_FLOAT)
(yyval.Lex_field_type).set(&type_handler_double);
else
(yyval.Lex_field_type).set(&type_handler_float);
}
}
#line 34996 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 834:
#line 6256 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_bit, (yyvsp[0].const_simple_string));
}
#line 35006 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 835:
#line 6260 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_stiny, "1");
}
#line 35016 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 836:
#line 6264 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_stiny, "1");
}
#line 35026 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 837:
#line 6268 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_newdecimal, (yyvsp[-1].Lex_length_and_dec));}
#line 35034 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 838:
#line 6270 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyvsp[-1].Lex_length_and_dec).length() != 0)
(yyval.Lex_field_type).set(&type_handler_newdecimal, (yyvsp[-1].Lex_length_and_dec));
else
(yyval.Lex_field_type).set(&type_handler_double);
}
#line 35047 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 839:
#line 6277 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_newdecimal, (yyvsp[-1].Lex_length_and_dec));}
#line 35055 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 840:
#line 6279 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_newdecimal, (yyvsp[-1].Lex_length_and_dec));}
#line 35063 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 845:
#line 6292 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_string, (yyvsp[-1].const_simple_string));
}
#line 35073 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 846:
#line 6296 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_string, (yyvsp[-1].const_simple_string));
bincmp_collation(national_charset_info, (yyvsp[0].num));
}
#line 35084 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 847:
#line 6301 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->charset=&my_charset_bin;
(yyval.Lex_field_type).set(&type_handler_string, (yyvsp[0].const_simple_string));
}
#line 35095 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 848:
#line 6306 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].const_simple_string));
}
#line 35105 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 849:
#line 6310 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].const_simple_string));
}
#line 35115 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 850:
#line 6314 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-2].const_simple_string));
bincmp_collation(national_charset_info, (yyvsp[0].num));
}
#line 35126 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 851:
#line 6319 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->charset=&my_charset_bin;
(yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].const_simple_string));
}
#line 35137 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 852:
#line 6324 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->charset= &my_charset_bin;
(yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].const_simple_string));
}
#line 35148 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 853:
#line 6332 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyvsp[-1].const_simple_string))
{
errno= 0;
ulong length= strtoul((yyvsp[-1].const_simple_string), NULL, 10);
if (errno == 0 && length <= MAX_FIELD_BLOBLENGTH && length != 4)
{
char buff[sizeof("YEAR()") + MY_INT64_NUM_DECIMAL_DIGITS + 1];
my_snprintf(buff, sizeof(buff), "YEAR(%lu)", 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].const_simple_string));
}
#line 35172 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 854:
#line 6349 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_newdate); }
#line 35180 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 855:
#line 6351 "/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].const_simple_string));
}
#line 35193 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 856:
#line 6358 "/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].const_simple_string));
}
#line 35206 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 857:
#line 6365 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(thd->type_handler_for_datetime(), (yyvsp[0].const_simple_string));
}
#line 35216 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 858:
#line 6373 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->charset=&my_charset_bin;
(yyval.Lex_field_type).set(&type_handler_tiny_blob);
}
#line 35227 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 859:
#line 6378 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->charset=&my_charset_bin;
(yyval.Lex_field_type).set(&type_handler_blob, (yyvsp[-1].const_simple_string));
}
#line 35238 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 860:
#line 6383 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->charset=&my_charset_bin;
(yyval.Lex_field_type).set(&type_handler_blob, (yyvsp[-1].const_simple_string));
}
#line 35249 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 861:
#line 6388 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->charset=&my_charset_bin;
(yyval.Lex_field_type).set(&type_handler_long_blob);
}
#line 35260 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 862:
#line 6393 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->charset=&my_charset_bin;
(yyval.Lex_field_type).set(&type_handler_medium_blob);
}
#line 35271 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 863:
#line 6398 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->charset=&my_charset_bin;
(yyval.Lex_field_type).set(&type_handler_long_blob);
}
#line 35282 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 864:
#line 6403 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->charset=&my_charset_bin;
(yyval.Lex_field_type).set(&type_handler_medium_blob);
}
#line 35293 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 865:
#line 6408 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_medium_blob); }
#line 35301 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 866:
#line 6410 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_tiny_blob); }
#line 35309 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 867:
#line 6412 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_blob, (yyvsp[-1].const_simple_string)); }
#line 35317 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 868:
#line 6414 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_medium_blob); }
#line 35325 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 869:
#line 6416 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_long_blob); }
#line 35333 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 870:
#line 6418 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_long_blob); }
#line 35341 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 871:
#line 6420 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_medium_blob); }
#line 35349 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 872:
#line 6422 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->charset= &my_charset_utf8mb4_bin;
(yyval.Lex_field_type).set(&type_handler_json_longtext);
}
#line 35360 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 873:
#line 6430 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_enum); }
#line 35368 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 874:
#line 6432 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_set); }
#line 35376 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 875:
#line 6436 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35384 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 876:
#line 6440 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35392 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 877:
#line 6441 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35400 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 878:
#line 6445 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35408 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 879:
#line 6446 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35416 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 880:
#line 6450 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35424 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 881:
#line 6451 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35432 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 882:
#line 6452 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35440 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 883:
#line 6453 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35448 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 884:
#line 6454 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35456 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 885:
#line 6458 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.type_handler)= &type_handler_slong; }
#line 35464 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 886:
#line 6459 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.type_handler)= &type_handler_stiny; }
#line 35472 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 887:
#line 6460 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.type_handler)= &type_handler_sshort; }
#line 35480 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 888:
#line 6461 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.type_handler)= &type_handler_sint24; }
#line 35488 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 889:
#line 6462 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.type_handler)= &type_handler_slonglong; }
#line 35496 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 890:
#line 6467 "/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 35508 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 891:
#line 6472 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.type_handler)= &type_handler_double; }
#line 35516 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 892:
#line 6473 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.type_handler)= &type_handler_double; }
#line 35524 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 893:
#line 6478 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_field->srid= 0; }
#line 35532 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 894:
#line 6481 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->srid=atoi((yyvsp[0].lex_str).str);
}
#line 35542 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 895:
#line 6487 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_length_and_dec).set(0, 0); }
#line 35550 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 896:
#line 6488 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_length_and_dec).set((yyvsp[0].const_simple_string), 0); }
#line 35558 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 897:
#line 6489 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_length_and_dec)= (yyvsp[0].Lex_length_and_dec); }
#line 35566 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 898:
#line 6493 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_length_and_dec).set((yyvsp[-3].lex_str).str, (yyvsp[-1].lex_str).str); }
#line 35574 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 899:
#line 6497 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 0; }
#line 35582 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 900:
#line 6498 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 0; }
#line 35590 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 901:
#line 6499 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= UNSIGNED_FLAG; }
#line 35598 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 902:
#line 6500 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= UNSIGNED_FLAG | ZEROFILL_FLAG; }
#line 35606 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 903:
#line 6501 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= UNSIGNED_FLAG | ZEROFILL_FLAG; }
#line 35614 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 904:
#line 6502 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= UNSIGNED_FLAG | ZEROFILL_FLAG; }
#line 35622 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 905:
#line 6506 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_field->flags|= ((yyval.ulong_num)= (yyvsp[0].ulong_num)); }
#line 35630 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 906:
#line 6510 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.const_simple_string)= (yyvsp[-1].lex_str).str; }
#line 35638 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 907:
#line 6511 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.const_simple_string)= (yyvsp[-1].lex_str).str; }
#line 35646 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 908:
#line 6512 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.const_simple_string)= (yyvsp[-1].lex_str).str; }
#line 35654 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 909:
#line 6513 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.const_simple_string)= (yyvsp[-1].lex_str).str; }
#line 35662 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 910:
#line 6517 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.const_simple_string)= (char*) 0; /* use default length */ }
#line 35670 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 911:
#line 6518 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.const_simple_string)= (yyvsp[0].const_simple_string); }
#line 35678 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 912:
#line 6522 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_length_and_dec).set(0, 0); }
#line 35686 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 913:
#line 6523 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_length_and_dec)= (yyvsp[0].Lex_length_and_dec); }
#line 35694 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 914:
#line 6528 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35702 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 916:
#line 6533 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_field->flags&= ~ NOT_NULL_FLAG; }
#line 35710 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 917:
#line 6534 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_field->default_value= (yyvsp[0].virtual_column); }
#line 35718 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 918:
#line 6536 "/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;
}
#line 35731 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 919:
#line 6542 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG; }
#line 35739 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 920:
#line 6544 "/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;
}
#line 35751 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 921:
#line 6550 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->charset && !my_charset_same(Lex->charset,(yyvsp[0].charset))))
my_yyabort_error((ER_COLLATION_CHARSET_MISMATCH, MYF(0),
(yyvsp[0].charset)->name,Lex->charset->csname));
Lex->last_field->charset= (yyvsp[0].charset);
}
#line 35764 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 923:
#line 6560 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.const_simple_string)= NULL; }
#line 35772 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 924:
#line 6561 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.const_simple_string)= (yyvsp[0].ident_sys).str; }
#line 35780 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 925:
#line 6565 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35788 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 926:
#line 6566 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 35796 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 927:
#line 6570 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35804 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 928:
#line 6571 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 35812 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 929:
#line 6576 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->last_field->set_compressed((yyvsp[0].const_simple_string))))
MYSQL_YYABORT;
}
#line 35823 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 930:
#line 6584 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->last_field->set_compressed_deprecated(thd, (yyvsp[0].const_simple_string))))
MYSQL_YYABORT;
}
#line 35834 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 931:
#line 6592 "/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 35846 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 932:
#line 6601 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->flags|= NOT_NULL_FLAG;
}
#line 35856 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 933:
#line 6605 "/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 35868 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 936:
#line 6616 "/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));
(void) new (thd->mem_root)
engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].lex_str), true,
&Lex->last_field->option_list,
&Lex->option_list_last);
}
#line 35883 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 937:
#line 6625 "/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));
(void) new (thd->mem_root)
engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].ident_sys), false,
&Lex->last_field->option_list,
&Lex->option_list_last);
}
#line 35898 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 938:
#line 6634 "/home/buildbot/git/sql/sql_yacc.yy"
{
(void) new (thd->mem_root)
engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].ulonglong_number), &Lex->last_field->option_list,
&Lex->option_list_last, thd->mem_root);
}
#line 35910 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 939:
#line 6640 "/home/buildbot/git/sql/sql_yacc.yy"
{
(void) new (thd->mem_root)
engine_option_value((yyvsp[-2].ident_sys), &Lex->last_field->option_list,
&Lex->option_list_last);
}
#line 35922 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 940:
#line 6646 "/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 35938 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 941:
#line 6659 "/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 35950 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 942:
#line 6665 "/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 35962 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 943:
#line 6674 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.kwd)= (yyvsp[-1].kwd); }
#line 35970 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 944:
#line 6675 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.kwd)= (yyvsp[0].kwd); }
#line 35978 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 945:
#line 6680 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.charset)=get_charset_by_csname((yyvsp[0].lex_str).str,MY_CS_PRIMARY,MYF(0)))))
my_yyabort_error((ER_UNKNOWN_CHARACTER_SET, MYF(0), (yyvsp[0].lex_str).str));
}
#line 35989 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 946:
#line 6684 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)= &my_charset_bin; }
#line 35997 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 947:
#line 6688 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)=(yyvsp[0].charset); }
#line 36005 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 948:
#line 6689 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)=NULL; }
#line 36013 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 949:
#line 6693 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)= NULL; }
#line 36021 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 950:
#line 6694 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)= (yyvsp[0].charset); }
#line 36029 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 951:
#line 6699 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.charset)=get_charset_by_csname((yyvsp[0].lex_str).str,
MY_CS_PRIMARY,MYF(0))) &&
!((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 36042 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 952:
#line 6705 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)= &my_charset_bin; }
#line 36050 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 953:
#line 6709 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)=(yyvsp[0].charset); }
#line 36058 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 954:
#line 6710 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)=NULL; }
#line 36066 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 955:
#line 6715 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.charset)= mysqld_collation_get_by_name((yyvsp[0].lex_str).str))))
MYSQL_YYABORT;
}
#line 36077 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 956:
#line 6722 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)=NULL; }
#line 36085 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 957:
#line 6723 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)=(yyvsp[0].charset); }
#line 36093 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 958:
#line 6727 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)=(yyvsp[0].charset); }
#line 36101 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 959:
#line 6728 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)=NULL; }
#line 36109 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 960:
#line 6732 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36117 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 961:
#line 6733 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36125 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 962:
#line 6737 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)= (yyvsp[0].charset); }
#line 36133 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 963:
#line 6738 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)= &my_charset_latin1; }
#line 36141 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 964:
#line 6740 "/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 36152 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 965:
#line 6747 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->charset= (yyvsp[0].charset);
}
#line 36162 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 966:
#line 6753 "/home/buildbot/git/sql/sql_yacc.yy"
{ bincmp_collation(NULL, false); }
#line 36170 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 967:
#line 6754 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36178 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 968:
#line 6758 "/home/buildbot/git/sql/sql_yacc.yy"
{ bincmp_collation(&my_charset_bin, false); }
#line 36186 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 969:
#line 6759 "/home/buildbot/git/sql/sql_yacc.yy"
{ bincmp_collation((yyvsp[-1].charset), (yyvsp[0].num)); }
#line 36194 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 970:
#line 6760 "/home/buildbot/git/sql/sql_yacc.yy"
{ bincmp_collation(NULL, true); }
#line 36202 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 971:
#line 6761 "/home/buildbot/git/sql/sql_yacc.yy"
{ bincmp_collation((yyvsp[0].charset), true); }
#line 36210 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 972:
#line 6763 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!my_charset_same(Lex->charset, (yyvsp[-1].charset)))
my_yyabort_error((ER_COLLATION_CHARSET_MISMATCH, MYF(0),
Lex->charset->name, (yyvsp[-1].charset)->csname));
}
#line 36222 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 973:
#line 6768 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 36230 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 974:
#line 6772 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= false; }
#line 36238 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 975:
#line 6773 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= true; }
#line 36246 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 976:
#line 6778 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyvsp[0].ulong_num) == 0))
{
thd->parse_error();
MYSQL_YYABORT;
}
}
#line 36260 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 977:
#line 6786 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= (yyvsp[-2].ulong_num); }
#line 36268 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 978:
#line 6790 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 0; }
#line 36276 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 979:
#line 6791 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 1 << MY_STRXFRM_DESC_SHIFT; }
#line 36284 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 980:
#line 6795 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 1 << MY_STRXFRM_REVERSE_SHIFT; }
#line 36292 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 981:
#line 6798 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 0; }
#line 36300 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 982:
#line 6799 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= (yyvsp[0].ulong_num); }
#line 36308 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 983:
#line 6800 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= (yyvsp[-1].ulong_num) | (yyvsp[0].ulong_num); }
#line 36316 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 984:
#line 6801 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= (yyvsp[0].ulong_num) ; }
#line 36324 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 985:
#line 6806 "/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 36335 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 986:
#line 6814 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.ulong_num)= (1 | (yyvsp[0].ulong_num)) << (yyvsp[-1].ulong_num);
}
#line 36345 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 987:
#line 6820 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= (yyvsp[0].ulong_num); }
#line 36353 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 988:
#line 6821 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)|= (yyvsp[0].ulong_num); }
#line 36361 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 989:
#line 6826 "/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 36374 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 990:
#line 6835 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= (yyvsp[0].ulong_num); }
#line 36382 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 991:
#line 6836 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= (yyvsp[0].ulong_num); }
#line 36390 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 992:
#line 6840 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 0; }
#line 36398 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 993:
#line 6841 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= (yyvsp[0].ulong_num); }
#line 36406 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 996:
#line 6855 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.table)=(yyvsp[-3].table);
}
#line 36416 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 997:
#line 6862 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ref_list.empty(); }
#line 36424 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 999:
#line 6868 "/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 36437 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1000:
#line 6875 "/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 36452 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1001:
#line 6887 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->fk_match_option= Foreign_key::FK_MATCH_UNDEF; }
#line 36460 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1002:
#line 6889 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->fk_match_option= Foreign_key::FK_MATCH_FULL; }
#line 36468 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1003:
#line 6891 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->fk_match_option= Foreign_key::FK_MATCH_PARTIAL; }
#line 36476 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1004:
#line 6893 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->fk_match_option= Foreign_key::FK_MATCH_SIMPLE; }
#line 36484 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1005:
#line 6898 "/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 36496 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1006:
#line 6904 "/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 36508 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1007:
#line 6910 "/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 36520 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1008:
#line 6917 "/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 36532 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1009:
#line 6924 "/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 36544 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1010:
#line 6932 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_fk_option)= FK_OPTION_RESTRICT; }
#line 36552 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1011:
#line 6933 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_fk_option)= FK_OPTION_CASCADE; }
#line 36560 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1012:
#line 6934 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_fk_option)= FK_OPTION_SET_NULL; }
#line 36568 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1013:
#line 6935 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_fk_option)= FK_OPTION_NO_ACTION; }
#line 36576 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1014:
#line 6936 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_fk_option)= FK_OPTION_SET_DEFAULT; }
#line 36584 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1015:
#line 6940 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_type)= Key::PRIMARY; }
#line 36592 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1016:
#line 6941 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_type)= Key::UNIQUE; }
#line 36600 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1017:
#line 6945 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36608 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1018:
#line 6946 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36616 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1019:
#line 6950 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36624 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1021:
#line 6955 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36632 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1022:
#line 6956 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36640 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1023:
#line 6957 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36648 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1024:
#line 6961 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_type)= Key::FULLTEXT;}
#line 36656 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1025:
#line 6966 "/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 36671 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1026:
#line 6977 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36679 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1027:
#line 6978 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_key->option_list= Lex->option_list; }
#line 36687 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1028:
#line 6982 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36695 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1029:
#line 6983 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_key->option_list= Lex->option_list; }
#line 36703 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1030:
#line 6987 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36711 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1031:
#line 6988 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_key->option_list= Lex->option_list; }
#line 36719 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1038:
#line 7007 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_alg)= HA_KEY_ALG_UNDEF; }
#line 36727 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1039:
#line 7008 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_alg)= (yyvsp[0].key_alg); }
#line 36735 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1040:
#line 7013 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_alg)= HA_KEY_ALG_UNDEF; }
#line 36743 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1041:
#line 7014 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_alg)= (yyvsp[0].key_alg); }
#line 36751 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1042:
#line 7015 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_alg)= (yyvsp[0].key_alg); }
#line 36759 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1043:
#line 7020 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_key->key_create_info.algorithm= (yyvsp[0].key_alg); }
#line 36767 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1044:
#line 7022 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_key->key_create_info.algorithm= (yyvsp[0].key_alg); }
#line 36775 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1045:
#line 7027 "/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 36786 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1046:
#line 7032 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_key->key_create_info.comment= (yyvsp[0].lex_str); }
#line 36794 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1047:
#line 7034 "/home/buildbot/git/sql/sql_yacc.yy"
{
/* This is mainly for MySQL 8.0 compatiblity */
}
#line 36804 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1048:
#line 7038 "/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));
(void) new (thd->mem_root)
engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].lex_str), true, &Lex->option_list,
&Lex->option_list_last);
}
#line 36818 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1049:
#line 7046 "/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));
(void) new (thd->mem_root)
engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].ident_sys), false, &Lex->option_list,
&Lex->option_list_last);
}
#line 36832 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1050:
#line 7054 "/home/buildbot/git/sql/sql_yacc.yy"
{
(void) new (thd->mem_root)
engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].ulonglong_number), &Lex->option_list,
&Lex->option_list_last, thd->mem_root);
}
#line 36844 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1051:
#line 7060 "/home/buildbot/git/sql/sql_yacc.yy"
{
(void) new (thd->mem_root)
engine_option_value((yyvsp[-2].ident_sys), &Lex->option_list,
&Lex->option_list_last);
}
#line 36856 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1056:
#line 7079 "/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 36869 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1057:
#line 7088 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_alg)= HA_KEY_ALG_BTREE; }
#line 36877 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1058:
#line 7089 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_alg)= HA_KEY_ALG_RTREE; }
#line 36885 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1059:
#line 7090 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_alg)= HA_KEY_ALG_HASH; }
#line 36893 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1060:
#line 7095 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_key->columns.push_back((yyvsp[-1].key_part), thd->mem_root);
}
#line 36903 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1061:
#line 7099 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_key->columns.push_back((yyvsp[-1].key_part), thd->mem_root);
}
#line 36913 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1062:
#line 7105 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36921 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1063:
#line 7107 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_key->without_overlaps= true;
Lex->last_key->period= (yyvsp[-2].ident_sys);
}
#line 36932 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1064:
#line 7115 "/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 36944 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1065:
#line 7121 "/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 36959 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1066:
#line 7132 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= null_clex_str; }
#line 36967 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1067:
#line 7133 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= (yyvsp[0].lex_str); }
#line 36975 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1068:
#line 7138 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_field->interval_list.push_back((yyvsp[0].string), thd->mem_root); }
#line 36983 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1069:
#line 7140 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_field->interval_list.push_back((yyvsp[0].string), thd->mem_root); }
#line 36991 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1070:
#line 7149 "/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 37013 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1071:
#line 7165 "/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 37031 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1072:
#line 7177 "/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 37048 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1073:
#line 7188 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.default_table_charset= NULL;
Lex->create_info.schema_comment= NULL;
Lex->create_info.used_fields= 0;
if (Lex->main_select_push(true))
MYSQL_YYABORT;
}
#line 37062 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1074:
#line 7196 "/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 37078 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1075:
#line 7206 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.default_table_charset= NULL;
Lex->create_info.used_fields= 0;
Lex->create_info.schema_comment= thd->make_clex_string((yyvsp[0].lex_str));
Lex->create_info.used_fields|= HA_CREATE_USED_COMMENT;
}
#line 37091 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1076:
#line 7213 "/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 37106 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1077:
#line 7222 "/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 37120 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1078:
#line 7230 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_alter_procedure_start((yyvsp[0].spname)))
MYSQL_YYABORT;
}
#line 37131 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1079:
#line 7235 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37139 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1080:
#line 7237 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_alter_function_start((yyvsp[0].spname)))
MYSQL_YYABORT;
}
#line 37150 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1081:
#line 7242 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37158 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1082:
#line 7244 "/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 37171 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1083:
#line 7250 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37179 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1084:
#line 7257 "/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 37192 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1085:
#line 7263 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37200 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1086:
#line 7265 "/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 37225 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1087:
#line 7288 "/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 37247 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1088:
#line 7304 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->alter_tablespace_info->ts_cmd_type= ALTER_TABLESPACE;
}
#line 37258 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1089:
#line 7309 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->alter_tablespace_info->ts_cmd_type= ALTER_LOGFILE_GROUP;
}
#line 37269 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1090:
#line 7314 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->alter_tablespace_info->ts_cmd_type= CHANGE_FILE_TABLESPACE;
}
#line 37280 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1091:
#line 7319 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->alter_tablespace_info->ts_cmd_type= ALTER_ACCESS_MODE_TABLESPACE;
}
#line 37291 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1092:
#line 7324 "/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 37303 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1093:
#line 7328 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 37311 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1094:
#line 7332 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.set((yyvsp[-5].object_ddl_options));
Lex->sql_command= SQLCOM_ALTER_USER;
}
#line 37322 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1095:
#line 7337 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->name= null_clex_str;
lex->table_type= TABLE_TYPE_UNKNOWN;
lex->sql_command= SQLCOM_ALTER_SEQUENCE;
lex->create_info.init();
lex->no_write_to_binlog= 0;
DBUG_ASSERT(!lex->m_sql_cmd);
if (Lex->main_select_push())
MYSQL_YYABORT;
}
#line 37340 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1096:
#line 7349 "/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 37356 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1097:
#line 7359 "/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 37369 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1098:
#line 7364 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37377 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1099:
#line 7369 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->account_options.account_locked= ACCOUNTLOCK_LOCKED;
}
#line 37387 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1100:
#line 7373 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->account_options.account_locked= ACCOUNTLOCK_UNLOCKED;
}
#line 37397 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1101:
#line 7380 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->account_options.password_expire= PASSWORD_EXPIRE_NOW;
}
#line 37407 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1102:
#line 7384 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->account_options.password_expire= PASSWORD_EXPIRE_NEVER;
}
#line 37417 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1103:
#line 7388 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->account_options.password_expire= PASSWORD_EXPIRE_DEFAULT;
}
#line 37427 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1104:
#line 7392 "/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 37439 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1110:
#line 7408 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0;}
#line 37447 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1111:
#line 7409 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 37455 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1112:
#line 7410 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 37463 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1113:
#line 7411 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 37471 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1114:
#line 7415 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0;}
#line 37479 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1115:
#line 7417 "/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 37494 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1116:
#line 7428 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0;}
#line 37502 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1117:
#line 7429 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 37510 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1118:
#line 7434 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ident_sys)= Lex_ident_sys(); }
#line 37518 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1121:
#line 7441 "/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 37532 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1122:
#line 7449 "/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 37546 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1128:
#line 7471 "/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 37558 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1129:
#line 7478 "/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 37570 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1130:
#line 7485 "/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 37587 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1132:
#line 7498 "/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 37604 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1133:
#line 7509 "/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 37620 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1135:
#line 7521 "/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 37637 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1137:
#line 7533 "/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 37650 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1138:
#line 7540 "/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 37666 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1140:
#line 7552 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_alter_table_exchange_partition((yyvsp[-1].table)))
MYSQL_YYABORT;
}
#line 37677 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1141:
#line 7560 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.partition_flags|= ALTER_PARTITION_REMOVE;
}
#line 37687 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1142:
#line 7567 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.partition_flags|= ALTER_PARTITION_ALL;
}
#line 37697 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1144:
#line 7576 "/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 37715 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1145:
#line 7588 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37723 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1147:
#line 7594 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->part_info->num_parts= lex->part_info->partitions.elements;
}
#line 37734 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1148:
#line 7599 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->part_info->num_parts= (yyvsp[0].ulong_num);
}
#line 37744 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1149:
#line 7606 "/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 37759 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1151:
#line 7619 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.partition_flags|= ALTER_PARTITION_TABLE_REORG;
}
#line 37769 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1152:
#line 7623 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.partition_flags|= ALTER_PARTITION_REORGANIZE;
}
#line 37779 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1153:
#line 7627 "/home/buildbot/git/sql/sql_yacc.yy"
{
partition_info *part_info= Lex->part_info;
part_info->num_parts= part_info->partitions.elements;
}
#line 37790 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1154:
#line 7634 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37798 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1155:
#line 7635 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37806 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1156:
#line 7640 "/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 37818 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1160:
#line 7662 "/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 37831 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1161:
#line 7669 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_last_non_select_table= Lex->last_table();
Lex->alter_info.flags|= ALTER_ADD_INDEX;
}
#line 37842 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1162:
#line 7674 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.flags|= ALTER_ADD_PERIOD;
}
#line 37852 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1163:
#line 7679 "/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 37864 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1164:
#line 7685 "/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 37877 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1165:
#line 7692 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.flags|= ALTER_ADD_CHECK_CONSTRAINT;
}
#line 37887 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1166:
#line 7696 "/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 37898 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1167:
#line 7702 "/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 37911 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1168:
#line 7710 "/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 37924 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1169:
#line 7717 "/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 37940 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1170:
#line 7727 "/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 37957 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1171:
#line 7738 "/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 37973 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1172:
#line 7748 "/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,
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 37990 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1173:
#line 7759 "/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 38006 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1174:
#line 7769 "/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 38018 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1175:
#line 7775 "/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 38030 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1176:
#line 7781 "/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 38043 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1177:
#line 7788 "/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 38054 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1178:
#line 7793 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->first_select_lex()->db= (yyvsp[0].table)->db;
if (lex->first_select_lex()->db.str == NULL &&
lex->copy_db_to(&lex->first_select_lex()->db))
MYSQL_YYABORT;
if (unlikely(check_table_name((yyvsp[0].table)->table.str,(yyvsp[0].table)->table.length,
FALSE)) ||
((yyvsp[0].table)->db.str && unlikely(check_db_name((LEX_STRING*) &(yyvsp[0].table)->db))))
my_yyabort_error((ER_WRONG_TABLE_NAME, MYF(0), (yyvsp[0].table)->table.str));
lex->name= (yyvsp[0].table)->table;
lex->alter_info.flags|= ALTER_RENAME;
}
#line 38074 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1179:
#line 7807 "/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 38085 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1180:
#line 7812 "/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 38101 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1181:
#line 7822 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!(yyvsp[-1].charset))
{
(yyvsp[-1].charset)= thd->variables.collation_database;
}
(yyvsp[0].charset)= (yyvsp[0].charset) ? (yyvsp[0].charset) : (yyvsp[-1].charset);
if (unlikely(!my_charset_same((yyvsp[-1].charset),(yyvsp[0].charset))))
my_yyabort_error((ER_COLLATION_CHARSET_MISMATCH, MYF(0),
(yyvsp[0].charset)->name, (yyvsp[-1].charset)->csname));
if (unlikely(Lex->create_info.add_alter_list_item_convert_to_charset((yyvsp[0].charset))))
MYSQL_YYABORT;
Lex->alter_info.flags|= ALTER_CONVERT_TO;
}
#line 38121 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1182:
#line 7836 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->alter_info.flags|= ALTER_OPTIONS;
}
#line 38132 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1183:
#line 7841 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.flags|= ALTER_RECREATE;
}
#line 38142 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1184:
#line 7845 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->alter_info.flags|= ALTER_ORDER;
}
#line 38153 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1187:
#line 7852 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.flags|= ALTER_ADD_SYSTEM_VERSIONING;
Lex->create_info.options|= HA_VERSIONED_TABLE;
}
#line 38164 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1188:
#line 7857 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.flags|= ALTER_DROP_SYSTEM_VERSIONING;
Lex->create_info.options&= ~HA_VERSIONED_TABLE;
}
#line 38175 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1189:
#line 7862 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.flags|= ALTER_DROP_PERIOD;
}
#line 38185 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1190:
#line 7866 "/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 38199 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1196:
#line 7885 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.set_requested_algorithm(
Alter_info::ALTER_TABLE_ALGORITHM_DEFAULT);
}
#line 38210 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1197:
#line 7890 "/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 38221 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1198:
#line 7898 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.requested_lock=
Alter_info::ALTER_TABLE_LOCK_DEFAULT;
}
#line 38232 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1199:
#line 7903 "/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 38243 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1200:
#line 7910 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38251 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1201:
#line 7911 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38259 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1202:
#line 7915 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ignore= 0;}
#line 38267 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1203:
#line 7916 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ignore= 1;}
#line 38275 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1204:
#line 7920 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ignore= 0;}
#line 38283 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1210:
#line 7934 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ignore= 1;}
#line 38291 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1211:
#line 7936 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.requested_lock=
Alter_info::ALTER_TABLE_LOCK_NONE;
}
#line 38302 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1212:
#line 7943 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->drop_mode= DROP_DEFAULT; }
#line 38310 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1213:
#line 7944 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->drop_mode= DROP_RESTRICT; }
#line 38318 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1214:
#line 7945 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->drop_mode= DROP_CASCADE; }
#line 38326 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1215:
#line 7949 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= null_clex_str; }
#line 38334 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1216:
#line 7951 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.lex_str)= (yyvsp[0].ident_sys);
Lex->alter_info.flags |= ALTER_COLUMN_ORDER;
}
#line 38345 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1217:
#line 7956 "/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 38357 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1218:
#line 7964 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38365 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1219:
#line 7965 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38373 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1220:
#line 7966 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38381 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1221:
#line 7967 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38389 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1222:
#line 7972 "/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 38402 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1223:
#line 7979 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38410 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1224:
#line 7981 "/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 38423 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1225:
#line 7987 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38431 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1226:
#line 7989 "/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 38444 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1227:
#line 7996 "/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 38457 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1228:
#line 8006 "/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 38476 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1229:
#line 8022 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= 0;
}
#line 38486 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1230:
#line 8026 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= (yyvsp[0].num);
}
#line 38496 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1231:
#line 8033 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= (yyvsp[0].num);
}
#line 38506 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1232:
#line 8037 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= (yyvsp[-2].num) | (yyvsp[0].num);
}
#line 38516 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1233:
#line 8044 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= MYSQL_START_TRANS_OPT_WITH_CONS_SNAPSHOT;
}
#line 38526 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1234:
#line 8048 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= MYSQL_START_TRANS_OPT_READ_ONLY;
}
#line 38536 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1235:
#line 8052 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= MYSQL_START_TRANS_OPT_READ_WRITE;
}
#line 38546 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1236:
#line 8058 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->slave_thd_opt= 0; }
#line 38554 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1237:
#line 8060 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38562 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1240:
#line 8069 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38570 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1241:
#line 8070 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->slave_thd_opt|=SLAVE_SQL; }
#line 38578 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1242:
#line 8071 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->slave_thd_opt|=SLAVE_IO; }
#line 38586 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1243:
#line 8075 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38594 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1244:
#line 8077 "/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 38609 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1245:
#line 8086 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->mi.gtid_pos_str = (yyvsp[0].lex_str);
}
#line 38619 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1248:
#line 8098 "/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 38632 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1249:
#line 8105 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38640 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1250:
#line 8109 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags= 0; }
#line 38648 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1251:
#line 8110 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags= T_QUICK; }
#line 38656 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1252:
#line 8111 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags= T_EXTEND; }
#line 38664 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1254:
#line 8117 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->table_type= TABLE_TYPE_VIEW; }
#line 38672 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1256:
#line 8123 "/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 38688 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1257:
#line 8133 "/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 38702 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1258:
#line 8143 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags = T_MEDIUM; }
#line 38710 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1259:
#line 8144 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38718 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1260:
#line 8148 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38726 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1261:
#line 8149 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38734 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1262:
#line 8153 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags|= T_QUICK; }
#line 38742 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1263:
#line 8154 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags|= T_EXTEND; }
#line 38750 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1264:
#line 8155 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.sql_flags|= TT_USEFRM; }
#line 38758 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1265:
#line 8159 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 38766 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1266:
#line 8160 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.sql_flags|= TT_FROM_MYSQL; }
#line 38774 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1267:
#line 8165 "/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 38790 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1268:
#line 8175 "/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 38804 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1272:
#line 8195 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38812 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1273:
#line 8197 "/home/buildbot/git/sql/sql_yacc.yy"
{
thd->lex->with_persistent_for_clause= TRUE;
}
#line 38822 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1274:
#line 8204 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38830 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1275:
#line 8206 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38838 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1276:
#line 8210 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38846 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1277:
#line 8212 "/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 38859 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1278:
#line 8220 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 38867 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1279:
#line 8224 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38875 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1280:
#line 8226 "/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 38888 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1281:
#line 8234 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 38896 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1282:
#line 8239 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38904 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1283:
#line 8241 "/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 38915 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1284:
#line 8246 "/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 38926 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1285:
#line 8254 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38934 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1288:
#line 8261 "/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 38946 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1289:
#line 8268 "/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 38959 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1290:
#line 8278 "/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 38972 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1291:
#line 8286 "/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 38984 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1293:
#line 8296 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->table_type= TABLE_TYPE_VIEW; }
#line 38992 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1295:
#line 8301 "/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 39008 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1296:
#line 8311 "/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 39024 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1297:
#line 8323 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags = T_MEDIUM; }
#line 39032 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1298:
#line 8324 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 39040 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1299:
#line 8328 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 39048 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1300:
#line 8329 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 39056 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1301:
#line 8333 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags|= T_QUICK; }
#line 39064 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1302:
#line 8334 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags|= T_FAST; }
#line 39072 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1303:
#line 8335 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags|= T_MEDIUM; }
#line 39080 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1304:
#line 8336 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags|= T_EXTEND; }
#line 39088 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1305:
#line 8337 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags|= T_CHECK_ONLY_CHANGED; }
#line 39096 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1306:
#line 8338 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.sql_flags|= TT_FOR_UPGRADE; }
#line 39104 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1307:
#line 8342 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 39112 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1308:
#line 8343 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.sql_flags|= TT_FOR_UPGRADE; }
#line 39120 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1309:
#line 8348 "/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 39136 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1310:
#line 8358 "/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 39150 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1311:
#line 8368 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 39158 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1312:
#line 8369 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 39166 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1313:
#line 8370 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 39174 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1314:
#line 8375 "/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 39187 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1315:
#line 8382 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->pop_select(); //main select
}
#line 39197 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1316:
#line 8386 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_RENAME_USER;
}
#line 39207 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1317:
#line 8393 "/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 39219 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1318:
#line 8399 "/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 39231 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1321:
#line 8413 "/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 39249 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1322:
#line 8428 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.reset();
}
#line 39259 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1323:
#line 8432 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_ASSIGN_TO_KEYCACHE;
lex->ident= (yyvsp[0].lex_str);
}
#line 39271 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1328:
#line 8451 "/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 39285 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1329:
#line 8462 "/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 39299 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1330:
#line 8472 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= (yyvsp[0].ident_sys); }
#line 39307 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1331:
#line 8473 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str) = default_key_cache_base; }
#line 39315 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1332:
#line 8478 "/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 39329 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1333:
#line 8486 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->pop_select(); //main select
}
#line 39339 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1338:
#line 8503 "/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 39353 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1339:
#line 8514 "/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 39367 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1340:
#line 8525 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.partition_flags|= ALTER_PARTITION_ADMIN;
}
#line 39377 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1342:
#line 8532 "/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 39389 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1344:
#line 8541 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 39397 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1346:
#line 8547 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 39405 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1347:
#line 8548 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= TL_OPTION_IGNORE_LEAVES; }
#line 39413 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1348:
#line 8558 "/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 39426 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1349:
#line 8565 "/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 39439 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1350:
#line 8572 "/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 39452 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1351:
#line 8579 "/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 39466 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1352:
#line 8590 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->push_select((yyvsp[0].select_lex)))
MYSQL_YYABORT;
}
#line 39477 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1353:
#line 8595 "/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 39493 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1354:
#line 8606 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->push_select((yyvsp[0].select_lex)))
MYSQL_YYABORT;
}
#line 39504 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1355:
#line 8611 "/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 39522 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1356:
#line 8625 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_lex)= (yyvsp[0].select_lex); }
#line 39530 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1357:
#line 8626 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_lex)= (yyvsp[0].select_lex); }
#line 39538 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1358:
#line 8631 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->parsed_TVC_start())
MYSQL_YYABORT;
}
#line 39549 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1359:
#line 8636 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.select_lex)= Lex->parsed_TVC_end()))
MYSQL_YYABORT;
}
#line 39560 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1360:
#line 8644 "/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 39575 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1361:
#line 8653 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->parsing_place= SELECT_LIST;
}
#line 39585 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1362:
#line 8657 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->parsing_place= NO_MATTER;
}
#line 39595 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1363:
#line 8669 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lex)= Lex->pop_select();
}
#line 39605 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1364:
#line 8682 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lex)= Lex->pop_select();
}
#line 39615 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1365:
#line 8740 "/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 39626 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1366:
#line 8746 "/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 39638 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1367:
#line 8759 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_lex_unit)= (yyvsp[0].select_lex_unit); }
#line 39646 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1368:
#line 8760 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_lex_unit)= (yyvsp[0].select_lex_unit); }
#line 39654 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1369:
#line 8775 "/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 39668 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1370:
#line 8783 "/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 39681 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1371:
#line 8790 "/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 39692 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1372:
#line 8795 "/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 39703 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1373:
#line 8803 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_lex_unit)= (yyvsp[-1].select_lex_unit); }
#line 39711 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1374:
#line 8805 "/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 39724 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1375:
#line 8820 "/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 39736 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1376:
#line 8827 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!(yyvsp[-1].select_lex_unit)->first_select()->next_select())
{
Lex->pop_select();
}
}
#line 39749 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1377:
#line 8834 "/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 39762 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1378:
#line 8843 "/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 39776 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1379:
#line 8859 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_lex)= (yyvsp[0].select_lex); }
#line 39784 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1380:
#line 8861 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_lex)= (yyvsp[0].select_lex_unit)->first_select(); }
#line 39792 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1381:
#line 8870 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_lex)= (yyvsp[0].select_lex);}
#line 39800 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1382:
#line 8875 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.select_lex)= Lex->parsed_subselect((yyvsp[0].select_lex_unit))))
YYABORT;
}
#line 39811 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1383:
#line 8916 "/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))))
YYABORT;
}
#line 39826 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1384:
#line 8925 "/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))))
YYABORT;
}
#line 39839 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1388:
#line 8944 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->context.table_list=
Select->context.first_name_resolution_table=
Select->table_list.first;
}
#line 39851 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1391:
#line 8959 "/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 39863 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1392:
#line 8968 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.vers_range_unit)= VERS_TIMESTAMP;
}
#line 39873 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1393:
#line 8972 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.vers_range_unit)= VERS_TRX_ID;
}
#line 39883 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1394:
#line 8976 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.vers_range_unit)= VERS_TIMESTAMP;
}
#line 39893 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1395:
#line 8983 "/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 39908 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1396:
#line 8992 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.vers_history_point)= Vers_history_point(VERS_TIMESTAMP, (yyvsp[0].item));
}
#line 39918 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1397:
#line 8996 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.vers_history_point)= Vers_history_point((yyvsp[-1].vers_range_unit), (yyvsp[0].item));
}
#line 39928 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1398:
#line 9004 "/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 39946 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1399:
#line 9019 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= false;
}
#line 39956 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1400:
#line 9023 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= true;
}
#line 39966 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1401:
#line 9030 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= false;
}
#line 39976 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1402:
#line 9034 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= true;
}
#line 39986 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1403:
#line 9041 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->vers_conditions.init(SYSTEM_TIME_AS_OF, (yyvsp[0].vers_history_point));
}
#line 39996 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1404:
#line 9045 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->vers_conditions.init(SYSTEM_TIME_ALL);
}
#line 40006 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1405:
#line 9049 "/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 40016 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1406:
#line 9053 "/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 40026 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1410:
#line 9066 "/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 40041 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1411:
#line 9075 "/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 40056 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1412:
#line 9088 "/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 40068 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1413:
#line 9094 "/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 40080 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1414:
#line 9104 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lock).empty();
}
#line 40090 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1415:
#line 9108 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lock)= (yyvsp[0].select_lock);
}
#line 40100 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1416:
#line 9116 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lock).empty();
}
#line 40110 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1417:
#line 9120 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lock).defined_timeout= TRUE;
(yyval.select_lock).timeout= (yyvsp[0].ulong_num);
}
#line 40121 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1418:
#line 9125 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lock).defined_timeout= TRUE;
(yyval.select_lock).timeout= 0;
}
#line 40132 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1421:
#line 9135 "/home/buildbot/git/sql/sql_yacc.yy"
{
Item *item= new (thd->mem_root)
Item_field(thd, &thd->lex->current_select->context,
star_clex_str);
if (unlikely(item == NULL))
MYSQL_YYABORT;
if (unlikely(add_item_to_list(thd, item)))
MYSQL_YYABORT;
(thd->lex->current_select->with_wild)++;
}
#line 40149 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1422:
#line 9149 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(add_item_to_list(thd, (yyvsp[-1].item))))
MYSQL_YYABORT;
}
#line 40160 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1423:
#line 9154 "/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)->common_flags&= ~IS_AUTO_GENERATED_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 40185 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1424:
#line 9175 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.simple_string)= (char*) YYLIP->get_tok_start();
}
#line 40195 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1425:
#line 9181 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.simple_string)= (char*) YYLIP->get_cpp_tok_start();
}
#line 40205 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1426:
#line 9187 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.simple_string)= (char*) YYLIP->get_cpp_tok_end_rtrim();
}
#line 40215 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1427:
#line 9193 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=null_clex_str;}
#line 40223 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1428:
#line 9194 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].ident_sys); }
#line 40231 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1429:
#line 9195 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].lex_str); }
#line 40239 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1430:
#line 9196 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].ident_sys); }
#line 40247 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1431:
#line 9197 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].lex_str); }
#line 40255 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1432:
#line 9201 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= NOT_FIXED_DEC; }
#line 40263 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1433:
#line 9202 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= NOT_FIXED_DEC; }
#line 40271 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1434:
#line 9203 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= (yyvsp[-1].ulong_num); }
#line 40279 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1435:
#line 9207 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 40287 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1436:
#line 9208 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 40295 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1437:
#line 9209 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= (yyvsp[-1].ulong_num); }
#line 40303 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1438:
#line 9213 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 40311 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1439:
#line 9214 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 40319 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1440:
#line 9220 "/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 40376 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1441:
#line 9271 "/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 40389 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1442:
#line 9278 "/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 40438 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1443:
#line 9321 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= negate_expression(thd, (yyvsp[0].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40450 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1444:
#line 9327 "/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 40462 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1445:
#line 9333 "/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 40474 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1446:
#line 9339 "/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 40486 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1447:
#line 9345 "/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 40498 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1448:
#line 9351 "/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 40510 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1449:
#line 9357 "/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 40522 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1450:
#line 9363 "/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 40534 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1451:
#line 9369 "/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 40546 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1452:
#line 9375 "/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 40558 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1453:
#line 9381 "/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 40570 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1454:
#line 9387 "/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 40582 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1456:
#line 9397 "/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 40594 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1457:
#line 9403 "/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 40609 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1458:
#line 9412 "/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 40621 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1459:
#line 9418 "/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 40635 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1460:
#line 9426 "/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 40647 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1461:
#line 9432 "/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 40662 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1462:
#line 9441 "/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 40674 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1463:
#line 9447 "/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 40688 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1464:
#line 9455 "/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 40704 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1465:
#line 9465 "/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 40716 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1466:
#line 9471 "/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 40729 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1467:
#line 9478 "/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 40742 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1468:
#line 9485 "/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 40756 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1469:
#line 9493 "/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 40768 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1470:
#line 9499 "/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 40783 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1472:
#line 9512 "/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 40795 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1473:
#line 9518 "/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 40807 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1474:
#line 9524 "/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 40819 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1475:
#line 9530 "/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 40831 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1476:
#line 9536 "/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 40844 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1477:
#line 9543 "/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 40856 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1478:
#line 9549 "/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 40868 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1479:
#line 9555 "/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 40880 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1480:
#line 9561 "/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 40892 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1481:
#line 9568 "/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 40904 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1482:
#line 9574 "/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 40916 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1483:
#line 9580 "/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 40928 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1484:
#line 9586 "/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 40940 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1485:
#line 9592 "/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 40952 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1486:
#line 9598 "/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 40964 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1487:
#line 9604 "/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 40976 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1488:
#line 9610 "/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 40988 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1489:
#line 9616 "/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 41000 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1499:
#line 9645 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.boolfunc2creator) = &comp_eq_creator; }
#line 41008 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1500:
#line 9646 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.boolfunc2creator) = &comp_ge_creator; }
#line 41016 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1501:
#line 9647 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.boolfunc2creator) = &comp_gt_creator; }
#line 41024 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1502:
#line 9648 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.boolfunc2creator) = &comp_le_creator; }
#line 41032 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1503:
#line 9649 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.boolfunc2creator) = &comp_lt_creator; }
#line 41040 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1504:
#line 9650 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.boolfunc2creator) = &comp_ne_creator; }
#line 41048 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1505:
#line 9654 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 1; }
#line 41056 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1506:
#line 9655 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 0; }
#line 41064 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1507:
#line 9660 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_dyncol_type).set(DYN_COL_NULL); /* automatic type */
Lex->charset= NULL;
}
#line 41075 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1508:
#line 9664 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type)= (yyvsp[0].Lex_dyncol_type); }
#line 41083 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1509:
#line 9668 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type)= (yyvsp[0].Lex_dyncol_type); Lex->charset= NULL; }
#line 41091 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1510:
#line 9669 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type)= (yyvsp[0].Lex_dyncol_type); Lex->charset= NULL; }
#line 41099 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1511:
#line 9670 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type)= (yyvsp[0].Lex_dyncol_type); }
#line 41107 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1512:
#line 9674 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type).set(DYN_COL_INT); }
#line 41115 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1513:
#line 9675 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type).set(DYN_COL_UINT); }
#line 41123 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1514:
#line 9676 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type).set(DYN_COL_DOUBLE); }
#line 41131 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1515:
#line 9677 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type).set(DYN_COL_DOUBLE); }
#line 41139 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1516:
#line 9678 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type).set(DYN_COL_DOUBLE); }
#line 41147 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1517:
#line 9679 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type).set(DYN_COL_DECIMAL, (yyvsp[0].Lex_length_and_dec)); }
#line 41155 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1518:
#line 9683 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type).set(DYN_COL_DATE); }
#line 41163 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1519:
#line 9684 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type).set(DYN_COL_TIME, 0, (yyvsp[0].const_simple_string)); }
#line 41171 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1520:
#line 9685 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type).set(DYN_COL_DATETIME, 0, (yyvsp[0].const_simple_string)); }
#line 41179 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1521:
#line 9690 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->charset= thd->variables.collation_connection; }
#line 41187 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1522:
#line 9692 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_dyncol_type).set(DYN_COL_STRING);
}
#line 41197 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1523:
#line 9696 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_dyncol_type).set(DYN_COL_STRING);
Lex->charset= national_charset_info;
}
#line 41208 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1524:
#line 9704 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
(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= lex->charset;
if ((yyvsp[0].Lex_dyncol_type).length())
(yyval.dyncol_def)->len= strtoul((yyvsp[0].Lex_dyncol_type).length(), NULL, 10);
else
(yyval.dyncol_def)->len= 0;
if ((yyvsp[0].Lex_dyncol_type).dec())
(yyval.dyncol_def)->frac= strtoul((yyvsp[0].Lex_dyncol_type).dec(), NULL, 10);
else
(yyval.dyncol_def)->len= 0;
}
#line 41234 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1525:
#line 9727 "/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 41247 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1526:
#line 9734 "/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 41258 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1527:
#line 9742 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.plsql_cursor_attr)= PLSQL_CURSOR_ATTR_ISOPEN; }
#line 41266 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1528:
#line 9743 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.plsql_cursor_attr)= PLSQL_CURSOR_ATTR_FOUND; }
#line 41274 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1529:
#line 9744 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.plsql_cursor_attr)= PLSQL_CURSOR_ATTR_NOTFOUND; }
#line 41282 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1530:
#line 9745 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.plsql_cursor_attr)= PLSQL_CURSOR_ATTR_ROWCOUNT; }
#line 41290 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1531:
#line 9750 "/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 41301 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1532:
#line 9758 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.trim).set(TRIM_BOTH, (yyvsp[0].item)); }
#line 41309 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1533:
#line 9759 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.trim).set(TRIM_LEADING, (yyvsp[-2].item), (yyvsp[0].item)); }
#line 41317 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1534:
#line 9760 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.trim).set(TRIM_TRAILING, (yyvsp[-2].item), (yyvsp[0].item)); }
#line 41325 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1535:
#line 9761 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.trim).set(TRIM_BOTH, (yyvsp[-2].item), (yyvsp[0].item)); }
#line 41333 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1536:
#line 9762 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.trim).set(TRIM_LEADING, (yyvsp[0].item)); }
#line 41341 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1537:
#line 9763 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.trim).set(TRIM_TRAILING, (yyvsp[0].item)); }
#line 41349 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1538:
#line 9764 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.trim).set(TRIM_BOTH, (yyvsp[0].item)); }
#line 41357 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1539:
#line 9765 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.trim).set(TRIM_BOTH, (yyvsp[-2].item), (yyvsp[0].item)); }
#line 41365 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1546:
#line 9803 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)= (yyvsp[0].item_param); }
#line 41373 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1548:
#line 9806 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!Lex->select_stack_top)
{
my_error(ER_INVALID_GROUP_FUNC_USE, MYF(0));
MYSQL_YYABORT;
}
}
#line 41387 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1549:
#line 9814 "/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 41401 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1551:
#line 9823 "/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 41414 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1552:
#line 9830 "/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 41426 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1553:
#line 9836 "/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 41437 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1554:
#line 9841 "/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 41453 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1555:
#line 9851 "/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),
Lex->charset))))
MYSQL_YYABORT;
}
#line 41465 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1556:
#line 9857 "/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 41476 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1557:
#line 9862 "/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 41488 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1558:
#line 9868 "/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),
Lex->charset))))
MYSQL_YYABORT;
}
#line 41500 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1559:
#line 9874 "/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 41512 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1560:
#line 9880 "/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 41529 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1561:
#line 9891 "/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 41542 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1562:
#line 9898 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_func_nextval(thd, (yyvsp[0].table)))))
MYSQL_YYABORT;
}
#line 41553 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1563:
#line 9903 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_func_nextval(thd, (yyvsp[-1].table)))))
MYSQL_YYABORT;
}
#line 41564 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1564:
#line 9908 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_func_lastval(thd, (yyvsp[0].table)))))
MYSQL_YYABORT;
}
#line 41575 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1565:
#line 9913 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_func_lastval(thd, (yyvsp[-1].table)))))
MYSQL_YYABORT;
}
#line 41586 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1566:
#line 9918 "/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 41597 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1567:
#line 9923 "/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 41608 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1568:
#line 9928 "/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 41619 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1571:
#line 9937 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)= (yyvsp[-1].item); }
#line 41627 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1572:
#line 9939 "/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 41638 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1574:
#line 9948 "/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].charset)))))
MYSQL_YYABORT;
}
#line 41649 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1576:
#line 9957 "/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 41661 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1577:
#line 9963 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= (yyvsp[0].item);
}
#line 41671 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1578:
#line 9967 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= (yyvsp[0].item)->neg(thd);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41683 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1579:
#line 9973 "/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 41695 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1580:
#line 9979 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= negate_expression(thd, (yyvsp[0].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 41707 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1582:
#line 9989 "/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 41719 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1583:
#line 9998 "/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 41732 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1584:
#line 10005 "/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 41744 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1585:
#line 10019 "/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 41756 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1586:
#line 10025 "/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 41768 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1587:
#line 10031 "/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 41783 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1588:
#line 10040 "/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 41798 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1589:
#line 10049 "/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 41810 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1590:
#line 10055 "/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 41822 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1591:
#line 10061 "/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 41834 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1592:
#line 10067 "/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 41846 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1593:
#line 10073 "/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 41867 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1594:
#line 10088 "/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 41884 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1595:
#line 10099 "/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 41896 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1596:
#line 10105 "/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 41908 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1597:
#line 10111 "/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 41920 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1598:
#line 10117 "/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 41932 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1599:
#line 10123 "/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 41944 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1600:
#line 10129 "/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 41958 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1601:
#line 10137 "/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 41971 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1602:
#line 10144 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= (yyvsp[0].item);
}
#line 41981 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1603:
#line 10148 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= (yyvsp[-1].trim).make_item_func_trim(thd))))
MYSQL_YYABORT;
}
#line 41992 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1604:
#line 10153 "/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 42006 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1605:
#line 10161 "/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 42018 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1606:
#line 10182 "/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 42031 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1607:
#line 10189 "/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 42043 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1608:
#line 10195 "/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 42056 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1609:
#line 10202 "/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 42069 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1610:
#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), 0);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 42081 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1611:
#line 10215 "/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 42093 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1612:
#line 10221 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_date_format(thd, (yyvsp[-3].item), (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 42105 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1613:
#line 10227 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_date_format(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 42117 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1614:
#line 10233 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_decode(thd, (yyvsp[-3].item), (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 42129 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1615:
#line 10239 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[-1].item_list)->push_front((yyvsp[-3].item), thd->mem_root);
if (unlikely(!((yyval.item)= new (thd->mem_root) Item_func_decode_oracle(thd, *(yyvsp[-1].item_list)))))
MYSQL_YYABORT;
}
#line 42141 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1616:
#line 10245 "/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 42153 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1617:
#line 10251 "/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 42165 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1618:
#line 10257 "/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 42178 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1619:
#line 10264 "/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 42190 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1620:
#line 10270 "/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 42203 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1621:
#line 10277 "/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 42215 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1622:
#line 10283 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->make_item_func_substr(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item)))))
MYSQL_YYABORT;
}
#line 42226 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1623:
#line 10288 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->make_item_func_substr(thd, (yyvsp[-3].item), (yyvsp[-1].item)))))
MYSQL_YYABORT;
}
#line 42237 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1624:
#line 10293 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->make_item_func_substr(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item)))))
MYSQL_YYABORT;
}
#line 42248 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1625:
#line 10298 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->make_item_func_substr(thd, (yyvsp[-3].item), (yyvsp[-1].item)))))
MYSQL_YYABORT;
}
#line 42259 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1626:
#line 10303 "/home/buildbot/git/sql/sql_yacc.yy"
{
/*
Unlike other time-related functions, SYSDATE() is
replication-unsafe because it is not affected by the
TIMESTAMP variable. It is unsafe even if
sysdate_is_now=1, because the slave may have
sysdate_is_now=0.
*/
Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
if (global_system_variables.sysdate_is_now == 0)
(yyval.item)= new (thd->mem_root) Item_func_sysdate_local(thd, (yyvsp[0].num));
else
(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 42283 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1627:
#line 10321 "/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 42295 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1628:
#line 10327 "/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 42307 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1629:
#line 10333 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= (yyvsp[-1].trim).make_item_func_trim_oracle(thd))))
MYSQL_YYABORT;
}
#line 42318 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1630:
#line 10338 "/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 42331 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1631:
#line 10345 "/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 42344 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1632:
#line 10352 "/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 42357 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1633:
#line 10360 "/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 42369 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1634:
#line 10367 "/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 42381 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1635:
#line 10374 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_dyncol_check(thd, (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 42393 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1636:
#line 10381 "/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 42405 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1637:
#line 10388 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
(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).length(), (yyvsp[-1].Lex_cast_type).dec(),
lex->charset);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 42420 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1638:
#line 10405 "/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 42432 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1639:
#line 10411 "/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 42444 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1640:
#line 10417 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_coalesce(thd, *(yyvsp[-1].item_list));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 42456 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1641:
#line 10423 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_collation(thd, (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 42468 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1642:
#line 10429 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_database(thd);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
Lex->safe_to_cache_query=0;
}
#line 42481 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1643:
#line 10436 "/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 42493 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1644:
#line 10442 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_format(thd, (yyvsp[-3].item), (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 42505 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1645:
#line 10448 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_format(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 42517 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1646:
#line 10457 "/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 42534 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1647:
#line 10468 "/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 42547 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1648:
#line 10475 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_microsecond(thd, (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 42559 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1649:
#line 10481 "/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 42571 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1650:
#line 10487 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root)
Item_func_password(thd, (yyvsp[-1].item), Item_func_password::OLD);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 42584 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1651:
#line 10494 "/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 42598 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1652:
#line 10502 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_quarter(thd, (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 42610 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1653:
#line 10508 "/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 42622 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1654:
#line 10514 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->make_item_func_replace(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item)))))
MYSQL_YYABORT;
}
#line 42633 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1655:
#line 10519 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_reverse(thd, (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 42645 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1656:
#line 10525 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_row_count(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 42659 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1657:
#line 10533 "/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 42671 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1658:
#line 10539 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_week(thd, (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 42683 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1659:
#line 10545 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_week(thd, (yyvsp[-3].item), (yyvsp[-1].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 42695 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1660:
#line 10551 "/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 42707 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1661:
#line 10557 "/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 42721 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1662:
#line 10565 "/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 42739 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1663:
#line 10577 "/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 42752 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1664:
#line 10596 "/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 42777 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1665:
#line 10615 "/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)
*/
if ((builder= find_native_function_builder(thd, &(yyvsp[-4].ident_sys))))
{
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 42838 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1666:
#line 10670 "/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 42850 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1667:
#line 10676 "/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 42862 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1668:
#line 10682 "/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 42874 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1669:
#line 10688 "/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 42885 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1670:
#line 10696 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= (yyvsp[-1].num) | (yyvsp[0].num); }
#line 42893 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1671:
#line 10698 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= FT_BOOL; }
#line 42901 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1672:
#line 10702 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= FT_NL; }
#line 42909 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1673:
#line 10703 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= FT_NL; }
#line 42917 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1674:
#line 10707 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 42925 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1675:
#line 10708 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= FT_EXPAND; }
#line 42933 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1676:
#line 10712 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item_list)= NULL; }
#line 42941 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1677:
#line 10713 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item_list)= (yyvsp[0].item_list); }
#line 42949 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1678:
#line 10718 "/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 42962 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1679:
#line 10725 "/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 42973 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1680:
#line 10733 "/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)->common_flags&= ~IS_AUTO_GENERATED_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 43003 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1681:
#line 10760 "/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 43015 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1682:
#line 10766 "/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 43027 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1683:
#line 10772 "/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 43039 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1684:
#line 10778 "/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 43051 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1685:
#line 10784 "/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 43063 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1686:
#line 10790 "/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 43078 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1687:
#line 10799 "/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 43090 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1688:
#line 10805 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->in_sum_expr++; }
#line 43098 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1689:
#line 10807 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->in_sum_expr--; }
#line 43106 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1690:
#line 10809 "/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 43118 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1691:
#line 10815 "/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 43130 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1692:
#line 10826 "/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 43142 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1693:
#line 10832 "/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 43154 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1694:
#line 10838 "/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 43166 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1695:
#line 10844 "/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 43178 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1696:
#line 10850 "/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 43190 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1697:
#line 10856 "/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 43202 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1698:
#line 10862 "/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 43214 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1699:
#line 10868 "/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 43226 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1700:
#line 10874 "/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 43238 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1701:
#line 10880 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->in_sum_expr++; }
#line 43246 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1702:
#line 10884 "/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->select_limit,
sel->offset_limit);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
sel->select_limit= NULL;
sel->offset_limit= NULL;
sel->explicit_limit= 0;
(yyvsp[-4].item_list)->empty();
sel->gorder_list.empty();
}
#line 43270 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1703:
#line 10902 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->in_sum_expr++; }
#line 43278 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1704:
#line 10905 "/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->select_limit,
sel->offset_limit);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
sel->select_limit= NULL;
sel->offset_limit= NULL;
sel->explicit_limit= 0;
(yyvsp[-3].item_list)->empty();
sel->gorder_list.empty();
}
#line 43313 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1705:
#line 10934 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->in_sum_expr++; }
#line 43321 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1706:
#line 10936 "/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 43336 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1707:
#line 10948 "/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 43350 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1708:
#line 10957 "/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 43371 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1710:
#line 10977 "/home/buildbot/git/sql/sql_yacc.yy"
{
((Item_sum *) (yyvsp[0].item))->mark_as_window_func_sum_expr();
}
#line 43381 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1711:
#line 10982 "/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;
}
((Item_sum *) (yyvsp[0].item))->mark_as_window_func_sum_expr();
}
#line 43401 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1712:
#line 10999 "/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 43413 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1713:
#line 11006 "/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 43425 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1714:
#line 11013 "/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 43437 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1715:
#line 11020 "/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 43449 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1716:
#line 11027 "/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 43461 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1717:
#line 11034 "/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 43473 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1718:
#line 11041 "/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 43485 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1719:
#line 11048 "/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 43497 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1720:
#line 11055 "/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 43509 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1721:
#line 11062 "/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 43525 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1722:
#line 11073 "/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 43537 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1723:
#line 11080 "/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 43553 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1724:
#line 11091 "/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 43565 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1725:
#line 11103 "/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 43586 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1726:
#line 11121 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->prepare_add_window_spec(thd); }
#line 43594 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1727:
#line 11123 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= (yyvsp[-6].item);
}
#line 43604 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1728:
#line 11127 "/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 43624 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1729:
#line 11144 "/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 43636 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1730:
#line 11150 "/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 43648 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1731:
#line 11159 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(add_order_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
MYSQL_YYABORT;
}
#line 43659 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1732:
#line 11168 "/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 43671 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1733:
#line 11177 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(! Lex->parsing_options.allows_variable))
my_yyabort_error((ER_VIEW_SELECT_VARIABLE, MYF(0)));
}
#line 43682 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1734:
#line 11182 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= (yyvsp[0].item);
}
#line 43692 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1735:
#line 11189 "/home/buildbot/git/sql/sql_yacc.yy"
{
Item_func_set_user_var *item;
(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 43708 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1736:
#line 11199 "/home/buildbot/git/sql/sql_yacc.yy"
{
(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 43722 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1737:
#line 11207 "/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 43733 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1738:
#line 11212 "/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 43744 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1739:
#line 11219 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 0; }
#line 43752 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1740:
#line 11220 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 1; }
#line 43760 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1741:
#line 11225 "/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 43772 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1742:
#line 11230 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.string) = (yyvsp[0].string); }
#line 43780 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1745:
#line 11240 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(add_gorder_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
MYSQL_YYABORT;
}
#line 43791 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1746:
#line 11245 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(add_gorder_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
MYSQL_YYABORT;
}
#line 43802 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1747:
#line 11252 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 0; }
#line 43810 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1748:
#line 11253 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 1; }
#line 43818 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1749:
#line 11257 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 43826 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1750:
#line 11262 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
}
#line 43836 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1751:
#line 11269 "/home/buildbot/git/sql/sql_yacc.yy"
{
SELECT_LEX *sel= Select;
sel->select_limit= (yyvsp[0].item);
sel->offset_limit= 0;
sel->explicit_limit= 1;
}
#line 43849 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1752:
#line 11276 "/home/buildbot/git/sql/sql_yacc.yy"
{
SELECT_LEX *sel= Select;
sel->select_limit= (yyvsp[0].item);
sel->offset_limit= (yyvsp[-2].item);
sel->explicit_limit= 1;
}
#line 43862 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1753:
#line 11283 "/home/buildbot/git/sql/sql_yacc.yy"
{
SELECT_LEX *sel= Select;
sel->select_limit= (yyvsp[-2].item);
sel->offset_limit= (yyvsp[0].item);
sel->explicit_limit= 1;
}
#line 43875 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1754:
#line 11295 "/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 43890 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1755:
#line 11304 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->in_sum_expr--;
(yyval.item)= (yyvsp[0].item);
}
#line 43901 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1756:
#line 11312 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_long_blob, (yyvsp[0].const_simple_string)); Lex->charset= &my_charset_bin; }
#line 43909 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1757:
#line 11314 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->charset= thd->variables.collation_connection; }
#line 43917 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1758:
#line 11316 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_long_blob, (yyvsp[-2].const_simple_string)); }
#line 43925 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1759:
#line 11318 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->charset= thd->variables.collation_connection; }
#line 43933 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1760:
#line 11320 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_long_blob, (yyvsp[-2].const_simple_string)); }
#line 43941 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1761:
#line 11322 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->charset= thd->variables.collation_connection; }
#line 43949 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1762:
#line 11324 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_long_blob, (yyvsp[-2].const_simple_string)); }
#line 43957 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1763:
#line 11326 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->charset= national_charset_info;
(yyval.Lex_cast_type).set(&type_handler_long_blob, (yyvsp[0].const_simple_string), 0);
}
#line 43968 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1764:
#line 11330 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type)= (yyvsp[0].Lex_cast_type); Lex->charset= NULL; }
#line 43976 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1765:
#line 11331 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type)= (yyvsp[0].Lex_cast_type); Lex->charset= NULL; }
#line 43984 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1766:
#line 11333 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->set_cast_type_udt(&(yyval.Lex_cast_type), (yyvsp[0].ident_sys)))
MYSQL_YYABORT;
}
#line 43995 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1767:
#line 11338 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->set_cast_type_udt(&(yyval.Lex_cast_type), (yyvsp[0].kwd)))
MYSQL_YYABORT;
}
#line 44006 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1768:
#line 11343 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->set_cast_type_udt(&(yyval.Lex_cast_type), (yyvsp[0].kwd)))
MYSQL_YYABORT;
}
#line 44017 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1769:
#line 11350 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_slonglong); }
#line 44025 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1770:
#line 11351 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_slonglong); }
#line 44033 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1771:
#line 11352 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_slonglong); }
#line 44041 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1772:
#line 11353 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_ulonglong); }
#line 44049 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1773:
#line 11354 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_ulonglong); }
#line 44057 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1774:
#line 11355 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_newdecimal, (yyvsp[0].Lex_length_and_dec)); }
#line 44065 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1775:
#line 11356 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_float); }
#line 44073 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1776:
#line 11357 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_double, (yyvsp[0].Lex_length_and_dec)); }
#line 44081 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1777:
#line 11361 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_newdate); }
#line 44089 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1778:
#line 11362 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_time2, 0, (yyvsp[0].const_simple_string)); }
#line 44097 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1779:
#line 11363 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_cast_type).set(&type_handler_datetime2, 0, (yyvsp[0].const_simple_string)); }
#line 44105 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1780:
#line 11365 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_cast_type).set(&type_handler_interval_DDhhmmssff, 0, (yyvsp[0].const_simple_string));
}
#line 44115 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1781:
#line 11371 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item_list)= NULL; }
#line 44123 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1782:
#line 11372 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item_list)= (yyvsp[0].item_list);}
#line 44131 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1783:
#line 11377 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item_list)= List
- ::make(thd->mem_root, (yyvsp[0].item)))))
MYSQL_YYABORT;
}
#line 44142 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1784:
#line 11382 "/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 44153 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1785:
#line 11389 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item_list)= (yyvsp[0].item_list); }
#line 44161 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1786:
#line 11390 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item_list)= (yyvsp[-1].item_list); }
#line 44169 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1787:
#line 11395 "/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 44182 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1788:
#line 11402 "/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 44193 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1789:
#line 11410 "/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 44208 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1790:
#line 11419 "/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 44221 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1792:
#line 11430 "/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 44233 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1793:
#line 11439 "/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[-2].item), thd->mem_root)) ||
unlikely((yyval.item_list)->push_back((yyvsp[0].item), thd->mem_root)))
MYSQL_YYABORT;
}
#line 44248 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1794:
#line 11448 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item_list)= (yyvsp[-2].item_list);
if (unlikely((yyval.item_list)->push_back((yyvsp[0].item), thd->mem_root)))
MYSQL_YYABORT;
}
#line 44260 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1795:
#line 11459 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)= (yyvsp[0].table_list); }
#line 44268 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1796:
#line 11461 "/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 44283 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1797:
#line 11472 "/home/buildbot/git/sql/sql_yacc.yy"
{ MYSQL_YYABORT_UNLESS((yyval.table_list)=(yyvsp[0].table_list)); }
#line 44291 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1798:
#line 11483 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)=(yyvsp[0].table_list); }
#line 44299 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1799:
#line 11484 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)=(yyvsp[-1].table_list); }
#line 44307 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1800:
#line 11491 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.table_list)=(yyvsp[0].table_list);
Select->add_joined_table((yyvsp[0].table_list));
}
#line 44318 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1801:
#line 11496 "/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 44329 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1802:
#line 11510 "/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 44341 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1803:
#line 11517 "/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 44357 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1804:
#line 11527 "/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 44370 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1805:
#line 11535 "/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 44382 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1806:
#line 11541 "/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 44394 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1807:
#line 11547 "/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 44408 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1808:
#line 11558 "/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 44424 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1809:
#line 11568 "/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 44438 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1810:
#line 11576 "/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 44450 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1811:
#line 11582 "/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 44462 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1812:
#line 11588 "/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 44477 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1813:
#line 11600 "/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 44493 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1814:
#line 11610 "/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 44508 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1815:
#line 11619 "/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 44520 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1816:
#line 11625 "/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 44533 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1817:
#line 11632 "/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 44549 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1818:
#line 11645 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 0; }
#line 44557 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1819:
#line 11646 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 0; }
#line 44565 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1820:
#line 11647 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 1; }
#line 44573 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1821:
#line 11651 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = (yyvsp[0].num); }
#line 44581 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1822:
#line 11652 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 0; }
#line 44589 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1823:
#line 11660 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.string_list)= 0;}
#line 44597 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1825:
#line 11666 "/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 44609 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1826:
#line 11674 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)= (yyvsp[0].table_list); }
#line 44617 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1827:
#line 11675 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)= (yyvsp[0].table_list); }
#line 44625 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1828:
#line 11677 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[0].table_list)->nested_join->nest_type= 0;
(yyval.table_list)= (yyvsp[0].table_list);
}
#line 44636 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1829:
#line 11681 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)= (yyvsp[0].table_list); }
#line 44644 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1830:
#line 11685 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)= (yyvsp[0].table_list); }
#line 44652 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1831:
#line 11686 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)= (yyvsp[-1].table_list); }
#line 44660 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1832:
#line 11690 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)= (yyvsp[0].table_list); }
#line 44668 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1833:
#line 11691 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)= (yyvsp[-1].table_list); }
#line 44676 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1834:
#line 11695 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)= (yyvsp[-1].table_list); }
#line 44684 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1835:
#line 11697 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.table_list)= Select->end_nested_join(thd)))
MYSQL_YYABORT;
}
#line 44695 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1836:
#line 11705 "/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 44709 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1837:
#line 11713 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->add_joined_table((yyvsp[0].table_list));
(yyval.table_list)= (yyvsp[-2].table_list);
}
#line 44720 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1838:
#line 11720 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)= (yyvsp[-1].table_list); }
#line 44728 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1839:
#line 11722 "/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 44743 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1840:
#line 11736 "/home/buildbot/git/sql/sql_yacc.yy"
{
SELECT_LEX *sel= Select;
sel->table_join_options= 0;
if (!((yyval.table_list)= Select->add_table_to_list(thd, (yyvsp[-4].table), (yyvsp[-1].lex_str_ptr),
Select->get_table_join_options(),
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 44763 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1841:
#line 11754 "/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 44774 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1842:
#line 11761 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44782 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1843:
#line 11762 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44790 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1844:
#line 11767 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= thd->variables.old_mode ? INDEX_HINT_MASK_JOIN : INDEX_HINT_MASK_ALL;
}
#line 44800 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1845:
#line 11770 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= INDEX_HINT_MASK_JOIN; }
#line 44808 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1846:
#line 11771 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= INDEX_HINT_MASK_ORDER; }
#line 44816 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1847:
#line 11772 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= INDEX_HINT_MASK_GROUP; }
#line 44824 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1848:
#line 11776 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.index_hint)= INDEX_HINT_FORCE; }
#line 44832 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1849:
#line 11777 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.index_hint)= INDEX_HINT_IGNORE; }
#line 44840 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1850:
#line 11782 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->set_index_hint_type((yyvsp[-2].index_hint), (yyvsp[0].num));
}
#line 44850 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1852:
#line 11787 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->set_index_hint_type(INDEX_HINT_USE, (yyvsp[0].num));
}
#line 44860 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1857:
#line 11800 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->alloc_index_hints(thd); }
#line 44868 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1859:
#line 11804 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->clear_index_hints(); }
#line 44876 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1861:
#line 11809 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->add_index_hint(thd, NULL, 0); }
#line 44884 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1862:
#line 11810 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44892 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1863:
#line 11815 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->add_index_hint(thd, (yyvsp[0].ident_sys).str, (yyvsp[0].ident_sys).length); }
#line 44900 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1864:
#line 11817 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->add_index_hint(thd, "PRIMARY", 7); }
#line 44908 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1867:
#line 11827 "/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 44925 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1868:
#line 11838 "/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 44942 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1869:
#line 11851 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 44950 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1870:
#line 11852 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_DAY_HOUR; }
#line 44958 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1871:
#line 11853 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_DAY_MICROSECOND; }
#line 44966 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1872:
#line 11854 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_DAY_MINUTE; }
#line 44974 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1873:
#line 11855 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_DAY_SECOND; }
#line 44982 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1874:
#line 11856 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_HOUR_MICROSECOND; }
#line 44990 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1875:
#line 11857 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_HOUR_MINUTE; }
#line 44998 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1876:
#line 11858 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_HOUR_SECOND; }
#line 45006 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1877:
#line 11859 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_MINUTE_MICROSECOND; }
#line 45014 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1878:
#line 11860 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_MINUTE_SECOND; }
#line 45022 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1879:
#line 11861 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_SECOND_MICROSECOND; }
#line 45030 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1880:
#line 11862 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval)=INTERVAL_YEAR_MONTH; }
#line 45038 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1881:
#line 11866 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval_time_st)=INTERVAL_DAY; }
#line 45046 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1882:
#line 11867 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval_time_st)=INTERVAL_WEEK; }
#line 45054 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1883:
#line 11868 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval_time_st)=INTERVAL_HOUR; }
#line 45062 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1884:
#line 11869 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval_time_st)=INTERVAL_MINUTE; }
#line 45070 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1885:
#line 11870 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval_time_st)=INTERVAL_MONTH; }
#line 45078 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1886:
#line 11871 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval_time_st)=INTERVAL_QUARTER; }
#line 45086 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1887:
#line 11872 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval_time_st)=INTERVAL_SECOND; }
#line 45094 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1888:
#line 11873 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval_time_st)=INTERVAL_MICROSECOND; }
#line 45102 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1889:
#line 11874 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.interval_time_st)=INTERVAL_YEAR; }
#line 45110 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1890:
#line 11878 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.date_time_type)=MYSQL_TIMESTAMP_DATE;}
#line 45118 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1891:
#line 11879 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.date_time_type)=MYSQL_TIMESTAMP_TIME;}
#line 45126 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1892:
#line 11880 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.date_time_type)=MYSQL_TIMESTAMP_DATETIME;}
#line 45134 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1893:
#line 11881 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.date_time_type)=MYSQL_TIMESTAMP_DATETIME;}
#line 45142 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1897:
#line 11891 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str_ptr)=0; }
#line 45150 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1898:
#line 11892 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str_ptr)= (yyvsp[0].lex_str_ptr); }
#line 45158 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1899:
#line 11897 "/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 45170 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1902:
#line 11910 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->where= 0; }
#line 45178 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1903:
#line 11912 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->parsing_place= IN_WHERE;
}
#line 45188 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1904:
#line 11916 "/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 45202 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1906:
#line 11928 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->parsing_place= IN_HAVING;
}
#line 45212 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1907:
#line 11932 "/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 45226 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1910:
#line 11952 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(add_group_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
MYSQL_YYABORT;
}
#line 45237 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1911:
#line 11957 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(add_group_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
MYSQL_YYABORT;
}
#line 45248 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1912:
#line 11964 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 45256 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1913:
#line 11966 "/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 45279 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1914:
#line 11983 "/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 45300 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1915:
#line 12005 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 45308 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1916:
#line 12008 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 45316 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1919:
#line 12018 "/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 45331 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1920:
#line 12030 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->prepare_add_window_spec(thd); }
#line 45339 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1921:
#line 12034 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 45347 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1922:
#line 12038 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 45355 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1923:
#line 12040 "/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 45367 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1924:
#line 12048 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 45375 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1926:
#line 12053 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 45383 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1927:
#line 12054 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->order_list= *((yyvsp[0].select_order)); }
#line 45391 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1928:
#line 12058 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 45399 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1929:
#line 12060 "/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 45416 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1930:
#line 12073 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.frame_units)= Window_frame::UNITS_ROWS; }
#line 45424 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1931:
#line 12074 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.frame_units)= Window_frame::UNITS_RANGE; }
#line 45432 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1932:
#line 12079 "/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 45448 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1933:
#line 12089 "/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 45460 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1934:
#line 12098 "/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 45473 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1935:
#line 12105 "/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 45486 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1936:
#line 12112 "/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 45499 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1937:
#line 12121 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.window_frame_bound)= (yyvsp[0].window_frame_bound); }
#line 45507 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1938:
#line 12123 "/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 45520 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1939:
#line 12130 "/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 45533 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1940:
#line 12139 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.frame_exclusion)= Window_frame::EXCL_NONE; }
#line 45541 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1941:
#line 12141 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.frame_exclusion)= Window_frame::EXCL_CURRENT_ROW; }
#line 45549 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1942:
#line 12143 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.frame_exclusion)= Window_frame::EXCL_GROUP; }
#line 45557 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1943:
#line 12145 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.frame_exclusion)= Window_frame::EXCL_TIES; }
#line 45565 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1944:
#line 12147 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.frame_exclusion)= Window_frame::EXCL_NONE; }
#line 45573 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1945:
#line 12149 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.frame_exclusion)= Window_frame::EXCL_NONE; }
#line 45581 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1949:
#line 12167 "/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 45593 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1950:
#line 12180 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_order)= NULL; }
#line 45601 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1951:
#line 12182 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_order)= (yyvsp[0].select_order); }
#line 45609 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1952:
#line 12187 "/home/buildbot/git/sql/sql_yacc.yy"
{
thd->where= "ORDER clause";
}
#line 45619 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1953:
#line 12191 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_order)= (yyvsp[0].select_order);
}
#line 45629 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1954:
#line 12198 "/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 45641 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1955:
#line 12204 "/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 45653 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1956:
#line 12212 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 1; }
#line 45661 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1957:
#line 12213 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) =1; }
#line 45669 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1958:
#line 12214 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) =0; }
#line 45677 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1959:
#line 12219 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_limit).empty(); }
#line 45685 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1960:
#line 12221 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_limit)= (yyvsp[0].select_limit); }
#line 45693 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1961:
#line 12226 "/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 45706 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1962:
#line 12234 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_limit)= (yyvsp[-3].select_limit);
Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
}
#line 45717 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1963:
#line 12239 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_limit).select_limit= 0;
(yyval.select_limit).offset_limit= 0;
(yyval.select_limit).explicit_limit= 0;
Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
}
#line 45730 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1964:
#line 12249 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->explicit_limit= (yyvsp[0].select_limit).explicit_limit;
Select->select_limit= (yyvsp[0].select_limit).select_limit;
Select->offset_limit= (yyvsp[0].select_limit).offset_limit;
}
#line 45742 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1965:
#line 12258 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_limit).select_limit= (yyvsp[0].item);
(yyval.select_limit).offset_limit= 0;
(yyval.select_limit).explicit_limit= 1;
}
#line 45754 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1966:
#line 12264 "/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= 1;
}
#line 45766 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1967:
#line 12270 "/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= 1;
}
#line 45778 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1968:
#line 12279 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_limit(thd, &(yyvsp[0].ident_cli)))))
MYSQL_YYABORT;
}
#line 45789 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1969:
#line 12284 "/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 45800 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1970:
#line 12289 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[0].item_param)->limit_clause_param= TRUE;
}
#line 45810 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1971:
#line 12293 "/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 45822 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1972:
#line 12299 "/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 45834 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1973:
#line 12305 "/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 45846 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1974:
#line 12314 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->limit_rows_examined= (yyvsp[0].item);
}
#line 45857 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1975:
#line 12322 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->current_select->select_limit= 0;
}
#line 45868 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1976:
#line 12327 "/home/buildbot/git/sql/sql_yacc.yy"
{
SELECT_LEX *sel= Select;
sel->select_limit= (yyvsp[0].item);
Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
sel->explicit_limit= 1;
}
#line 45881 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1977:
#line 12333 "/home/buildbot/git/sql/sql_yacc.yy"
{ thd->parse_error(); MYSQL_YYABORT; }
#line 45889 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1978:
#line 12334 "/home/buildbot/git/sql/sql_yacc.yy"
{ thd->parse_error(); MYSQL_YYABORT; }
#line 45897 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1979:
#line 12339 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.order_limit_lock)= (yyvsp[0].order_limit_lock);
(yyval.order_limit_lock)->lock.empty();
}
#line 45908 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1980:
#line 12344 "/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 45919 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1981:
#line 12349 "/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.empty();
(yyval.order_limit_lock)->lock= (yyvsp[0].select_lock);
}
#line 45934 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1982:
#line 12361 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->pop_select();
(yyval.order_limit_lock)= NULL;
}
#line 45945 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1983:
#line 12365 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.order_limit_lock)= (yyvsp[0].order_limit_lock); }
#line 45953 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1986:
#line 12378 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lock).empty();
}
#line 45963 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1987:
#line 12382 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lock)= (yyvsp[0].select_lock);
}
#line 45973 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1988:
#line 12386 "/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 45989 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1989:
#line 12399 "/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 46003 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1990:
#line 12407 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex_order_limit_lock *op= (yyval.order_limit_lock)= new(thd->mem_root) Lex_order_limit_lock;
if (!(yyval.order_limit_lock))
YYABORT;
op->order_list= NULL;
op->limit= (yyvsp[0].select_limit);
(yyval.order_limit_lock)->order_list= NULL;
(yyval.order_limit_lock)->limit= (yyvsp[0].select_limit);
}
#line 46019 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1993:
#line 12425 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.num)= (int) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 46027 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1994:
#line 12426 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.num)= -(int) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 46035 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1995:
#line 12430 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 46043 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1996:
#line 12431 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= strtoul((yyvsp[0].lex_str).str, (char**) 0, 16); }
#line 46051 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1997:
#line 12432 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 46059 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1998:
#line 12433 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 46067 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 1999:
#line 12434 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 46075 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2000:
#line 12435 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 46083 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2001:
#line 12439 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 46091 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2002:
#line 12440 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= (ulong) strtol((yyvsp[0].lex_str).str, (char**) 0, 16); }
#line 46099 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2003:
#line 12441 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 46107 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2004:
#line 12442 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 46115 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2005:
#line 12443 "/home/buildbot/git/sql/sql_yacc.yy"
{ MYSQL_YYABORT; }
#line 46123 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2006:
#line 12447 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.longlong_number)= (longlong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 46131 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2007:
#line 12448 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.longlong_number)= (longlong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 46139 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2008:
#line 12449 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.longlong_number)= -(longlong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 46147 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2009:
#line 12450 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.longlong_number)= -(longlong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 46155 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2010:
#line 12454 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 46163 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2011:
#line 12455 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 46171 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2012:
#line 12456 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 46179 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2013:
#line 12457 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 46187 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2014:
#line 12458 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 46195 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2015:
#line 12462 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 46203 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2016:
#line 12463 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 46211 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2017:
#line 12464 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulonglong_number)= strtoull((yyvsp[0].lex_str).str, (char**) 0, 16); }
#line 46219 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2018:
#line 12465 "/home/buildbot/git/sql/sql_yacc.yy"
{ int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
#line 46227 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2019:
#line 12466 "/home/buildbot/git/sql/sql_yacc.yy"
{ MYSQL_YYABORT; }
#line 46235 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2020:
#line 12471 "/home/buildbot/git/sql/sql_yacc.yy"
{ thd->parse_error(ER_ONLY_INTEGERS_ALLOWED); }
#line 46243 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2023:
#line 12480 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.choice)= (yyvsp[0].ulong_num) != 0 ? HA_CHOICE_YES : HA_CHOICE_NO; }
#line 46251 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2024:
#line 12481 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.choice)= HA_CHOICE_UNDEF; }
#line 46259 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2025:
#line 12485 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= (yyvsp[0].ulong_num) != 0; }
#line 46267 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2026:
#line 12486 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 1; }
#line 46275 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2027:
#line 12487 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 0; }
#line 46283 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2028:
#line 12492 "/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 46313 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2029:
#line 12516 "/home/buildbot/git/sql/sql_yacc.yy"
{
/* Subqueries are allowed from now.*/
Lex->clause_that_disallows_subselect= NULL;
}
#line 46324 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2030:
#line 12523 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46332 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2031:
#line 12524 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46340 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2034:
#line 12534 "/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 46353 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2035:
#line 12543 "/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 46367 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2036:
#line 12551 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46375 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2038:
#line 12556 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46383 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2039:
#line 12560 "/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 46406 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2040:
#line 12580 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.myvar) = Lex->result ? new (thd->mem_root) my_var_user(&(yyvsp[0].lex_str)) : NULL;
}
#line 46416 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2041:
#line 12584 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.myvar)= Lex->create_outvar(thd, &(yyvsp[0].lex_str))) && Lex->result))
MYSQL_YYABORT;
}
#line 46427 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2042:
#line 12589 "/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 46438 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2043:
#line 12597 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46446 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2044:
#line 12602 "/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 46463 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2045:
#line 12613 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->exchange->cs= (yyvsp[0].charset); }
#line 46471 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2047:
#line 12616 "/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 46492 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2048:
#line 12631 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
}
#line 46502 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2049:
#line 12642 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command = SQLCOM_DO;
if (lex->main_select_push(true))
MYSQL_YYABORT;
mysql_init_select(lex);
}
#line 46516 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2050:
#line 12650 "/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 46529 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2051:
#line 12664 "/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 46542 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2052:
#line 12671 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46550 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2053:
#line 12673 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->main_select_push())
MYSQL_YYABORT;
}
#line 46561 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2054:
#line 12678 "/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 46585 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2055:
#line 12696 "/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 46597 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2056:
#line 12702 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->set_command(SQLCOM_DROP_USER, (yyvsp[-2].object_ddl_options));
}
#line 46607 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2057:
#line 12706 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->set_command(SQLCOM_DROP_ROLE, (yyvsp[-2].object_ddl_options));
}
#line 46617 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2058:
#line 12710 "/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 46630 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2059:
#line 12717 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46638 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2060:
#line 12719 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->spname= (yyvsp[0].spname);
Lex->set_command(SQLCOM_DROP_EVENT, (yyvsp[-1].object_ddl_options));
}
#line 46649 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2061:
#line 12724 "/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 46661 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2062:
#line 12730 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->alter_tablespace_info->ts_cmd_type= DROP_TABLESPACE;
}
#line 46672 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2063:
#line 12735 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->alter_tablespace_info->ts_cmd_type= DROP_LOGFILE_GROUP;
}
#line 46683 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2064:
#line 12740 "/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 46694 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2065:
#line 12746 "/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 46708 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2066:
#line 12754 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46716 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2070:
#line 12765 "/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 46731 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2071:
#line 12777 "/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 46747 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2074:
#line 12795 "/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 46763 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2075:
#line 12808 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->check_exists= FALSE;
(yyval.num)= 0;
}
#line 46774 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2076:
#line 12813 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->check_exists= TRUE;
(yyval.num)= 1;
}
#line 46785 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2077:
#line 12821 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.object_ddl_options).set(DDL_options_st::OPT_NONE);
}
#line 46795 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2078:
#line 12825 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.object_ddl_options).set(DDL_options_st::OPT_IF_EXISTS);
}
#line 46805 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2079:
#line 12831 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 46813 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2080:
#line 12832 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= HA_LEX_CREATE_TMP_TABLE; }
#line 46821 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2081:
#line 12840 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command= SQLCOM_INSERT;
Lex->duplicates= DUP_ERROR;
}
#line 46832 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2082:
#line 12845 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->set_lock_for_tables((yyvsp[-3].lock_type), true);
}
#line 46842 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2083:
#line 12850 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->mark_first_table_as_inserting();
}
#line 46852 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2084:
#line 12857 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_REPLACE;
Lex->duplicates= DUP_REPLACE;
}
#line 46863 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2085:
#line 12862 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->set_lock_for_tables((yyvsp[-2].lock_type), true);
}
#line 46873 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2086:
#line 12867 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->mark_first_table_as_inserting();
}
#line 46883 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2087:
#line 12872 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->main_select_push())
MYSQL_YYABORT;
mysql_init_select(Lex);
Lex->current_select->parsing_place= BEFORE_OPT_LIST;
}
#line 46896 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2088:
#line 12880 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->pop_select(); //main select
if (Lex->check_main_unit_semantics())
MYSQL_YYABORT;
}
#line 46908 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2089:
#line 12889 "/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 46923 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2091:
#line 12898 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lock_type)= TL_WRITE; }
#line 46931 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2092:
#line 12902 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lock_type)= TL_WRITE_DEFAULT; }
#line 46939 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2094:
#line 12907 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; }
#line 46947 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2095:
#line 12909 "/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 46959 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2098:
#line 12919 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->save_parsing_place= Select->parsing_place;
}
#line 46969 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2099:
#line 12923 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
//lex->field_list.empty();
lex->many_values.empty();
lex->insert_list=0;
}
#line 46982 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2100:
#line 12932 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46990 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2101:
#line 12933 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 46998 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2102:
#line 12935 "/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 47013 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2104:
#line 12948 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->current_select->parsing_place= AFTER_LIST;
}
#line 47023 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2107:
#line 12960 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); }
#line 47031 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2108:
#line 12961 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); }
#line 47039 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2109:
#line 12967 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47047 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2114:
#line 12982 "/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 47060 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2115:
#line 12991 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47068 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2116:
#line 12992 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47076 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2117:
#line 12996 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47084 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2118:
#line 12997 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47092 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2119:
#line 13001 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47100 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2120:
#line 13002 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47108 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2121:
#line 13006 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47116 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2122:
#line 13007 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47124 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2123:
#line 13012 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!(Lex->insert_list= new (thd->mem_root) List_item)))
MYSQL_YYABORT;
}
#line 47135 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2124:
#line 13017 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
if (unlikely(lex->many_values.push_back(lex->insert_list,
thd->mem_root)))
MYSQL_YYABORT;
}
#line 47148 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2125:
#line 13027 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!(Lex->insert_list= new (thd->mem_root) List_item)))
MYSQL_YYABORT;
}
#line 47159 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2126:
#line 13032 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
if (unlikely(lex->many_values.push_back(lex->insert_list,
thd->mem_root)))
MYSQL_YYABORT;
}
#line 47172 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2127:
#line 13041 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47180 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2129:
#line 13046 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47188 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2131:
#line 13052 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->insert_list->push_back((yyvsp[0].item), thd->mem_root)))
MYSQL_YYABORT;
}
#line 47199 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2132:
#line 13057 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->insert_list->push_back((yyvsp[0].item), thd->mem_root)))
MYSQL_YYABORT;
}
#line 47210 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2133:
#line 13065 "/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 47224 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2134:
#line 13073 "/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 47238 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2135:
#line 13083 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)= (yyvsp[0].item);}
#line 47246 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2136:
#line 13085 "/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 47258 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2137:
#line 13093 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)= (yyvsp[0].item);}
#line 47266 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2138:
#line 13095 "/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 47278 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2140:
#line 13104 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->duplicates= DUP_UPDATE; }
#line 47286 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2141:
#line 13106 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->parsing_place= IN_UPDATE_ON_DUP_KEY;
}
#line 47296 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2142:
#line 13110 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->parsing_place= NO_MATTER;
}
#line 47306 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2143:
#line 13118 "/home/buildbot/git/sql/sql_yacc.yy"
{
SELECT_LEX *sel= Select;
sel->table_join_options= 0;
if (!((yyval.table_list)= Select->add_table_to_list(thd, (yyvsp[-4].table), (yyvsp[-1].lex_str_ptr),
Select->get_table_join_options(),
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 47325 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2144:
#line 13130 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table_list)= (yyvsp[0].table_list); }
#line 47333 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2145:
#line 13137 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (Lex->main_select_push())
MYSQL_YYABORT;
mysql_init_select(lex);
lex->sql_command= SQLCOM_UPDATE;
lex->duplicates= DUP_ERROR;
}
#line 47348 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2146:
#line 13147 "/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);
}
#line 47373 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2147:
#line 13166 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyvsp[-1].select_order))
Select->order_list= *((yyvsp[-1].select_order));
}
#line 47384 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2148:
#line 13169 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47392 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2151:
#line 13179 "/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 47405 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2152:
#line 13186 "/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 47416 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2155:
#line 13199 "/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 47429 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2156:
#line 13208 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lock_type)= TL_WRITE_DEFAULT; }
#line 47437 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2157:
#line 13209 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; }
#line 47445 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2158:
#line 13216 "/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;
mysql_init_select(lex);
lex->ignore= 0;
lex->first_select_lex()->order_list.empty();
}
#line 47463 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2159:
#line 13228 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 47471 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2160:
#line 13233 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->vers_conditions.init(SYSTEM_TIME_HISTORY);
}
#line 47481 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2161:
#line 13237 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->vers_conditions.init(SYSTEM_TIME_BEFORE, (yyvsp[0].vers_history_point));
}
#line 47491 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2162:
#line 13243 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47499 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2163:
#line 13245 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_table()->vers_conditions= Lex->vers_conditions;
Lex->pop_select(); //main select
}
#line 47510 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2164:
#line 13253 "/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 47528 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2165:
#line 13268 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyvsp[0].num))
Lex->last_table()->period_conditions= Lex->period_conditions;
}
#line 47539 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2166:
#line 13280 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyvsp[-2].select_order))
Select->order_list= *((yyvsp[-2].select_order));
Lex->pop_select(); //main select
}
#line 47551 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2167:
#line 13286 "/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 47563 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2168:
#line 13292 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(multi_delete_set_locks_and_link_aux_tables(Lex)))
MYSQL_YYABORT;
}
#line 47574 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2169:
#line 13295 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47582 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2170:
#line 13297 "/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 47594 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2171:
#line 13303 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(multi_delete_set_locks_and_link_aux_tables(Lex)))
MYSQL_YYABORT;
}
#line 47605 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2172:
#line 13306 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47613 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2173:
#line 13311 "/home/buildbot/git/sql/sql_yacc.yy"
{
DBUG_ASSERT(!Lex->has_returning());
}
#line 47623 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2174:
#line 13315 "/home/buildbot/git/sql/sql_yacc.yy"
{
DBUG_ASSERT(!Lex->has_returning());
if (((yyval.num)= (Select != Lex->returning())))
{
SELECT_LEX *sl= Lex->returning();
sl->set_master_unit(0);
Select->add_slave(Lex->create_unit(sl));
sl->include_global((st_select_lex_node**)&Lex->all_selects_list);
Lex->push_select(sl);
}
}
#line 47641 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2175:
#line 13327 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyvsp[-1].num))
Lex->pop_select();
}
#line 47652 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2178:
#line 13340 "/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 47673 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2179:
#line 13355 "/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 47694 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2180:
#line 13372 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47702 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2181:
#line 13373 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47710 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2182:
#line 13377 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47718 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2183:
#line 13378 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 47726 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2184:
#line 13382 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->options|= OPTION_QUICK; }
#line 47734 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2185:
#line 13383 "/home/buildbot/git/sql/sql_yacc.yy"
{ YYPS->m_lock_type= TL_WRITE_LOW_PRIORITY; }
#line 47742 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2186:
#line 13384 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ignore= 1; }
#line 47750 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2187:
#line 13389 "/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 47767 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2188:
#line 13400 "/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 47781 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2189:
#line 13407 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 47789 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2196:
#line 13425 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_options|= PROFILE_CPU;
}
#line 47799 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2197:
#line 13429 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_options|= PROFILE_MEMORY;
}
#line 47809 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2198:
#line 13433 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_options|= PROFILE_BLOCK_IO;
}
#line 47819 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2199:
#line 13437 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_options|= PROFILE_CONTEXT;
}
#line 47829 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2200:
#line 13441 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_options|= PROFILE_PAGE_FAULTS;
}
#line 47839 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2201:
#line 13445 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_options|= PROFILE_IPC;
}
#line 47849 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2202:
#line 13449 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_options|= PROFILE_SWAPS;
}
#line 47859 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2203:
#line 13453 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_options|= PROFILE_SOURCE;
}
#line 47869 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2204:
#line 13457 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_options|= PROFILE_ALL;
}
#line 47879 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2205:
#line 13464 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_query_id= 0;
}
#line 47889 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2206:
#line 13468 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->profile_query_id= atoi((yyvsp[0].lex_str).str);
}
#line 47899 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2207:
#line 13477 "/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;
mysql_init_select(lex);
lex->current_select->parsing_place= SELECT_LIST;
lex->create_info.init();
}
#line 47916 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2208:
#line 13488 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->parsing_place= NO_MATTER;
Lex->pop_select(); //main select
}
#line 47927 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2209:
#line 13496 "/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 47940 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2210:
#line 13503 "/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 47954 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2211:
#line 13511 "/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 47968 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2212:
#line 13519 "/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 47982 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2213:
#line 13527 "/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 47996 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2214:
#line 13535 "/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 48010 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2215:
#line 13543 "/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 48023 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2216:
#line 13550 "/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 48036 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2217:
#line 13557 "/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 48048 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2218:
#line 13563 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->create_info.db_type= (yyvsp[-1].db_type); }
#line 48056 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2219:
#line 13565 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->create_info.db_type= NULL; }
#line 48064 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2220:
#line 13567 "/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 48079 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2221:
#line 13576 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_SHOW_BINLOGS;
}
#line 48089 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2222:
#line 13580 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_SHOW_SLAVE_HOSTS;
}
#line 48099 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2223:
#line 13584 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_BINLOG_EVENTS;
}
#line 48110 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2225:
#line 13590 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_RELAYLOG_EVENTS;
}
#line 48121 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2227:
#line 13596 "/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 48136 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2228:
#line 13605 "/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 48149 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2229:
#line 13612 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_SHOW_AUTHORS;
}
#line 48160 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2230:
#line 13617 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_SHOW_CONTRIBUTORS;
}
#line 48171 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2231:
#line 13622 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_SHOW_PRIVILEGES;
}
#line 48182 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2232:
#line 13627 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX_CSTRING var= {STRING_WITH_LEN("warning_count")};
(void) create_select_for_variable(thd, &var);
}
#line 48193 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2233:
#line 13632 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX_CSTRING var= {STRING_WITH_LEN("error_count")};
(void) create_select_for_variable(thd, &var);
}
#line 48204 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2234:
#line 13637 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->sql_command = SQLCOM_SHOW_WARNS;}
#line 48212 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2235:
#line 13639 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->sql_command = SQLCOM_SHOW_ERRORS;}
#line 48220 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2236:
#line 13641 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->sql_command = SQLCOM_SHOW_PROFILES; }
#line 48228 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2237:
#line 13643 "/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 48241 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2238:
#line 13650 "/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 48255 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2239:
#line 13658 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->sql_command= SQLCOM_SHOW_PROCESSLIST;}
#line 48263 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2240:
#line 13660 "/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 48277 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2241:
#line 13668 "/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 48290 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2242:
#line 13675 "/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 48303 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2243:
#line 13682 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command= SQLCOM_SHOW_GRANTS;
if (unlikely(!(Lex->grant_user=
(LEX_USER*)thd->alloc(sizeof(LEX_USER)))))
MYSQL_YYABORT;
Lex->grant_user->user= current_user_and_current_role;
}
#line 48317 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2244:
#line 13690 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_SHOW_GRANTS;
lex->grant_user=(yyvsp[-1].lex_user);
}
#line 48329 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2245:
#line 13696 "/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 48340 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2246:
#line 13701 "/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 48354 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2247:
#line 13709 "/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 48368 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2248:
#line 13717 "/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 48382 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2249:
#line 13725 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_SHOW_BINLOG_STAT;
}
#line 48392 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2250:
#line 13729 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_SHOW_BINLOG_STAT;
}
#line 48402 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2251:
#line 13733 "/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 48415 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2252:
#line 13740 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= thd->lex;
lex->mi.connection_name= null_clex_str;
if (!(lex->m_sql_cmd= new (thd->mem_root)
Sql_cmd_show_slave_status()))
MYSQL_YYABORT;
lex->sql_command = SQLCOM_SHOW_SLAVE_STAT;
}
#line 48430 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2253:
#line 13749 "/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 48443 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2254:
#line 13756 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command = SQLCOM_SHOW_CREATE_PROC;
lex->spname= (yyvsp[0].spname);
}
#line 48456 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2255:
#line 13763 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command = SQLCOM_SHOW_CREATE_FUNC;
lex->spname= (yyvsp[0].spname);
}
#line 48469 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2256:
#line 13770 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command = SQLCOM_SHOW_CREATE_PACKAGE;
lex->spname= (yyvsp[0].spname);
}
#line 48481 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2257:
#line 13776 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command = SQLCOM_SHOW_CREATE_PACKAGE;
lex->spname= (yyvsp[0].spname);
}
#line 48493 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2258:
#line 13782 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command = SQLCOM_SHOW_CREATE_PACKAGE_BODY;
lex->spname= (yyvsp[0].spname);
}
#line 48505 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2259:
#line 13788 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command = SQLCOM_SHOW_CREATE_PACKAGE_BODY;
lex->spname= (yyvsp[0].spname);
}
#line 48517 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2260:
#line 13794 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_CREATE_TRIGGER;
lex->spname= (yyvsp[0].spname);
}
#line 48529 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2261:
#line 13800 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command= SQLCOM_SHOW_CREATE_USER;
if (unlikely(!(Lex->grant_user=
(LEX_USER*)thd->alloc(sizeof(LEX_USER)))))
MYSQL_YYABORT;
Lex->grant_user->user= current_user;
}
#line 48543 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2262:
#line 13808 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command= SQLCOM_SHOW_CREATE_USER;
Lex->grant_user= (yyvsp[0].lex_user);
}
#line 48554 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2263:
#line 13813 "/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 48567 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2264:
#line 13820 "/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 48580 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2265:
#line 13827 "/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 48593 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2266:
#line 13834 "/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 48606 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2267:
#line 13841 "/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 48619 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2268:
#line 13848 "/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 48632 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2269:
#line 13855 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command= SQLCOM_SHOW_PROC_CODE;
Lex->spname= (yyvsp[0].spname);
}
#line 48643 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2270:
#line 13860 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command= SQLCOM_SHOW_FUNC_CODE;
Lex->spname= (yyvsp[0].spname);
}
#line 48654 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2271:
#line 13865 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command= SQLCOM_SHOW_PACKAGE_BODY_CODE;
Lex->spname= (yyvsp[0].spname);
}
#line 48665 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2272:
#line 13870 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command= SQLCOM_SHOW_PACKAGE_BODY_CODE;
Lex->spname= (yyvsp[0].spname);
}
#line 48676 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2273:
#line 13875 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->spname= (yyvsp[0].spname);
Lex->sql_command = SQLCOM_SHOW_CREATE_EVENT;
}
#line 48687 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2274:
#line 13880 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command= SQLCOM_SHOW_EXPLAIN;
if (unlikely(prepare_schema_table(thd, Lex, 0, SCH_EXPLAIN)))
MYSQL_YYABORT;
add_value_to_list(thd, (yyvsp[0].item));
}
#line 48700 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2275:
#line 13887 "/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 48725 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2276:
#line 13909 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->sql_command= SQLCOM_SHOW_ENGINE_STATUS; }
#line 48733 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2277:
#line 13911 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->sql_command= SQLCOM_SHOW_ENGINE_MUTEX; }
#line 48741 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2278:
#line 13913 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->sql_command= SQLCOM_SHOW_ENGINE_LOGS; }
#line 48749 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2283:
#line 13927 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= null_clex_str; }
#line 48757 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2284:
#line 13928 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= (yyvsp[0].ident_sys); }
#line 48765 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2285:
#line 13932 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->verbose=0; }
#line 48773 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2286:
#line 13933 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->verbose=1; }
#line 48781 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2289:
#line 13942 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->mi.log_file_name = 0; }
#line 48789 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2290:
#line 13943 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->mi.log_file_name = (yyvsp[0].lex_str).str; }
#line 48797 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2291:
#line 13947 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->mi.pos = 4; /* skip magic number */ }
#line 48805 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2292:
#line 13948 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->mi.pos = (yyvsp[0].ulonglong_number); }
#line 48813 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2293:
#line 13952 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.simple_string)= 0; }
#line 48821 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2294:
#line 13954 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->wild= new (thd->mem_root) String((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 48835 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2295:
#line 13962 "/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 48848 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2296:
#line 13973 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (lex->main_select_push())
MYSQL_YYABORT;
mysql_init_select(lex);
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 48867 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2297:
#line 13986 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->parsing_place= NO_MATTER;
Lex->pop_select(); //main select
}
#line 48878 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2298:
#line 13991 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->describe|= DESCRIBE_NORMAL; }
#line 48886 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2299:
#line 13993 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->first_select_lex()->options|= SELECT_DESCRIBE;
}
#line 48897 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2308:
#line 14015 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->analyze_stmt= true;
}
#line 48907 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2309:
#line 14021 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->describe|= DESCRIBE_EXTENDED; }
#line 48915 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2310:
#line 14023 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->describe|= DESCRIBE_EXTENDED | DESCRIBE_EXTENDED2; }
#line 48923 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2311:
#line 14024 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->describe|= DESCRIBE_PARTITIONS; }
#line 48931 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2312:
#line 14025 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 48939 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2313:
#line 14029 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 48947 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2314:
#line 14031 "/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",
(yyvsp[0].lex_str).str));
}
#line 48963 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2315:
#line 14043 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 48971 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2316:
#line 14044 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->wild= (yyvsp[0].string); }
#line 48979 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2317:
#line 14046 "/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 48993 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2318:
#line 14060 "/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 49006 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2319:
#line 14066 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 49014 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2320:
#line 14071 "/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 49030 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2321:
#line 14081 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 49038 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2322:
#line 14083 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 49046 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2323:
#line 14087 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 49054 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2324:
#line 14089 "/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);
/* Don't try to flush views. */
tables->required_type= TABLE_TYPE_NORMAL;
/* Ignore temporary tables. */
tables->open_type= OT_BASE_ONLY;
}
}
#line 49072 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2325:
#line 14104 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_READ_LOCK | (yyvsp[0].num); }
#line 49080 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2326:
#line 14106 "/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 49096 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2327:
#line 14114 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 49104 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2329:
#line 14120 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 49112 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2330:
#line 14125 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_ERROR_LOG; }
#line 49120 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2331:
#line 14127 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_ENGINE_LOG; }
#line 49128 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2332:
#line 14129 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_GENERAL_LOG; }
#line 49136 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2333:
#line 14131 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_SLOW_LOG; }
#line 49144 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2334:
#line 14133 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_BINARY_LOG; }
#line 49152 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2335:
#line 14135 "/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 49166 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2336:
#line 14143 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_QUERY_CACHE_FREE; }
#line 49174 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2337:
#line 14145 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_HOSTS; }
#line 49182 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2338:
#line 14147 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_GRANT; }
#line 49190 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2339:
#line 14149 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->type|= REFRESH_LOG;
Lex->relay_log_connection_name= empty_clex_str;
}
#line 49201 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2340:
#line 14154 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_STATUS; }
#line 49209 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2341:
#line 14156 "/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 49223 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2342:
#line 14164 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_MASTER; }
#line 49231 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2343:
#line 14166 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_DES_KEY_FILE; }
#line 49239 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2344:
#line 14168 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_USER_RESOURCES; }
#line 49247 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2345:
#line 14170 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_SSL;}
#line 49255 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2346:
#line 14172 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_THREADS;}
#line 49263 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2347:
#line 14174 "/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 49283 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2348:
#line 14190 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 49291 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2349:
#line 14191 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 49299 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2350:
#line 14195 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 49307 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2351:
#line 14200 "/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 49325 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2352:
#line 14212 "/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 49338 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2353:
#line 14219 "/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 49352 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2354:
#line 14227 "/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 49365 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2355:
#line 14236 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 49373 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2356:
#line 14238 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 49381 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2360:
#line 14248 "/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 49400 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2361:
#line 14263 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.num)= 0;}
#line 49408 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2362:
#line 14264 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.num)= REFRESH_CHECKPOINT; }
#line 49416 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2363:
#line 14269 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_RESET; lex->type=0;
}
#line 49427 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2364:
#line 14274 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 49435 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2367:
#line 14283 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_SLAVE; }
#line 49443 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2368:
#line 14285 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 49451 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2369:
#line 14287 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->type|= REFRESH_MASTER;
Lex->next_binlog_file_number= 0;
}
#line 49462 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2371:
#line 14292 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->type|= REFRESH_QUERY_CACHE;}
#line 49470 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2372:
#line 14296 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->reset_slave_info.all= false; }
#line 49478 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2373:
#line 14297 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->reset_slave_info.all= true; }
#line 49486 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2374:
#line 14301 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 49494 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2375:
#line 14303 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->next_binlog_file_number = (yyvsp[0].ulong_num);
}
#line 49504 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2376:
#line 14310 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->stmt_purge_to((yyvsp[0].lex_str));
}
#line 49514 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2377:
#line 14314 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->clause_that_disallows_subselect= "PURGE..BEFORE"; }
#line 49522 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2378:
#line 14316 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->clause_that_disallows_subselect= NULL;
if (Lex->stmt_purge_before((yyvsp[0].item)))
MYSQL_YYABORT;
}
#line 49534 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2379:
#line 14328 "/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 49548 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2380:
#line 14336 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->kill_signal= (killed_state) ((yyvsp[-1].num) | (yyvsp[0].num));
}
#line 49558 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2381:
#line 14342 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= (int) KILL_HARD_BIT; }
#line 49566 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2382:
#line 14343 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= (int) KILL_HARD_BIT; }
#line 49574 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2383:
#line 14344 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 49582 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2384:
#line 14348 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= (int) KILL_CONNECTION; }
#line 49590 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2385:
#line 14349 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= (int) KILL_QUERY; }
#line 49598 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2386:
#line 14351 "/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 49610 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2387:
#line 14359 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 49618 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2388:
#line 14360 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 49626 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2389:
#line 14365 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->value_list.push_front((yyval.item), thd->mem_root);
}
#line 49636 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2390:
#line 14369 "/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 49647 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2391:
#line 14376 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->sql_command= SQLCOM_SHUTDOWN; }
#line 49655 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2392:
#line 14377 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 49663 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2393:
#line 14381 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->is_shutdown_wait_for_slaves= false; }
#line 49671 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2394:
#line 14383 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->is_shutdown_wait_for_slaves= true;
}
#line 49681 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2395:
#line 14392 "/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 49693 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2396:
#line 14403 "/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;
mysql_init_select(lex);
}
#line 49713 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2397:
#line 14417 "/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 49730 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2398:
#line 14428 "/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 49749 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2399:
#line 14441 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->exchange->cs= (yyvsp[0].charset); }
#line 49757 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2400:
#line 14446 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->mark_first_table_as_inserting();
}
#line 49767 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2401:
#line 14452 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.filetype)= FILETYPE_CSV; }
#line 49775 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2402:
#line 14453 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.filetype)= FILETYPE_XML; }
#line 49783 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2403:
#line 14457 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)=0;}
#line 49791 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2404:
#line 14458 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)=1;}
#line 49799 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2405:
#line 14462 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lock_type)= TL_WRITE_DEFAULT; }
#line 49807 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2406:
#line 14464 "/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 49821 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2407:
#line 14471 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; }
#line 49829 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2408:
#line 14475 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->duplicates=DUP_ERROR; }
#line 49837 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2409:
#line 14476 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->duplicates=DUP_REPLACE; }
#line 49845 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2410:
#line 14477 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ignore= 1; }
#line 49853 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2415:
#line 14492 "/home/buildbot/git/sql/sql_yacc.yy"
{
DBUG_ASSERT(Lex->exchange != 0);
Lex->exchange->field_term= (yyvsp[0].string);
}
#line 49864 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2416:
#line 14497 "/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 49877 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2417:
#line 14504 "/home/buildbot/git/sql/sql_yacc.yy"
{
DBUG_ASSERT(Lex->exchange != 0);
Lex->exchange->enclosed= (yyvsp[0].string);
}
#line 49888 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2418:
#line 14509 "/home/buildbot/git/sql/sql_yacc.yy"
{
DBUG_ASSERT(Lex->exchange != 0);
Lex->exchange->escaped= (yyvsp[0].string);
}
#line 49899 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2423:
#line 14527 "/home/buildbot/git/sql/sql_yacc.yy"
{
DBUG_ASSERT(Lex->exchange != 0);
Lex->exchange->line_term= (yyvsp[0].string);
}
#line 49910 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2424:
#line 14532 "/home/buildbot/git/sql/sql_yacc.yy"
{
DBUG_ASSERT(Lex->exchange != 0);
Lex->exchange->line_start= (yyvsp[0].string);
}
#line 49921 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2425:
#line 14539 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 49929 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2426:
#line 14541 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->exchange->line_term = (yyvsp[0].string); }
#line 49937 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2428:
#line 14547 "/home/buildbot/git/sql/sql_yacc.yy"
{
DBUG_ASSERT(Lex->exchange != 0);
Lex->exchange->skip_lines= atol((yyvsp[-1].lex_str).str);
}
#line 49948 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2429:
#line 14554 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 49956 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2430:
#line 14555 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 49964 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2431:
#line 14559 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 49972 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2432:
#line 14560 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 49980 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2433:
#line 14561 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 49988 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2434:
#line 14566 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); }
#line 49996 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2435:
#line 14568 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); }
#line 50004 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2436:
#line 14572 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.item)= (yyvsp[0].item);}
#line 50012 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2437:
#line 14574 "/home/buildbot/git/sql/sql_yacc.yy"
{
(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 50024 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2438:
#line 14582 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 50032 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2439:
#line 14583 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 50040 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2442:
#line 14593 "/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 50054 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2443:
#line 14606 "/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 50065 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2444:
#line 14611 "/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 50076 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2445:
#line 14616 "/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 50087 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2446:
#line 14621 "/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 50098 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2447:
#line 14629 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.string)= new (thd->mem_root) String((yyvsp[0].lex_str).str,
(yyvsp[0].lex_str).length,
thd->variables.collation_connection);
if (unlikely((yyval.string) == NULL))
MYSQL_YYABORT;
}
#line 50112 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2448:
#line 14636 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.string)= (yyvsp[0].string); }
#line 50120 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2449:
#line 14642 "/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 50134 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2450:
#line 14650 "/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 50148 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2451:
#line 14658 "/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 50166 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2452:
#line 14673 "/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 50179 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2453:
#line 14680 "/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 50191 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2454:
#line 14686 "/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 50204 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2455:
#line 14695 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item) = (yyvsp[0].item_num); }
#line 50212 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2456:
#line 14697 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[0].item_num)->max_length++;
(yyval.item)= (yyvsp[0].item_num)->neg(thd);
}
#line 50223 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2457:
#line 14704 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item) = (yyvsp[0].item_basic_constant); }
#line 50231 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2458:
#line 14705 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item) = (yyvsp[0].item_num); }
#line 50239 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2459:
#line 14706 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)= (yyvsp[0].item); }
#line 50247 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2460:
#line 14708 "/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 50267 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2461:
#line 14722 "/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 50279 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2462:
#line 14728 "/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 50291 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2463:
#line 14734 "/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 50303 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2464:
#line 14740 "/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 50315 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2465:
#line 14746 "/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 50327 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2466:
#line 14752 "/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 50351 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2467:
#line 14773 "/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 50367 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2468:
#line 14783 "/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 50383 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2469:
#line 14793 "/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 50395 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2470:
#line 14799 "/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 50408 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2471:
#line 14806 "/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 50420 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2472:
#line 14816 "/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 50433 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2473:
#line 14823 "/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 50446 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2474:
#line 14830 "/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 50459 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2475:
#line 14840 "/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_last_next);
if (lex->current_select &&
lex->current_select->parsing_place == BEFORE_OPT_LIST)
lex->current_select->parsing_place= NO_MATTER;
}
#line 50480 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2476:
#line 14855 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.with_clause)= Lex->curr_with_clause;
Lex->curr_with_clause= Lex->curr_with_clause->pop();
}
#line 50491 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2477:
#line 14863 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 50499 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2478:
#line 14864 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 50507 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2481:
#line 14878 "/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 50531 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2482:
#line 14899 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ident_sys_list)= NULL; }
#line 50539 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2483:
#line 14902 "/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 50552 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2484:
#line 14909 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.ident_sys_list)= (yyvsp[-1].ident_sys_list);
}
#line 50562 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2485:
#line 14917 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (((yyval.ident_sys_list)= new (thd->mem_root) List) == NULL)
MYSQL_YYABORT;
}
#line 50573 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2486:
#line 14922 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ident_sys_list)= (yyvsp[-1].ident_sys_list); }
#line 50581 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2488:
#line 14931 "/home/buildbot/git/sql/sql_yacc.yy"
{
void *buf= thd->alloc(sizeof(Lex_ident_sys));
if (!buf)
MYSQL_YYABORT;
(yyval.ident_sys_ptr)= new (buf) Lex_ident_sys(thd, &(yyvsp[0].ident_cli));
}
#line 50594 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2489:
#line 14941 "/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 50606 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2490:
#line 14947 "/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 50617 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2491:
#line 14956 "/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 50632 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2492:
#line 14973 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)=(yyvsp[0].item); }
#line 50640 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2493:
#line 14974 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)=(yyvsp[0].item); }
#line 50648 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2494:
#line 14979 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_qualified_asterisk(thd, &(yyvsp[-2].ident_sys)))))
MYSQL_YYABORT;
}
#line 50659 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2495:
#line 14984 "/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 50670 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2496:
#line 14992 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_qualified_asterisk(thd, &(yyvsp[-2].ident_cli)))))
MYSQL_YYABORT;
}
#line 50681 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2497:
#line 14997 "/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 50692 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2498:
#line 15004 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)=(yyvsp[0].item); }
#line 50700 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2499:
#line 15010 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &(yyvsp[0].ident_cli)))))
MYSQL_YYABORT;
}
#line 50711 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2500:
#line 15015 "/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 50722 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2501:
#line 15020 "/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 50734 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2502:
#line 15026 "/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 50745 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2503:
#line 15031 "/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 50756 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2504:
#line 15039 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_ident_nosp(thd, &(yyvsp[0].ident_sys)))))
MYSQL_YYABORT;
}
#line 50767 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2505:
#line 15044 "/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 50778 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2506:
#line 15049 "/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 50789 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2507:
#line 15054 "/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 50801 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2508:
#line 15060 "/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 50812 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2509:
#line 15067 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].ident_sys);}
#line 50820 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2510:
#line 15069 "/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 50837 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2511:
#line 15080 "/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 50851 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2512:
#line 15087 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].ident_sys);}
#line 50859 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2513:
#line 15092 "/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 50871 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2514:
#line 15098 "/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 50883 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2515:
#line 15104 "/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 50896 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2516:
#line 15114 "/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 50908 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2517:
#line 15120 "/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 50920 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2518:
#line 15129 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX_CSTRING db={(char*) any_db,3};
(yyval.table)= new (thd->mem_root) Table_ident(thd, &db, &(yyvsp[0].ident_sys), 0);
if (unlikely((yyval.table) == NULL))
MYSQL_YYABORT;
}
#line 50933 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2523:
#line 15145 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ident_cli)= (yyvsp[0].kwd); }
#line 50941 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2524:
#line 15150 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(thd->to_ident_sys_alloc(&(yyval.ident_sys), &(yyvsp[0].ident_cli))))
MYSQL_YYABORT;
}
#line 50952 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2525:
#line 15158 "/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 50963 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2526:
#line 15166 "/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 50974 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2527:
#line 15174 "/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 50985 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2529:
#line 15183 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyval.ident_sys).copy_keyword(thd, &(yyvsp[0].kwd))))
MYSQL_YYABORT;
}
#line 50996 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2530:
#line 15190 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ident_cli)= (yyvsp[0].ident_cli); }
#line 51004 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2531:
#line 15191 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ident_cli)= (yyvsp[0].kwd); }
#line 51012 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2533:
#line 15197 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyval.ident_sys).copy_keyword(thd, &(yyvsp[0].kwd))))
MYSQL_YYABORT;
}
#line 51023 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2534:
#line 15202 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyval.ident_sys).copy_sys(thd, &(yyvsp[0].lex_str))))
MYSQL_YYABORT;
}
#line 51034 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2536:
#line 15212 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyval.ident_sys).copy_keyword(thd, &(yyvsp[0].kwd))))
MYSQL_YYABORT;
}
#line 51045 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2538:
#line 15221 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyval.ident_sys).copy_keyword(thd, &(yyvsp[0].kwd))))
MYSQL_YYABORT;
}
#line 51056 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2539:
#line 15228 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].ident_sys);}
#line 51064 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2540:
#line 15229 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].lex_str);}
#line 51072 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2541:
#line 15230 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].lex_str);}
#line 51080 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2542:
#line 15235 "/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 51097 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2543:
#line 15246 "/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 51132 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2544:
#line 15275 "/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 51145 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 2547:
#line 15286 "/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 51157 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3261:
#line 16127 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->set_stmt_init();
}
#line 51168 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3262:
#line 16132 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->check_main_unit_semantics())
MYSQL_YYABORT;
}
#line 51179 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3265:
#line 16142 "/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 51191 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3266:
#line 16148 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
MYSQL_YYABORT;
}
#line 51202 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3267:
#line 16153 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->option_type= (yyvsp[0].var_type);
}
#line 51212 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3269:
#line 16159 "/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 51228 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3275:
#line 16186 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[0].kwd).pos()))
MYSQL_YYABORT;
}
#line 51239 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3276:
#line 16191 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
MYSQL_YYABORT;
}
#line 51250 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3279:
#line 16206 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->option_type= (yyvsp[0].var_type);
}
#line 51260 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3282:
#line 16214 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.var_type)=OPT_GLOBAL; }
#line 51268 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3283:
#line 16215 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.var_type)=OPT_SESSION; }
#line 51276 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3284:
#line 16216 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.var_type)=OPT_SESSION; }
#line 51284 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3285:
#line 16220 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.var_type)=OPT_SESSION; }
#line 51292 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3286:
#line 16221 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.var_type)=OPT_GLOBAL; }
#line 51300 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3287:
#line 16222 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.var_type)=OPT_SESSION; }
#line 51308 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3288:
#line 16223 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.var_type)=OPT_SESSION; }
#line 51316 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3289:
#line 16227 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.var_type)=OPT_DEFAULT; }
#line 51324 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3290:
#line 16228 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.var_type)=OPT_GLOBAL; }
#line 51332 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3291:
#line 16229 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.var_type)=OPT_SESSION; }
#line 51340 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3292:
#line 16230 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.var_type)=OPT_SESSION; }
#line 51348 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3293:
#line 16239 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->main_select_push(false))
MYSQL_YYABORT;
}
#line 51359 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3294:
#line 16244 "/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 51373 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3295:
#line 16252 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->main_select_push(false))
MYSQL_YYABORT;
}
#line 51384 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3296:
#line 16257 "/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 51399 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3297:
#line 16266 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->main_select_push(false))
MYSQL_YYABORT;
}
#line 51410 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3298:
#line 16271 "/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 51423 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3299:
#line 16283 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[-1].ident_cli).pos()))
MYSQL_YYABORT;
}
#line 51434 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3300:
#line 16288 "/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 51448 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3301:
#line 16296 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[-3].ident_cli).pos()))
MYSQL_YYABORT;
}
#line 51459 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3302:
#line 16301 "/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 51473 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3303:
#line 16309 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[-3].kwd).pos()))
MYSQL_YYABORT;
}
#line 51484 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3304:
#line 16314 "/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 51496 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3305:
#line 16324 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[-1].ident_cli).pos()))
MYSQL_YYABORT;
}
#line 51507 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3306:
#line 16329 "/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 51521 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3307:
#line 16337 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[-3].ident_cli).pos()))
MYSQL_YYABORT;
}
#line 51532 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3308:
#line 16342 "/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 51546 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3309:
#line 16350 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[-3].kwd).pos()))
MYSQL_YYABORT;
}
#line 51557 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3310:
#line 16355 "/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 51570 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3311:
#line 16362 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[-2].lex_str).str))
MYSQL_YYABORT;
}
#line 51581 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3312:
#line 16367 "/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 51593 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3313:
#line 16373 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[-4].lex_str).str))
MYSQL_YYABORT;
}
#line 51604 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3314:
#line 16378 "/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 51616 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3315:
#line 16384 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[-6].lex_str).str))
MYSQL_YYABORT;
}
#line 51627 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3316:
#line 16389 "/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 51639 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3317:
#line 16395 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[-6].lex_str).str))
MYSQL_YYABORT;
}
#line 51650 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3318:
#line 16400 "/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 51662 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3319:
#line 16406 "/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 51686 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3320:
#line 16424 "/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 51703 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3321:
#line 16435 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[-2].kwd).pos()))
MYSQL_YYABORT;
LEX *lex= Lex;
CHARSET_INFO *cs2;
CHARSET_INFO *cs3;
cs2= (yyvsp[-1].charset) ? (yyvsp[-1].charset) : global_system_variables.character_set_client;
cs3= (yyvsp[0].charset) ? (yyvsp[0].charset) : cs2;
if (unlikely(!my_charset_same(cs2, cs3)))
{
my_error(ER_COLLATION_CHARSET_MISMATCH, MYF(0),
cs3->name, cs2->csname);
MYSQL_YYABORT;
}
set_var_collation_client *var;
var= new (thd->mem_root) set_var_collation_client(cs3, cs3, cs3);
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 51731 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3322:
#line 16457 "/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 51759 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3323:
#line 16479 "/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 51781 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3324:
#line 16495 "/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_str));
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 51798 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3325:
#line 16506 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[-1].kwd).pos()))
MYSQL_YYABORT;
}
#line 51809 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3326:
#line 16511 "/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 51823 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3327:
#line 16519 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[-1].kwd).pos()))
MYSQL_YYABORT;
}
#line 51834 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3328:
#line 16524 "/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 51846 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3329:
#line 16530 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (sp_create_assignment_lex(thd, (yyvsp[-1].kwd).pos()))
MYSQL_YYABORT;
}
#line 51857 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3330:
#line 16535 "/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 51869 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3335:
#line 16551 "/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 51891 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3336:
#line 16570 "/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 51912 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3337:
#line 16587 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= true; }
#line 51920 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3338:
#line 16588 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= false; }
#line 51928 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3339:
#line 16592 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.tx_isolation)= ISO_READ_UNCOMMITTED; }
#line 51936 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3340:
#line 16593 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.tx_isolation)= ISO_READ_COMMITTED; }
#line 51944 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3341:
#line 16594 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.tx_isolation)= ISO_REPEATABLE_READ; }
#line 51952 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3342:
#line 16595 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.tx_isolation)= ISO_SERIALIZABLE; }
#line 51960 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3343:
#line 16601 "/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 51971 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3344:
#line 16606 "/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 51982 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3345:
#line 16611 "/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 51996 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3346:
#line 16621 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)=(yyvsp[0].item); }
#line 52004 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3347:
#line 16622 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)=0; }
#line 52012 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3348:
#line 16624 "/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 52024 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3349:
#line 16630 "/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 52036 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3350:
#line 16636 "/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 52048 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3351:
#line 16647 "/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 52062 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3352:
#line 16655 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 52070 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3353:
#line 16660 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 52078 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3354:
#line 16662 "/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 52090 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3355:
#line 16668 "/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 52102 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3356:
#line 16676 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 52110 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3357:
#line 16677 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 52118 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3360:
#line 16687 "/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_WRITE_ALLOW_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 52140 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3361:
#line 16705 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= TL_READ_NO_INSERT; }
#line 52148 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3362:
#line 16706 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= TL_WRITE_DEFAULT; }
#line 52156 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3363:
#line 16708 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= (Lex->sphead ? TL_WRITE_DEFAULT : TL_WRITE_CONCURRENT_INSERT);
}
#line 52166 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3364:
#line 16712 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= TL_WRITE_LOW_PRIORITY; }
#line 52174 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3365:
#line 16713 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= TL_READ; }
#line 52182 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3366:
#line 16718 "/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 52196 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3367:
#line 16726 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 52204 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3368:
#line 16735 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->main_select_push())
MYSQL_YYABORT;
}
#line 52215 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3369:
#line 16740 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->pop_select(); //main select
}
#line 52225 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3370:
#line 16747 "/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 52240 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3371:
#line 16756 "/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 52255 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3372:
#line 16765 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
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;
lex->current_select->select_limit= one;
lex->current_select->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 52278 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3373:
#line 16782 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->clause_that_disallows_subselect= NULL;
if (!lex->current_select->explicit_limit)
{
Item *one= new (thd->mem_root) Item_int(thd, (int32) 1);
if (one == NULL)
MYSQL_YYABORT;
lex->current_select->select_limit= one;
lex->current_select->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 52305 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3374:
#line 16805 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ident= null_clex_str; }
#line 52313 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3375:
#line 16806 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ident= (yyvsp[-1].ident_sys); }
#line 52321 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3376:
#line 16810 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ha_read_mode = RFIRST; }
#line 52329 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3377:
#line 16811 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ha_read_mode = RNEXT; }
#line 52337 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3378:
#line 16815 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ha_read_mode = RFIRST; }
#line 52345 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3379:
#line 16816 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ha_read_mode = RNEXT; }
#line 52353 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3380:
#line 16817 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ha_read_mode = RPREV; }
#line 52361 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3381:
#line 16818 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ha_read_mode = RLAST; }
#line 52369 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3382:
#line 16820 "/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 52383 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3383:
#line 16828 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 52391 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3384:
#line 16832 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ha_rkey_mode)=HA_READ_KEY_EXACT; }
#line 52399 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3385:
#line 16833 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ha_rkey_mode)=HA_READ_KEY_OR_NEXT; }
#line 52407 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3386:
#line 16834 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ha_rkey_mode)=HA_READ_KEY_OR_PREV; }
#line 52415 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3387:
#line 16835 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ha_rkey_mode)=HA_READ_AFTER_KEY; }
#line 52423 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3388:
#line 16836 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ha_rkey_mode)=HA_READ_BEFORE_KEY; }
#line 52431 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3389:
#line 16843 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 52439 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3390:
#line 16848 "/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 52450 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3391:
#line 16853 "/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 52461 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3392:
#line 16858 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_REVOKE_ALL;
}
#line 52471 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3393:
#line 16862 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_revoke_proxy(thd, (yyvsp[-2].lex_user)))
MYSQL_YYABORT;
}
#line 52482 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3394:
#line 16867 "/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 52494 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3395:
#line 16876 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->with_admin_option= true; (yyval.lex_user)= (yyvsp[0].lex_user); }
#line 52502 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3396:
#line 16878 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->with_admin_option= false; (yyval.lex_user)= (yyvsp[0].lex_user); }
#line 52510 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3397:
#line 16883 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 52518 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3398:
#line 16889 "/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 52529 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3399:
#line 16895 "/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 52540 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3400:
#line 16900 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_grant_proxy(thd, (yyvsp[-3].lex_user), (yyvsp[0].privilege)))
MYSQL_YYABORT;
}
#line 52551 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3401:
#line 16905 "/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 52565 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3402:
#line 16916 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->definer = 0; }
#line 52573 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3403:
#line 16917 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->definer = (yyvsp[0].lex_user); }
#line 52581 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3404:
#line 16921 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->with_admin_option= false; }
#line 52589 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3405:
#line 16922 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->with_admin_option= true; }
#line 52597 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3406:
#line 16927 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
MYSQL_YYABORT;
}
#line 52608 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3407:
#line 16932 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
MYSQL_YYABORT;
}
#line 52619 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3408:
#line 16940 "/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;
(yyval.lex_user)->auth= NULL;
}
#line 52632 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3409:
#line 16950 "/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->alloc(sizeof(LEX_USER)))))
MYSQL_YYABORT;
(yyval.lex_user)->user= (yyvsp[0].lex_str);
(yyval.lex_user)->host= empty_clex_str;
(yyval.lex_user)->auth= NULL;
if (unlikely(check_string_char_length(&(yyval.lex_user)->user, ER_USERNAME,
username_char_length,
cs, 0)))
MYSQL_YYABORT;
}
#line 52657 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3414:
#line 16979 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.lex_grant)= new (thd->mem_root) Lex_grant_privilege(GLOBAL_ACLS, true)))
MYSQL_YYABORT;
}
#line 52668 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3417:
#line 16992 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.lex_grant)= new (thd->mem_root) Lex_grant_privilege((yyvsp[0].privilege))))
MYSQL_YYABORT;
}
#line 52679 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3418:
#line 16997 "/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 52692 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3419:
#line 17004 "/home/buildbot/git/sql/sql_yacc.yy"
{
((yyval.lex_grant)= (yyvsp[-2].lex_grant))->add_object_privilege((yyvsp[0].privilege));
}
#line 52702 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3420:
#line 17008 "/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 52714 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3421:
#line 17017 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.column_list_privilege)= Lex_column_list_privilege((yyvsp[-1].ident_sys_list), (yyvsp[-3].privilege));
}
#line 52724 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3422:
#line 17023 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= SELECT_ACL; }
#line 52732 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3423:
#line 17024 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= INSERT_ACL; }
#line 52740 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3424:
#line 17025 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= UPDATE_ACL; }
#line 52748 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3425:
#line 17026 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= REFERENCES_ACL; }
#line 52756 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3426:
#line 17030 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= SELECT_ACL; }
#line 52764 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3427:
#line 17031 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= INSERT_ACL; }
#line 52772 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3428:
#line 17032 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= UPDATE_ACL; }
#line 52780 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3429:
#line 17033 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= REFERENCES_ACL; }
#line 52788 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3430:
#line 17034 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= DELETE_ACL;}
#line 52796 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3431:
#line 17035 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= NO_ACL; }
#line 52804 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3432:
#line 17036 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= INDEX_ACL;}
#line 52812 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3433:
#line 17037 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= ALTER_ACL;}
#line 52820 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3434:
#line 17038 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= CREATE_ACL;}
#line 52828 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3435:
#line 17039 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= DROP_ACL;}
#line 52836 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3436:
#line 17040 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= EXECUTE_ACL;}
#line 52844 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3437:
#line 17041 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= RELOAD_ACL;}
#line 52852 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3438:
#line 17042 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= SHUTDOWN_ACL;}
#line 52860 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3439:
#line 17043 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= PROCESS_ACL;}
#line 52868 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3440:
#line 17044 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= FILE_ACL;}
#line 52876 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3441:
#line 17045 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= GRANT_ACL;}
#line 52884 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3442:
#line 17046 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= SHOW_DB_ACL;}
#line 52892 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3443:
#line 17047 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= SUPER_ACL;}
#line 52900 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3444:
#line 17048 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= CREATE_TMP_ACL;}
#line 52908 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3445:
#line 17049 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= LOCK_TABLES_ACL; }
#line 52916 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3446:
#line 17050 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= REPL_SLAVE_ACL; }
#line 52924 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3447:
#line 17051 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= BINLOG_MONITOR_ACL; /*Compatibility*/ }
#line 52932 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3448:
#line 17052 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= CREATE_VIEW_ACL; }
#line 52940 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3449:
#line 17053 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= SHOW_VIEW_ACL; }
#line 52948 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3450:
#line 17054 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= CREATE_PROC_ACL; }
#line 52956 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3451:
#line 17055 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= ALTER_PROC_ACL; }
#line 52964 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3452:
#line 17056 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= CREATE_USER_ACL; }
#line 52972 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3453:
#line 17057 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= EVENT_ACL;}
#line 52980 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3454:
#line 17058 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= TRIGGER_ACL; }
#line 52988 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3455:
#line 17059 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= CREATE_TABLESPACE_ACL; }
#line 52996 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3456:
#line 17060 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= DELETE_HISTORY_ACL; }
#line 53004 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3457:
#line 17061 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= SET_USER_ACL; }
#line 53012 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3458:
#line 17062 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= FEDERATED_ADMIN_ACL; }
#line 53020 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3459:
#line 17063 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= CONNECTION_ADMIN_ACL; }
#line 53028 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3460:
#line 17064 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= READ_ONLY_ADMIN_ACL; }
#line 53036 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3461:
#line 17065 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= READ_ONLY_ADMIN_ACL; }
#line 53044 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3462:
#line 17066 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= BINLOG_MONITOR_ACL; }
#line 53052 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3463:
#line 17067 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= BINLOG_ADMIN_ACL; }
#line 53060 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3464:
#line 17068 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= BINLOG_REPLAY_ACL; }
#line 53068 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3465:
#line 17069 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= REPL_MASTER_ADMIN_ACL; }
#line 53076 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3466:
#line 17070 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= REPL_SLAVE_ADMIN_ACL; }
#line 53084 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3467:
#line 17071 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= SLAVE_MONITOR_ACL; }
#line 53092 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3468:
#line 17075 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 53100 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3469:
#line 17076 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 53108 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3472:
#line 17086 "/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 53121 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3473:
#line 17093 "/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 53134 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3474:
#line 17100 "/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 53147 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3475:
#line 17110 "/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 53162 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3476:
#line 17119 "/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 53174 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3477:
#line 17125 "/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 53187 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3478:
#line 17132 "/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 53198 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3479:
#line 17140 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
MYSQL_YYABORT;
}
#line 53209 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3480:
#line 17145 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
MYSQL_YYABORT;
}
#line 53220 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3481:
#line 17153 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
MYSQL_YYABORT;
}
#line 53231 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3482:
#line 17158 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
MYSQL_YYABORT;
}
#line 53242 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3483:
#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 53253 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3484:
#line 17171 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
MYSQL_YYABORT;
}
#line 53264 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3489:
#line 17182 "/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 53276 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3490:
#line 17188 "/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 53288 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3491:
#line 17194 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.lex_user)= (yyvsp[-3].lex_user);
(yyvsp[-3].lex_user)->auth= (yyvsp[0].user_auth);
}
#line 53299 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3492:
#line 17199 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.lex_user)= (yyvsp[0].lex_user);
}
#line 53309 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3493:
#line 17206 "/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 53321 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3494:
#line 17212 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.user_auth)= (yyvsp[0].user_auth);
}
#line 53331 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3495:
#line 17219 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.user_auth)= (yyvsp[0].user_auth);
(yyval.user_auth)->plugin= (yyvsp[-1].lex_str);
}
#line 53342 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3496:
#line 17227 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.user_auth)=(USER_AUTH*) thd->calloc(sizeof(USER_AUTH))))
MYSQL_YYABORT;
}
#line 53353 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3497:
#line 17232 "/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 53365 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3498:
#line 17238 "/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 53377 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3500:
#line 17248 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->account_options.ssl_type= SSL_TYPE_SPECIFIED;
}
#line 53387 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3501:
#line 17252 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->account_options.ssl_type= SSL_TYPE_ANY;
}
#line 53397 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3502:
#line 17256 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->account_options.ssl_type= SSL_TYPE_X509;
}
#line 53407 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3503:
#line 17260 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->account_options.ssl_type= SSL_TYPE_NONE;
}
#line 53417 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3504:
#line 17267 "/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 53428 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3505:
#line 17272 "/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 53439 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3506:
#line 17277 "/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 53450 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3507:
#line 17282 "/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 53461 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3508:
#line 17287 "/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 53472 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3509:
#line 17294 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 53480 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3510:
#line 17295 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 53488 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3511:
#line 17299 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 53496 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3513:
#line 17305 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= NO_ACL; }
#line 53504 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3514:
#line 17306 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= (yyvsp[0].privilege); }
#line 53512 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3515:
#line 17310 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= NO_ACL; }
#line 53520 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3516:
#line 17311 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= GRANT_ACL; }
#line 53528 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3517:
#line 17315 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= (yyvsp[-1].privilege) | (yyvsp[0].privilege); }
#line 53536 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3519:
#line 17320 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= GRANT_ACL;}
#line 53544 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3520:
#line 17321 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.privilege)= NO_ACL; }
#line 53552 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3521:
#line 17326 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command = SQLCOM_BEGIN;
lex->start_transaction_opt= 0;
}
#line 53564 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3522:
#line 17331 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 53572 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3523:
#line 17336 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command= SQLCOM_COMPOUND;
if (Lex->sp_body_finalize_procedure(thd))
MYSQL_YYABORT;
}
#line 53584 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3524:
#line 17344 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 53592 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3525:
#line 17345 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 53600 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3526:
#line 17349 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 53608 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3527:
#line 17350 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 53616 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3528:
#line 17355 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_yes_no_unk)= TVL_UNKNOWN; }
#line 53624 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3529:
#line 17356 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_yes_no_unk)= TVL_NO; }
#line 53632 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3530:
#line 17357 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_yes_no_unk)= TVL_YES; }
#line 53640 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3531:
#line 17362 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_yes_no_unk)= TVL_UNKNOWN; }
#line 53648 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3532:
#line 17363 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_yes_no_unk)= TVL_YES; }
#line 53656 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3533:
#line 17364 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_yes_no_unk)= TVL_NO; }
#line 53664 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3534:
#line 17369 "/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 53679 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3535:
#line 17381 "/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 53694 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3536:
#line 17390 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_ROLLBACK_TO_SAVEPOINT;
lex->ident= (yyvsp[0].ident_sys);
}
#line 53706 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3537:
#line 17396 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_ROLLBACK_TO_SAVEPOINT;
lex->ident= (yyvsp[0].ident_sys);
}
#line 53718 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3538:
#line 17405 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_SAVEPOINT;
lex->ident= (yyvsp[0].ident_sys);
}
#line 53730 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3539:
#line 17414 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_RELEASE_SAVEPOINT;
lex->ident= (yyvsp[0].ident_sys);
}
#line 53742 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3540:
#line 17427 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.unit_operation).unit_type= UNION_TYPE; (yyval.unit_operation).distinct= (yyvsp[0].num); }
#line 53750 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3541:
#line 17429 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.unit_operation).unit_type= INTERSECT_TYPE; (yyval.unit_operation).distinct= (yyvsp[0].num); }
#line 53758 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3542:
#line 17431 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.unit_operation).unit_type= EXCEPT_TYPE; (yyval.unit_operation).distinct= (yyvsp[0].num); }
#line 53766 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3543:
#line 17438 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)=1; }
#line 53774 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3544:
#line 17439 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)=1; }
#line 53782 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3545:
#line 17440 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)=0; }
#line 53790 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3546:
#line 17444 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->options|= SELECT_STRAIGHT_JOIN; }
#line 53798 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3547:
#line 17446 "/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 53810 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3548:
#line 17451 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->options|= SELECT_DISTINCT; }
#line 53818 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3549:
#line 17452 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->options|= SELECT_DISTINCT; }
#line 53826 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3550:
#line 17453 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->options|= SELECT_SMALL_RESULT; }
#line 53834 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3551:
#line 17454 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->options|= SELECT_BIG_RESULT; }
#line 53842 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3552:
#line 17455 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->options|= OPTION_BUFFER_RESULT; }
#line 53850 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3553:
#line 17456 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->options|= OPTION_FOUND_ROWS; }
#line 53858 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3554:
#line 17457 "/home/buildbot/git/sql/sql_yacc.yy"
{ Select->options|= SELECT_ALL; }
#line 53866 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3557:
#line 17473 "/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 53883 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3558:
#line 17487 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->definer= (yyvsp[0].lex_user);
Lex->account_options.reset();
}
#line 53894 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3559:
#line 17500 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= DTYPE_ALGORITHM_UNDEFINED; }
#line 53902 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3560:
#line 17501 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= VIEW_ALGORITHM_MERGE; }
#line 53910 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3561:
#line 17502 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= VIEW_ALGORITHM_TMPTABLE; }
#line 53918 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3562:
#line 17506 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.view_suid)= VIEW_SUID_DEFAULT; }
#line 53926 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3563:
#line 17507 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.view_suid)= (yyvsp[0].view_suid); }
#line 53934 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3564:
#line 17511 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.view_suid)= VIEW_SUID_DEFINER; }
#line 53942 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3565:
#line 17512 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.view_suid)= VIEW_SUID_INVOKER; }
#line 53950 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3566:
#line 17517 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 53958 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3567:
#line 17518 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 53966 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3568:
#line 17523 "/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 53978 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3569:
#line 17529 "/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 53990 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3570:
#line 17537 "/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 54002 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3571:
#line 17544 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->parsed_create_view((yyvsp[-1].select_lex_unit), (yyvsp[0].num)))
MYSQL_YYABORT;
}
#line 54013 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3572:
#line 17551 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= VIEW_CHECK_NONE; }
#line 54021 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3573:
#line 17552 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= VIEW_CHECK_CASCADED; }
#line 54029 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3574:
#line 17553 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= VIEW_CHECK_CASCADED; }
#line 54037 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3575:
#line 17554 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= VIEW_CHECK_LOCAL; }
#line 54045 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3576:
#line 17565 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.trigger_action_order_type)= TRG_ORDER_FOLLOWS; }
#line 54053 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3577:
#line 17567 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.trigger_action_order_type)= TRG_ORDER_PRECEDES; }
#line 54061 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3578:
#line 17572 "/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 54073 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3579:
#line 17579 "/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 54084 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3580:
#line 17588 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->add_create_options_with_check((yyvsp[0].object_ddl_options))))
MYSQL_YYABORT;
}
#line 54095 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3581:
#line 17597 "/home/buildbot/git/sql/sql_yacc.yy"
{ /* $9 */
Lex->raw_trg_on_table_name_begin= YYLIP->get_tok_start();
}
#line 54105 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3582:
#line 17603 "/home/buildbot/git/sql/sql_yacc.yy"
{ /* $13 */
Lex->raw_trg_on_table_name_end= YYLIP->get_tok_start();
}
#line 54115 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3583:
#line 17608 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->trg_chistics.ordering_clause_begin= YYLIP->get_cpp_ptr();
}
#line 54125 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3584:
#line 17612 "/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 54152 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3585:
#line 17633 "/home/buildbot/git/sql/sql_yacc.yy"
{ /* $20 */
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[-9].table), (LEX_CSTRING*) 0,
TL_OPTION_UPDATING, TL_READ_NO_INSERT,
MDL_SHARED_NO_WRITE))
MYSQL_YYABORT;
}
#line 54177 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3586:
#line 17661 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->init_last_field(&lex->sphead->m_return_field_def,
&empty_clex_str,
thd->variables.collation_database);
}
#line 54190 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3587:
#line 17668 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sf_return_fill_definition((yyvsp[0].Lex_field_type))))
MYSQL_YYABORT;
}
#line 54201 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3588:
#line 17679 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_XA_START;
}
#line 54211 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3589:
#line 17683 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_XA_END;
}
#line 54221 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3590:
#line 17687 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_XA_PREPARE;
}
#line 54231 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3591:
#line 17691 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_XA_COMMIT;
}
#line 54241 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3592:
#line 17695 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_XA_ROLLBACK;
}
#line 54251 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3593:
#line 17699 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_XA_RECOVER;
Lex->verbose= (yyvsp[0].num);
}
#line 54262 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3594:
#line 17706 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= false; }
#line 54270 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3595:
#line 17708 "/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 54289 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3596:
#line 17724 "/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 54302 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3597:
#line 17731 "/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 54315 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3598:
#line 17738 "/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 54331 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3599:
#line 17750 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 54339 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3600:
#line 17751 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 54347 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3601:
#line 17752 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 54355 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3602:
#line 17756 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->xa_opt=XA_NONE; }
#line 54363 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3603:
#line 17757 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->xa_opt=XA_JOIN; }
#line 54371 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3604:
#line 17758 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->xa_opt=XA_RESUME; }
#line 54379 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3605:
#line 17762 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->xa_opt=XA_NONE; }
#line 54387 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3606:
#line 17763 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->xa_opt=XA_ONE_PHASE; }
#line 54395 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3607:
#line 17768 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->xa_opt=XA_NONE; }
#line 54403 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3608:
#line 17770 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->xa_opt=XA_SUSPEND; }
#line 54411 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3610:
#line 17775 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 54419 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3611:
#line 17776 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->xa_opt=XA_FOR_MIGRATE; }
#line 54427 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3612:
#line 17781 "/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 54438 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3613:
#line 17786 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->stmt_install_plugin((yyvsp[0].lex_str));
}
#line 54448 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3614:
#line 17793 "/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 54459 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3615:
#line 17798 "/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 54470 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3616:
#line 17807 "/home/buildbot/git/sql/sql_yacc.yy"
{
YYERROR;
}
#line 54480 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3648:
#line 17888 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.spvar_definition)= Lex->row_field_name(thd, (yyvsp[0].ident_sys))))
MYSQL_YYABORT;
}
#line 54491 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3649:
#line 17896 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyvsp[-1].expr_lex)->sp_while_loop_expression(thd)))
MYSQL_YYABORT;
}
#line 54502 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3650:
#line 17901 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_while_loop_finalize(thd)))
MYSQL_YYABORT;
}
#line 54513 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3651:
#line 17909 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 54521 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3652:
#line 17913 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= (yyvsp[-1].ident_sys); }
#line 54529 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3654:
#line 17922 "/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 54541 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3655:
#line 17930 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item) = NULL; }
#line 54549 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3656:
#line 17931 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item) = (yyvsp[0].item); }
#line 54557 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3657:
#line 17935 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyvsp[0].spvar)->mode=(yyvsp[-1].spvar_mode); }
#line 54565 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3658:
#line 17936 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyvsp[0].spvar)->mode= sp_variable::MODE_IN; }
#line 54573 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3659:
#line 17943 "/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 54585 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3660:
#line 17951 "/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 54597 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3661:
#line 17960 "/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 54610 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3662:
#line 17967 "/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 54622 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3663:
#line 17973 "/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 54633 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3664:
#line 17978 "/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 54644 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3665:
#line 17987 "/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 54656 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3666:
#line 17993 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_body_finalize_function(thd)))
MYSQL_YYABORT;
}
#line 54667 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3667:
#line 18001 "/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 54680 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3668:
#line 18009 "/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 54691 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3669:
#line 18014 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_body_finalize_procedure(thd)))
MYSQL_YYABORT;
}
#line 54702 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3670:
#line 18022 "/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 54713 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3671:
#line 18027 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_drop_function((yyvsp[-1].object_ddl_options), (yyvsp[0].ident_sys)))
MYSQL_YYABORT;
}
#line 54724 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3672:
#line 18032 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_drop_procedure((yyvsp[-1].object_ddl_options), (yyvsp[0].spname)))
MYSQL_YYABORT;
}
#line 54735 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3673:
#line 18041 "/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 54746 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3674:
#line 18046 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->stmt_create_routine_finalize();
}
#line 54756 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3675:
#line 18051 "/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 54767 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3676:
#line 18058 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->stmt_create_routine_finalize();
}
#line 54777 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3677:
#line 18063 "/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 54788 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3678:
#line 18070 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->stmt_create_routine_finalize();
}
#line 54798 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3679:
#line 18075 "/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 54810 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3680:
#line 18085 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.spblock).init();
}
#line 54820 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3681:
#line 18089 "/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 54835 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3682:
#line 18100 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.spblock)= (yyvsp[0].spblock); }
#line 54843 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3684:
#line 18107 "/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 54856 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3686:
#line 18115 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sp_block_init(thd);
}
#line 54866 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3687:
#line 18120 "/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 54882 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3705:
#line 18171 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sp_block_init(thd, &(yyvsp[-1].lex_str));
}
#line 54892 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3706:
#line 18178 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_block_finalize(thd, (yyvsp[-3].spblock), &(yyvsp[0].lex_str))))
MYSQL_YYABORT;
}
#line 54903 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3707:
#line 18186 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sp_block_init(thd);
}
#line 54913 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3708:
#line 18192 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_block_finalize(thd, (yyvsp[-2].spblock))))
MYSQL_YYABORT;
}
#line 54924 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3709:
#line 18200 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->maybe_start_compound_statement(thd)))
MYSQL_YYABORT;
Lex->sp_block_init(thd);
}
#line 54936 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
case 3710:
#line 18208 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_block_finalize(thd, (yyvsp[-2].spblock))))
MYSQL_YYABORT;
}
#line 54947 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
break;
#line 54952 "/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 ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
YYPOPSTACK (yylen);
yylen = 0;
YY_STACK_PRINT (yyss, yyssp);
*++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. */
yyn = yyr1[yyn];
yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
yystate = yytable[yystate];
else
yystate = yydefgoto[yyn - YYNTOKENS];
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 ? YYEMPTY : YYTRANSLATE (yychar);
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
++yynerrs;
#if ! YYERROR_VERBOSE
yyerror (thd, YY_("syntax error"));
#else
# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
yyssp, yytoken)
{
char const *yymsgp = YY_("syntax error");
int yysyntax_error_status;
yysyntax_error_status = YYSYNTAX_ERROR;
if (yysyntax_error_status == 0)
yymsgp = yymsg;
else if (yysyntax_error_status == 1)
{
if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg);
yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
if (!yymsg)
{
yymsg = yymsgbuf;
yymsg_alloc = sizeof yymsgbuf;
yysyntax_error_status = 2;
}
else
{
yysyntax_error_status = YYSYNTAX_ERROR;
yymsgp = yymsg;
}
}
yyerror (thd, yymsgp);
if (yysyntax_error_status == 2)
goto yyexhaustedlab;
}
# undef YYSYNTAX_ERROR
#endif
}
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 like GCC when the user code never invokes
YYERROR and the label yyerrorlab therefore never appears in user
code. */
if (/*CONSTCOND*/ 0)
goto yyerrorlab;
/* 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. */
for (;;)
{
yyn = yypact[yystate];
if (!yypact_value_is_default (yyn))
{
yyn += YYTERROR;
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
{
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",
yystos[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", yystos[yyn], yyvsp, yylsp);
yystate = yyn;
goto yynewstate;
/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here. |
`-------------------------------------*/
yyacceptlab:
yyresult = 0;
goto yyreturn;
/*-----------------------------------.
| yyabortlab -- YYABORT comes here. |
`-----------------------------------*/
yyabortlab:
yyresult = 1;
goto yyreturn;
#if !defined yyoverflow || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
yyexhaustedlab:
yyerror (thd, YY_("memory exhausted"));
yyresult = 2;
/* Fall through. */
#endif
yyreturn:
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",
yystos[*yyssp], yyvsp, thd);
YYPOPSTACK (1);
}
#ifndef yyoverflow
if (yyss != yyssa)
YYSTACK_FREE (yyss);
#endif
#if YYERROR_VERBOSE
if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg);
#endif
return yyresult;
}