)))
MYSQL_YYABORT;
(yyval.sp_assignment_lex_list)->push_back((yyvsp[0].assignment_lex), thd->mem_root);
}
#line 31804 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 414: /* cursor_actual_parameters: cursor_actual_parameters ',' assignment_source_expr */
#line 4103 "/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 31813 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 415: /* opt_parenthesized_cursor_actual_parameters: %empty */
#line 4110 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.sp_assignment_lex_list)= NULL; }
#line 31819 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 416: /* opt_parenthesized_cursor_actual_parameters: '(' cursor_actual_parameters ')' */
#line 4111 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.sp_assignment_lex_list)= (yyvsp[-1].sp_assignment_lex_list); }
#line 31825 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 420: /* sp_proc_stmt_open: OPEN_SYM ident opt_parenthesized_cursor_actual_parameters */
#line 4122 "/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 31834 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 421: /* sp_proc_stmt_fetch_head: FETCH_SYM ident INTO */
#line 4130 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_add_cfetch(thd, &(yyvsp[-1].ident_sys))))
MYSQL_YYABORT;
}
#line 31843 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 422: /* sp_proc_stmt_fetch_head: FETCH_SYM FROM ident INTO */
#line 4135 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_add_cfetch(thd, &(yyvsp[-1].ident_sys))))
MYSQL_YYABORT;
}
#line 31852 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 423: /* sp_proc_stmt_fetch_head: FETCH_SYM NEXT_SYM FROM ident INTO */
#line 4140 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_add_cfetch(thd, &(yyvsp[-1].ident_sys))))
MYSQL_YYABORT;
}
#line 31861 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 424: /* sp_proc_stmt_fetch: sp_proc_stmt_fetch_head sp_fetch_list */
#line 4147 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 31867 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 425: /* sp_proc_stmt_fetch: FETCH_SYM GROUP_SYM NEXT_SYM ROW_SYM */
#line 4149 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_add_agg_cfetch()))
MYSQL_YYABORT;
}
#line 31876 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 426: /* sp_proc_stmt_close: CLOSE_SYM ident */
#line 4157 "/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 31895 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 427: /* sp_fetch_list: ident */
#line 4175 "/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 31915 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 428: /* sp_fetch_list: sp_fetch_list ',' ident */
#line 4191 "/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 31935 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 429: /* $@47: %empty */
#line 4210 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyvsp[-1].expr_lex)->sp_if_expr(thd)))
MYSQL_YYABORT;
}
#line 31944 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 430: /* $@48: %empty */
#line 4215 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyvsp[-3].expr_lex)->sp_if_after_statements(thd)))
MYSQL_YYABORT;
}
#line 31953 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 431: /* sp_if: expr_lex THEN_SYM $@47 sp_if_then_statements $@48 sp_elseifs */
#line 4220 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sphead->backpatch(lex->spcont->pop_label());
}
#line 31963 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 436: /* $@49: %empty */
#line 4236 "/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 32017 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 437: /* case_stmt_specification: CASE_SYM $@49 case_stmt_body else_clause_opt END CASE_SYM */
#line 4289 "/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 32035 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 438: /* $@50: %empty */
#line 4306 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyvsp[0].expr_lex)->case_stmt_action_expr()))
MYSQL_YYABORT;
}
#line 32044 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 439: /* case_stmt_body: expr_lex $@50 simple_when_clause_list */
#line 4311 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 32050 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 440: /* case_stmt_body: searched_when_clause_list */
#line 4313 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 32056 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 445: /* $@51: %empty */
#line 4328 "/home/buildbot/git/sql/sql_yacc.yy"
{
/* Simple case: = */
if (unlikely((yyvsp[0].expr_lex)->case_stmt_action_when(true)))
MYSQL_YYABORT;
}
#line 32066 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 446: /* simple_when_clause: WHEN_SYM expr_lex $@51 THEN_SYM sp_case_then_statements */
#line 4335 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->case_stmt_action_then()))
MYSQL_YYABORT;
}
#line 32075 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 447: /* $@52: %empty */
#line 4343 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyvsp[0].expr_lex)->case_stmt_action_when(false)))
MYSQL_YYABORT;
}
#line 32084 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 448: /* searched_when_clause: WHEN_SYM expr_lex $@52 THEN_SYM sp_case_then_statements */
#line 4349 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->case_stmt_action_then()))
MYSQL_YYABORT;
}
#line 32093 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 449: /* else_clause_opt: %empty */
#line 4357 "/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 32108 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 451: /* sp_opt_label: %empty */
#line 4371 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= null_clex_str; }
#line 32114 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 452: /* sp_opt_label: label_ident */
#line 4372 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= (yyvsp[0].ident_sys); }
#line 32120 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 453: /* opt_sp_for_loop_direction: %empty */
#line 4377 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 32126 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 454: /* opt_sp_for_loop_direction: REVERSE_SYM */
#line 4378 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= -1; }
#line 32132 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 455: /* sp_for_loop_index_and_bounds: ident_for_loop_index sp_for_loop_bounds */
#line 4383 "/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 32141 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 456: /* sp_for_loop_bounds: IN_SYM opt_sp_for_loop_direction for_loop_bound_expr DOT_DOT_SYM for_loop_bound_expr */
#line 4392 "/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 32149 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 457: /* sp_for_loop_bounds: IN_SYM opt_sp_for_loop_direction for_loop_bound_expr */
#line 4396 "/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 32160 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 458: /* sp_for_loop_bounds: IN_SYM opt_sp_for_loop_direction '(' sp_cursor_stmt ')' */
#line 4403 "/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 32170 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 459: /* loop_body: sp_proc_stmts1 END LOOP_SYM */
#line 4412 "/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 32185 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 460: /* repeat_body: sp_proc_stmts1 UNTIL_SYM expr_lex END REPEAT_SYM */
#line 4426 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyvsp[-2].expr_lex)->sp_repeat_loop_finalize(thd))
MYSQL_YYABORT;
}
#line 32194 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 461: /* pop_sp_loop_label: sp_opt_label */
#line 4434 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_pop_loop_label(thd, &(yyvsp[0].lex_str))))
MYSQL_YYABORT;
}
#line 32203 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 462: /* $@53: %empty */
#line 4442 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_push_loop_label(thd, &(yyvsp[-1].lex_str))))
MYSQL_YYABORT;
}
#line 32212 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 463: /* sp_labeled_control: sp_control_label LOOP_SYM $@53 loop_body pop_sp_loop_label */
#line 4447 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 32218 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 464: /* $@54: %empty */
#line 4449 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_push_loop_label(thd, &(yyvsp[-1].lex_str))))
MYSQL_YYABORT;
}
#line 32227 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 465: /* sp_labeled_control: sp_control_label WHILE_SYM $@54 while_body pop_sp_loop_label */
#line 4454 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 32233 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 466: /* $@55: %empty */
#line 4456 "/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 32242 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 467: /* $@56: %empty */
#line 4461 "/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 32253 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 468: /* $@57: %empty */
#line 4468 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_for_loop_finalize(thd, (yyvsp[-2].for_loop))))
MYSQL_YYABORT;
}
#line 32262 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 469: /* sp_labeled_control: sp_control_label FOR_SYM $@55 sp_for_loop_index_and_bounds $@56 for_loop_statements $@57 pop_sp_loop_label */
#line 4473 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_for_loop_outer_block_finalize(thd, (yyvsp[-4].for_loop))))
MYSQL_YYABORT;
}
#line 32271 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 470: /* $@58: %empty */
#line 4478 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_push_loop_label(thd, &(yyvsp[-1].lex_str))))
MYSQL_YYABORT;
}
#line 32280 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 471: /* sp_labeled_control: sp_control_label REPEAT_SYM $@58 repeat_body pop_sp_loop_label */
#line 4483 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 32286 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 472: /* $@59: %empty */
#line 4488 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_push_loop_empty_label(thd)))
MYSQL_YYABORT;
}
#line 32295 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 473: /* sp_unlabeled_control: LOOP_SYM $@59 loop_body */
#line 4493 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sp_pop_loop_empty_label(thd);
}
#line 32303 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 474: /* $@60: %empty */
#line 4497 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_push_loop_empty_label(thd)))
MYSQL_YYABORT;
}
#line 32312 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 475: /* sp_unlabeled_control: WHILE_SYM $@60 while_body */
#line 4502 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sp_pop_loop_empty_label(thd);
}
#line 32320 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 476: /* $@61: %empty */
#line 4506 "/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 32331 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 477: /* $@62: %empty */
#line 4513 "/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 32342 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 478: /* sp_unlabeled_control: FOR_SYM $@61 sp_for_loop_index_and_bounds $@62 for_loop_statements */
#line 4520 "/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 32354 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 479: /* $@63: %empty */
#line 4528 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->sp_push_loop_empty_label(thd)))
MYSQL_YYABORT;
}
#line 32363 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 480: /* sp_unlabeled_control: REPEAT_SYM $@63 repeat_body */
#line 4533 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sp_pop_loop_empty_label(thd);
}
#line 32371 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 481: /* trg_action_time: BEFORE_SYM */
#line 4540 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->trg_chistics.action_time= TRG_ACTION_BEFORE; }
#line 32377 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 482: /* trg_action_time: AFTER_SYM */
#line 4542 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->trg_chistics.action_time= TRG_ACTION_AFTER; }
#line 32383 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 483: /* trg_event: INSERT */
#line 4547 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->trg_chistics.event= TRG_EVENT_INSERT; }
#line 32389 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 484: /* trg_event: UPDATE_SYM */
#line 4549 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->trg_chistics.event= TRG_EVENT_UPDATE; }
#line 32395 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 485: /* trg_event: DELETE_SYM */
#line 4551 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->trg_chistics.event= TRG_EVENT_DELETE; }
#line 32401 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 486: /* $@64: %empty */
#line 4556 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->create_info.option_list= NULL; }
#line 32407 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 487: /* create_body: create_field_list_parens $@64 opt_create_table_options opt_create_partitioning opt_create_select */
#line 4557 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32413 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 488: /* create_body: opt_create_table_options opt_create_partitioning opt_create_select */
#line 4558 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32419 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 489: /* create_body: create_like */
#line 4560 "/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 32434 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 490: /* create_like: LIKE table_ident */
#line 4573 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table)= (yyvsp[0].table); }
#line 32440 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 491: /* create_like: LEFT_PAREN_LIKE LIKE table_ident ')' */
#line 4574 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.table)= (yyvsp[-1].table); }
#line 32446 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 492: /* opt_create_select: %empty */
#line 4578 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32452 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 493: /* opt_create_select: opt_duplicate opt_as create_select_query_expression opt_versioning_option */
#line 4581 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.add(DDL_options_st::OPT_CREATE_SELECT);
if (Lex->check_cte_dependencies_and_resolve_references())
MYSQL_YYABORT;
}
#line 32462 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 494: /* create_select_query_expression: query_expression */
#line 4590 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->parsed_insert_select((yyvsp[0].select_lex_unit)->first_select()))
MYSQL_YYABORT;
}
#line 32471 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 495: /* create_select_query_expression: LEFT_PAREN_WITH with_clause query_expression_no_with_clause ')' */
#line 4595 "/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 32483 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 496: /* opt_create_partitioning: opt_partitioning */
#line 4606 "/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 32497 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 497: /* opt_partitioning: %empty */
#line 4642 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32503 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 499: /* $@65: %empty */
#line 4648 "/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 32518 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 501: /* have_partitioning: %empty */
#line 4663 "/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 32534 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 502: /* $@66: %empty */
#line 4678 "/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 32552 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 503: /* partition_entry: PARTITION_SYM $@66 partition */
#line 4692 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->pop_select(); //main select
}
#line 32560 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 504: /* $@67: %empty */
#line 4699 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->safe_to_cache_query= 1; }
#line 32566 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 506: /* part_type_def: opt_linear KEY_SYM opt_key_algo '(' part_field_list ')' */
#line 4705 "/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 32577 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 507: /* $@68: %empty */
#line 4712 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->part_type= HASH_PARTITION; }
#line 32583 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 508: /* part_type_def: opt_linear HASH_SYM $@68 part_func */
#line 4713 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32589 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 509: /* part_type_def: RANGE_SYM part_func */
#line 4715 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->part_type= RANGE_PARTITION; }
#line 32595 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 510: /* part_type_def: RANGE_SYM part_column_list */
#line 4717 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->part_type= RANGE_PARTITION; }
#line 32601 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 511: /* $@69: %empty */
#line 4719 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->parsing_place= IN_PART_FUNC;
}
#line 32609 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 512: /* part_type_def: LIST_SYM $@69 part_func */
#line 4723 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->part_info->part_type= LIST_PARTITION;
Select->parsing_place= NO_MATTER;
}
#line 32618 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 513: /* part_type_def: LIST_SYM part_column_list */
#line 4728 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->part_type= LIST_PARTITION; }
#line 32624 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 514: /* $@70: %empty */
#line 4730 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->part_info->vers_init_info(thd)))
MYSQL_YYABORT;
}
#line 32633 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 516: /* opt_linear: %empty */
#line 4738 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32639 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 517: /* opt_linear: LINEAR_SYM */
#line 4740 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->linear_hash_ind= TRUE;}
#line 32645 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 518: /* opt_key_algo: %empty */
#line 4745 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->key_algorithm= partition_info::KEY_ALGORITHM_NONE;}
#line 32651 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 519: /* opt_key_algo: ALGORITHM_SYM '=' real_ulong_num */
#line 4747 "/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 32669 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 520: /* part_field_list: %empty */
#line 4763 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32675 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 521: /* part_field_list: part_field_item_list */
#line 4764 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32681 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 522: /* part_field_item_list: part_field_item */
#line 4768 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32687 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 523: /* part_field_item_list: part_field_item_list ',' part_field_item */
#line 4769 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32693 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 524: /* part_field_item: ident */
#line 4774 "/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 32708 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 525: /* part_column_list: COLUMNS '(' part_field_list ')' */
#line 4788 "/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 32718 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 526: /* part_func: '(' part_func_expr ')' */
#line 4798 "/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 32730 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 527: /* sub_part_func: '(' part_func_expr ')' */
#line 4809 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->part_info->set_part_expr(thd, (yyvsp[-1].item), TRUE)))
MYSQL_YYABORT;
}
#line 32739 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 528: /* opt_num_parts: %empty */
#line 4817 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32745 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 529: /* opt_num_parts: PARTITIONS_SYM real_ulong_num */
#line 4819 "/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 32759 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 530: /* opt_sub_part: %empty */
#line 4831 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32765 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 531: /* $@71: %empty */
#line 4833 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->subpart_type= HASH_PARTITION; }
#line 32771 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 532: /* opt_sub_part: SUBPARTITION_SYM BY opt_linear HASH_SYM sub_part_func $@71 opt_num_subparts */
#line 4834 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32777 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 533: /* $@72: %empty */
#line 4837 "/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 32787 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 534: /* opt_sub_part: SUBPARTITION_SYM BY opt_linear KEY_SYM opt_key_algo '(' sub_part_field_list ')' $@72 opt_num_subparts */
#line 4842 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32793 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 535: /* sub_part_field_list: sub_part_field_item */
#line 4846 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32799 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 536: /* sub_part_field_list: sub_part_field_list ',' sub_part_field_item */
#line 4847 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32805 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 537: /* sub_part_field_item: ident */
#line 4852 "/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 32820 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 538: /* part_func_expr: bit_expr */
#line 4866 "/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 32833 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 539: /* opt_num_subparts: %empty */
#line 4877 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32839 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 540: /* opt_num_subparts: SUBPARTITIONS_SYM real_ulong_num */
#line 4879 "/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 32852 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 541: /* part_defs: %empty */
#line 4891 "/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 32866 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 542: /* part_defs: '(' part_def_list ')' */
#line 4901 "/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 32889 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 543: /* part_def_list: part_definition */
#line 4922 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32895 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 544: /* part_def_list: part_def_list ',' part_definition */
#line 4923 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32901 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 547: /* $@73: %empty */
#line 4933 "/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 32921 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 548: /* part_definition: opt_partition $@73 part_name opt_part_values opt_part_options opt_sub_partition */
#line 4952 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32927 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 549: /* part_name: ident */
#line 4957 "/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 32939 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 550: /* opt_part_values: %empty */
#line 4968 "/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 32959 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 551: /* $@74: %empty */
#line 4984 "/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 32976 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 552: /* opt_part_values: VALUES_LESS_SYM THAN_SYM $@74 part_func_max */
#line 4996 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 32982 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 553: /* $@75: %empty */
#line 4998 "/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 32999 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 554: /* opt_part_values: VALUES_IN_SYM $@75 part_values_in */
#line 5010 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33005 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 555: /* opt_part_values: CURRENT_SYM */
#line 5012 "/home/buildbot/git/sql/sql_yacc.yy"
{
#ifdef WITH_PARTITION_STORAGE_ENGINE
if (Lex->part_values_current(thd))
MYSQL_YYABORT;
#endif
}
#line 33016 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 556: /* opt_part_values: HISTORY_SYM */
#line 5019 "/home/buildbot/git/sql/sql_yacc.yy"
{
#ifdef WITH_PARTITION_STORAGE_ENGINE
if (Lex->part_values_history(thd))
MYSQL_YYABORT;
#endif
}
#line 33027 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 557: /* opt_part_values: DEFAULT */
#line 5026 "/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 33048 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 558: /* part_func_max: MAXVALUE_SYM */
#line 5046 "/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 33070 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 559: /* part_func_max: part_value_item */
#line 5063 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33076 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 560: /* part_values_in: part_value_item */
#line 5068 "/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 33107 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 561: /* part_values_in: '(' part_value_list ')' */
#line 5095 "/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 33120 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 562: /* part_value_list: part_value_item */
#line 5106 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33126 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 563: /* part_value_list: part_value_list ',' part_value_item */
#line 5107 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33132 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 564: /* $@76: %empty */
#line 5112 "/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 33146 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 565: /* $@77: %empty */
#line 5121 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33152 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 566: /* part_value_item: '(' $@76 part_value_item_list $@77 ')' */
#line 5123 "/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 33177 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 567: /* part_value_item_list: part_value_expr_item */
#line 5146 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33183 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 568: /* part_value_item_list: part_value_item_list ',' part_value_expr_item */
#line 5147 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33189 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 569: /* part_value_expr_item: MAXVALUE_SYM */
#line 5152 "/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 33204 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 570: /* part_value_expr_item: bit_expr */
#line 5163 "/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 33222 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 571: /* opt_sub_partition: %empty */
#line 5181 "/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 33240 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 572: /* opt_sub_partition: '(' sub_part_list ')' */
#line 5195 "/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 33267 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 573: /* sub_part_list: sub_part_definition */
#line 5220 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33273 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 574: /* sub_part_list: sub_part_list ',' sub_part_definition */
#line 5221 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33279 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 575: /* $@78: %empty */
#line 5226 "/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 33316 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 576: /* sub_part_definition: SUBPARTITION_SYM $@78 sub_name opt_subpart_options */
#line 5258 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33322 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 577: /* sub_name: ident_or_text */
#line 5263 "/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 33332 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 578: /* opt_part_options: %empty */
#line 5271 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33338 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 579: /* opt_part_options: part_option_list */
#line 5272 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33344 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 580: /* part_option_list: part_option_list part_option */
#line 5276 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33350 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 581: /* part_option_list: part_option */
#line 5277 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33356 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 582: /* part_option: server_part_option */
#line 5281 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33362 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 583: /* part_option: engine_defined_option */
#line 5283 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[0].engine_option_value_ptr)->link(&Lex->part_info->curr_part_elem->option_list,
&Lex->option_list_last);
}
#line 33371 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 584: /* opt_subpart_options: %empty */
#line 5290 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33377 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 585: /* opt_subpart_options: subpart_option_list */
#line 5291 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33383 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 586: /* subpart_option_list: subpart_option_list server_part_option */
#line 5295 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33389 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 587: /* subpart_option_list: server_part_option */
#line 5296 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33395 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 588: /* server_part_option: TABLESPACE opt_equal ident_or_text */
#line 5301 "/home/buildbot/git/sql/sql_yacc.yy"
{ /* Compatibility with MySQL */ }
#line 33401 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 589: /* server_part_option: opt_storage ENGINE_SYM opt_equal storage_engines */
#line 5303 "/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 33411 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 590: /* server_part_option: CONNECTION_SYM opt_equal TEXT_STRING_sys */
#line 5309 "/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 33421 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 591: /* server_part_option: NODEGROUP_SYM opt_equal real_ulong_num */
#line 5315 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->curr_part_elem->nodegroup_id= (uint16) (yyvsp[0].ulong_num); }
#line 33427 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 592: /* server_part_option: MAX_ROWS opt_equal real_ulonglong_num */
#line 5317 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->curr_part_elem->part_max_rows= (ha_rows) (yyvsp[0].ulonglong_number); }
#line 33433 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 593: /* server_part_option: MIN_ROWS opt_equal real_ulonglong_num */
#line 5319 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->curr_part_elem->part_min_rows= (ha_rows) (yyvsp[0].ulonglong_number); }
#line 33439 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 594: /* server_part_option: DATA_SYM DIRECTORY_SYM opt_equal TEXT_STRING_sys */
#line 5321 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->curr_part_elem->data_file_name= (yyvsp[0].lex_str).str; }
#line 33445 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 595: /* server_part_option: INDEX_SYM DIRECTORY_SYM opt_equal TEXT_STRING_sys */
#line 5323 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->curr_part_elem->index_file_name= (yyvsp[0].lex_str).str; }
#line 33451 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 596: /* server_part_option: COMMENT_SYM opt_equal TEXT_STRING_sys */
#line 5325 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->part_info->curr_part_elem->part_comment= (yyvsp[0].lex_str).str; }
#line 33457 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 597: /* opt_versioning_rotation: %empty */
#line 5329 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33463 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 598: /* $@79: %empty */
#line 5330 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->clause_that_disallows_subselect= "INTERVAL"; }
#line 33469 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 599: /* opt_versioning_rotation: $@79 INTERVAL_SYM expr interval opt_versioning_interval_start opt_vers_auto_part */
#line 5332 "/home/buildbot/git/sql/sql_yacc.yy"
{
partition_info *part_info= Lex->part_info;
const char *table_name= Lex->create_last_non_select_table->table_name.str;
if (unlikely(part_info->vers_set_interval(thd, (yyvsp[-3].item), (yyvsp[-2].interval), (yyvsp[-1].item), (yyvsp[0].num),
table_name)))
MYSQL_YYABORT;
}
#line 33481 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 600: /* opt_versioning_rotation: LIMIT ulonglong_num opt_vers_auto_part */
#line 5340 "/home/buildbot/git/sql/sql_yacc.yy"
{
partition_info *part_info= Lex->part_info;
const char *table_name= Lex->create_last_non_select_table->table_name.str;
if (unlikely(part_info->vers_set_limit((yyvsp[-1].ulonglong_number), (yyvsp[0].num), table_name)))
MYSQL_YYABORT;
}
#line 33492 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 601: /* opt_versioning_interval_start: %empty */
#line 5351 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= NULL;
}
#line 33500 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 602: /* opt_versioning_interval_start: STARTS_SYM literal */
#line 5355 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= (yyvsp[0].item);
}
#line 33508 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 603: /* opt_vers_auto_part: %empty */
#line 5362 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= 0;
}
#line 33516 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 604: /* opt_vers_auto_part: AUTO_SYM */
#line 5366 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= 1;
}
#line 33524 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 605: /* opt_as: %empty */
#line 5375 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33530 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 606: /* opt_as: AS */
#line 5376 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33536 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 607: /* opt_create_database_options: %empty */
#line 5380 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33542 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 608: /* opt_create_database_options: create_database_options */
#line 5381 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33548 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 609: /* create_database_options: create_database_option */
#line 5385 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33554 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 610: /* create_database_options: create_database_options create_database_option */
#line 5386 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33560 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 611: /* create_database_option: default_collation */
#line 5390 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33566 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 612: /* create_database_option: default_charset */
#line 5391 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 33572 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 613: /* create_database_option: COMMENT_SYM opt_equal TEXT_STRING_sys */
#line 5393 "/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 33581 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 614: /* opt_if_not_exists_table_element: %empty */
#line 5401 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->check_exists= FALSE;
}
#line 33589 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 615: /* opt_if_not_exists_table_element: IF_SYM not EXISTS */
#line 5405 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->check_exists= TRUE;
}
#line 33597 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 616: /* opt_if_not_exists: %empty */
#line 5412 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.object_ddl_options).init();
}
#line 33605 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 617: /* opt_if_not_exists: IF_SYM not EXISTS */
#line 5416 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.object_ddl_options).set(DDL_options_st::OPT_IF_NOT_EXISTS);
}
#line 33613 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 618: /* create_or_replace: CREATE */
#line 5423 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.object_ddl_options).init();
}
#line 33621 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 619: /* create_or_replace: CREATE OR_SYM REPLACE */
#line 5427 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.object_ddl_options).set(DDL_options_st::OPT_OR_REPLACE);
}
#line 33629 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 627: /* create_table_option: ENGINE_SYM opt_equal ident_or_text */
#line 5450 "/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 33648 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 628: /* create_table_option: MAX_ROWS opt_equal ulonglong_num */
#line 5465 "/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 33657 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 629: /* create_table_option: MIN_ROWS opt_equal ulonglong_num */
#line 5470 "/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 33666 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 630: /* create_table_option: AVG_ROW_LENGTH opt_equal ulong_num */
#line 5475 "/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 33675 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 631: /* create_table_option: PASSWORD_SYM opt_equal TEXT_STRING_sys */
#line 5480 "/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 33684 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 632: /* create_table_option: COMMENT_SYM opt_equal TEXT_STRING_sys */
#line 5485 "/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 33693 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 633: /* create_table_option: AUTO_INC opt_equal ulonglong_num */
#line 5490 "/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 33702 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 634: /* create_table_option: PACK_KEYS_SYM opt_equal ulong_num */
#line 5495 "/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 33721 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 635: /* create_table_option: PACK_KEYS_SYM opt_equal DEFAULT */
#line 5510 "/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 33731 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 636: /* create_table_option: STATS_AUTO_RECALC_SYM opt_equal ulong_num */
#line 5516 "/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 33750 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 637: /* create_table_option: STATS_AUTO_RECALC_SYM opt_equal DEFAULT */
#line 5531 "/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 33759 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 638: /* create_table_option: STATS_PERSISTENT_SYM opt_equal ulong_num */
#line 5536 "/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 33778 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 639: /* create_table_option: STATS_PERSISTENT_SYM opt_equal DEFAULT */
#line 5551 "/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 33788 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 640: /* create_table_option: STATS_SAMPLE_PAGES_SYM opt_equal ulong_num */
#line 5557 "/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 33810 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 641: /* create_table_option: STATS_SAMPLE_PAGES_SYM opt_equal DEFAULT */
#line 5575 "/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 33819 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 642: /* create_table_option: CHECKSUM_SYM opt_equal ulong_num */
#line 5580 "/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 33828 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 643: /* create_table_option: TABLE_CHECKSUM_SYM opt_equal ulong_num */
#line 5585 "/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 33837 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 644: /* create_table_option: PAGE_CHECKSUM_SYM opt_equal choice */
#line 5590 "/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 33846 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 645: /* create_table_option: DELAY_KEY_WRITE_SYM opt_equal ulong_num */
#line 5595 "/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 33855 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 646: /* create_table_option: ROW_FORMAT_SYM opt_equal row_types */
#line 5600 "/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 33864 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 647: /* $@80: %empty */
#line 5605 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->first_select_lex()->table_list.save_and_clear(&Lex->save_list);
}
#line 33872 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 648: /* create_table_option: UNION_SYM opt_equal $@80 '(' opt_table_list ')' */
#line 5609 "/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 33898 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 651: /* create_table_option: INSERT_METHOD opt_equal merge_insert_types */
#line 5633 "/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 33907 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 652: /* create_table_option: DATA_SYM DIRECTORY_SYM opt_equal TEXT_STRING_sys */
#line 5638 "/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 33916 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 653: /* create_table_option: INDEX_SYM DIRECTORY_SYM opt_equal TEXT_STRING_sys */
#line 5643 "/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 33925 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 654: /* create_table_option: TABLESPACE ident */
#line 5648 "/home/buildbot/git/sql/sql_yacc.yy"
{ /* Compatiblity with MySQL */ }
#line 33931 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 655: /* create_table_option: STORAGE_SYM DISK_SYM */
#line 5650 "/home/buildbot/git/sql/sql_yacc.yy"
{Lex->create_info.storage_media= HA_SM_DISK;}
#line 33937 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 656: /* create_table_option: STORAGE_SYM MEMORY_SYM */
#line 5652 "/home/buildbot/git/sql/sql_yacc.yy"
{Lex->create_info.storage_media= HA_SM_MEMORY;}
#line 33943 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 657: /* create_table_option: CONNECTION_SYM opt_equal TEXT_STRING_sys */
#line 5654 "/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 33953 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 658: /* create_table_option: KEY_BLOCK_SIZE opt_equal ulong_num */
#line 5660 "/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 33962 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 659: /* create_table_option: TRANSACTIONAL_SYM opt_equal choice */
#line 5665 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.used_fields|= HA_CREATE_USED_TRANSACTIONAL;
Lex->create_info.transactional= (yyvsp[0].choice);
}
#line 33971 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 660: /* create_table_option: engine_defined_option */
#line 5670 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[0].engine_option_value_ptr)->link(&Lex->create_info.option_list, &Lex->option_list_last);
}
#line 33979 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 661: /* create_table_option: SEQUENCE_SYM opt_equal choice */
#line 5674 "/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 33988 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 663: /* engine_defined_option: ident_options equal TEXT_STRING_sys */
#line 5683 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyvsp[0].lex_str).length > ENGINE_OPTION_MAX_LENGTH))
my_yyabort_error((ER_VALUE_TOO_LONG, MYF(0), (yyvsp[-2].ident_sys).str));
(yyval.engine_option_value_ptr)= new (thd->mem_root) engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].lex_str), true);
MYSQL_YYABORT_UNLESS((yyval.engine_option_value_ptr));
}
#line 33999 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 664: /* engine_defined_option: ident_options equal ident */
#line 5690 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyvsp[0].ident_sys).length > ENGINE_OPTION_MAX_LENGTH))
my_yyabort_error((ER_VALUE_TOO_LONG, MYF(0), (yyvsp[-2].ident_sys).str));
(yyval.engine_option_value_ptr)= new (thd->mem_root) engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].ident_sys), false);
MYSQL_YYABORT_UNLESS((yyval.engine_option_value_ptr));
}
#line 34010 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 665: /* engine_defined_option: ident_options equal real_ulonglong_num */
#line 5697 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.engine_option_value_ptr)= new (thd->mem_root) engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].ulonglong_number), thd->mem_root);
MYSQL_YYABORT_UNLESS((yyval.engine_option_value_ptr));
}
#line 34019 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 666: /* engine_defined_option: ident_options equal DEFAULT */
#line 5702 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.engine_option_value_ptr)= new (thd->mem_root) engine_option_value((yyvsp[-2].ident_sys));
MYSQL_YYABORT_UNLESS((yyval.engine_option_value_ptr));
}
#line 34028 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 668: /* ident_options: keyword_options */
#line 5711 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyval.ident_sys).copy_keyword(thd, &(yyvsp[0].kwd))))
MYSQL_YYABORT;
}
#line 34037 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 673: /* versioning_option: WITH_SYSTEM_SYM VERSIONING_SYM */
#line 5732 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->create_info.options & HA_LEX_CREATE_TMP_TABLE))
{
if (!DBUG_IF("sysvers_force"))
{
my_error(ER_VERS_NOT_SUPPORTED, MYF(0), "CREATE TEMPORARY TABLE");
MYSQL_YYABORT;
}
}
else
{
Lex->alter_info.flags|= ALTER_ADD_SYSTEM_VERSIONING;
Lex->create_info.options|= HA_VERSIONED_TABLE;
}
}
#line 34057 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 674: /* default_charset: opt_default charset opt_equal charset_name_or_default */
#line 5751 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->create_info.add_table_option_default_charset(
thd, thd->variables.character_set_collations, (yyvsp[0].charset))))
MYSQL_YYABORT;
}
#line 34067 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 675: /* default_collation: opt_default COLLATE_SYM opt_equal collation_name_or_default */
#line 5760 "/home/buildbot/git/sql/sql_yacc.yy"
{
Table_specification_st *cinfo= &Lex->create_info;
if (unlikely(cinfo->add_table_option_default_collation(
thd, thd->variables.character_set_collations, (yyvsp[0].Lex_extended_collation))))
MYSQL_YYABORT;
}
#line 34078 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 676: /* storage_engines: ident_or_text */
#line 5770 "/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 34089 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 677: /* known_storage_engines: ident_or_text */
#line 5780 "/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 34101 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 678: /* row_types: DEFAULT */
#line 5790 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.row_type)= ROW_TYPE_DEFAULT; }
#line 34107 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 679: /* row_types: FIXED_SYM */
#line 5791 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.row_type)= ROW_TYPE_FIXED; }
#line 34113 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 680: /* row_types: DYNAMIC_SYM */
#line 5792 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.row_type)= ROW_TYPE_DYNAMIC; }
#line 34119 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 681: /* row_types: COMPRESSED_SYM */
#line 5793 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.row_type)= ROW_TYPE_COMPRESSED; }
#line 34125 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 682: /* row_types: REDUNDANT_SYM */
#line 5794 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.row_type)= ROW_TYPE_REDUNDANT; }
#line 34131 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 683: /* row_types: COMPACT_SYM */
#line 5795 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.row_type)= ROW_TYPE_COMPACT; }
#line 34137 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 684: /* row_types: PAGE_SYM */
#line 5796 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.row_type)= ROW_TYPE_PAGE; }
#line 34143 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 685: /* merge_insert_types: NO_SYM */
#line 5800 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= MERGE_INSERT_DISABLED; }
#line 34149 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 686: /* merge_insert_types: FIRST_SYM */
#line 5801 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= MERGE_INSERT_TO_FIRST; }
#line 34155 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 687: /* merge_insert_types: LAST_SYM */
#line 5802 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= MERGE_INSERT_TO_LAST; }
#line 34161 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 688: /* udf_type: STRING_SYM */
#line 5806 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.num) = (int) STRING_RESULT; }
#line 34167 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 689: /* udf_type: REAL */
#line 5807 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.num) = (int) REAL_RESULT; }
#line 34173 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 690: /* udf_type: DECIMAL_SYM */
#line 5808 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.num) = (int) DECIMAL_RESULT; }
#line 34179 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 691: /* udf_type: INT_SYM */
#line 5809 "/home/buildbot/git/sql/sql_yacc.yy"
{(yyval.num) = (int) INT_RESULT; }
#line 34185 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 692: /* create_field_list: field_list */
#line 5815 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_last_non_select_table= Lex->last_table();
}
#line 34193 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 693: /* create_field_list_parens: LEFT_PAREN_ALT field_list ')' */
#line 5822 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_last_non_select_table= Lex->last_table();
}
#line 34201 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 696: /* field_list_item: column_def */
#line 5833 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 34207 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 700: /* field_list_item: PERIOD_SYM period_for_application_time */
#line 5837 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 34213 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 701: /* column_def: field_spec */
#line 5842 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.create_field)= (yyvsp[0].create_field); }
#line 34219 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 702: /* column_def: field_spec opt_constraint references */
#line 5844 "/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 34230 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 703: /* $@81: %empty */
#line 5854 "/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 34240 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 704: /* key_def: key_or_index opt_if_not_exists opt_ident opt_USING_key_algorithm $@81 '(' key_list ')' normal_key_options */
#line 5859 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 34246 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 705: /* $@82: %empty */
#line 5861 "/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 34256 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 706: /* key_def: key_or_index opt_if_not_exists ident TYPE_SYM btree_or_rtree $@82 '(' key_list ')' normal_key_options */
#line 5866 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 34262 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 707: /* $@83: %empty */
#line 5868 "/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 34272 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 708: /* key_def: fulltext opt_key_or_index opt_if_not_exists opt_ident $@83 '(' key_list ')' fulltext_key_options */
#line 5873 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 34278 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 709: /* $@84: %empty */
#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 34288 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 710: /* key_def: spatial opt_key_or_index opt_if_not_exists opt_ident $@84 '(' key_list ')' spatial_key_options */
#line 5880 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 34294 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 711: /* $@85: %empty */
#line 5884 "/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 34304 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 712: /* key_def: opt_constraint constraint_key_type opt_if_not_exists opt_ident opt_USING_key_algorithm $@85 '(' key_list opt_without_overlaps ')' normal_key_options */
#line 5889 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 34310 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 713: /* $@86: %empty */
#line 5892 "/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 34320 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 714: /* key_def: opt_constraint constraint_key_type opt_if_not_exists ident TYPE_SYM btree_or_rtree $@86 '(' key_list opt_without_overlaps ')' normal_key_options */
#line 5897 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 34326 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 715: /* $@87: %empty */
#line 5899 "/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 34340 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 716: /* key_def: opt_constraint FOREIGN KEY_SYM opt_if_not_exists opt_ident $@87 '(' key_list ')' references */
#line 5909 "/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 34350 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 717: /* constraint_def: opt_constraint check_constraint */
#line 5918 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->add_constraint((yyvsp[-1].lex_str), (yyvsp[0].virtual_column), FALSE);
}
#line 34358 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 718: /* period_for_system_time: PERIOD_SYM FOR_SYSTEM_TIME_SYM '(' ident ',' ident ')' */
#line 5926 "/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 34367 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 719: /* period_for_application_time: FOR_SYM ident '(' ident ',' ident ')' */
#line 5934 "/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 34376 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 720: /* opt_check_constraint: %empty */
#line 5941 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.virtual_column)= (Virtual_column_info*) 0; }
#line 34382 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 721: /* opt_check_constraint: check_constraint */
#line 5942 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.virtual_column)= (yyvsp[0].virtual_column);}
#line 34388 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 722: /* check_constraint: CHECK_SYM '(' expr ')' */
#line 5947 "/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 34399 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 723: /* opt_constraint_no_id: %empty */
#line 5956 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34405 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 724: /* opt_constraint_no_id: CONSTRAINT */
#line 5957 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34411 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 725: /* opt_constraint: %empty */
#line 5961 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= null_clex_str; }
#line 34417 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 726: /* opt_constraint: constraint */
#line 5962 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= (yyvsp[0].lex_str); }
#line 34423 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 727: /* constraint: CONSTRAINT opt_ident */
#line 5966 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].lex_str); }
#line 34429 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 728: /* @88: %empty */
#line 5971 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
Create_field *f= new (thd->mem_root) Create_field();
if (unlikely(check_string_char_length(&(yyvsp[0].lex_str), 0, NAME_CHAR_LEN,
system_charset_info, 1)))
my_yyabort_error((ER_TOO_LONG_IDENT, MYF(0), (yyvsp[0].lex_str).str));
if (unlikely(!f))
MYSQL_YYABORT;
lex->init_last_field(f, &(yyvsp[0].lex_str));
(yyval.create_field)= f;
lex->parsing_options.lookup_keywords_after_qualifier= true;
}
#line 34449 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 729: /* field_spec: field_ident @88 field_type_or_serial opt_check_constraint */
#line 5987 "/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 34472 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 730: /* $@89: %empty */
#line 6009 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->set_attributes(thd, (yyvsp[0].Lex_field_type),
COLUMN_DEFINITION_TABLE_FIELD);
}
#line 34481 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 731: /* field_type_or_serial: qualified_field_type $@89 field_def */
#line 6014 "/home/buildbot/git/sql/sql_yacc.yy"
{
auto tmp= (yyvsp[-2].Lex_field_type).charset_collation_attrs();
if (tmp.merge_column_charset_clause_and_collate_clause(
thd, thd->variables.character_set_collations, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)))
MYSQL_YYABORT;
Lex->last_field->set_charset_collation_attrs(
thd, thd->variables.character_set_collations,
tmp);
}
#line 34495 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 732: /* $@90: %empty */
#line 6024 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->set_handler(&type_handler_ulonglong);
Lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG
| UNSIGNED_FLAG | UNIQUE_KEY_FLAG;
Lex->alter_info.flags|= ALTER_ADD_INDEX;
}
#line 34506 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 734: /* opt_serial_attribute: %empty */
#line 6034 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34512 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 735: /* opt_serial_attribute: opt_serial_attribute_list */
#line 6035 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34518 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 736: /* opt_serial_attribute_list: opt_serial_attribute_list serial_attribute */
#line 6039 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34524 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 738: /* opt_asrow_attribute: %empty */
#line 6044 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34530 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 739: /* opt_asrow_attribute: opt_asrow_attribute_list */
#line 6045 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34536 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 740: /* opt_asrow_attribute_list: opt_asrow_attribute_list asrow_attribute */
#line 6049 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34542 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 742: /* field_def: %empty */
#line 6054 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_exact_charset_extended_collation_attrs).init(); }
#line 34548 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 744: /* field_def: attribute_list compressed_deprecated_column_attribute */
#line 6056 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_exact_charset_extended_collation_attrs)= (yyvsp[-1].Lex_exact_charset_extended_collation_attrs); }
#line 34554 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 745: /* field_def: attribute_list compressed_deprecated_column_attribute attribute_list */
#line 6058 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (((yyval.Lex_exact_charset_extended_collation_attrs)= (yyvsp[-2].Lex_exact_charset_extended_collation_attrs)).merge_column_collate_clause_and_collate_clause(
thd, thd->variables.character_set_collations, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)))
MYSQL_YYABORT;
}
#line 34564 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 746: /* $@91: %empty */
#line 6064 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->vcol_info= (yyvsp[0].virtual_column);
}
#line 34572 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 747: /* field_def: opt_generated_always AS virtual_column_func $@91 vcol_opt_specifier vcol_opt_attribute */
#line 6068 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_exact_charset_extended_collation_attrs).init();
}
#line 34580 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 748: /* field_def: opt_generated_always AS ROW_SYM START_SYM opt_asrow_attribute */
#line 6072 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->last_field_generated_always_as_row_start())
MYSQL_YYABORT;
(yyval.Lex_exact_charset_extended_collation_attrs).init();
}
#line 34590 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 749: /* field_def: opt_generated_always AS ROW_SYM END opt_asrow_attribute */
#line 6078 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->last_field_generated_always_as_row_end())
MYSQL_YYABORT;
(yyval.Lex_exact_charset_extended_collation_attrs).init();
}
#line 34600 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 750: /* opt_generated_always: %empty */
#line 6086 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34606 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 751: /* opt_generated_always: GENERATED_SYM ALWAYS_SYM */
#line 6087 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34612 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 752: /* vcol_opt_specifier: %empty */
#line 6092 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->vcol_info->set_vcol_type(VCOL_GENERATED_VIRTUAL);
}
#line 34620 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 753: /* vcol_opt_specifier: VIRTUAL_SYM */
#line 6096 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->vcol_info->set_vcol_type(VCOL_GENERATED_VIRTUAL);
}
#line 34628 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 754: /* vcol_opt_specifier: PERSISTENT_SYM */
#line 6100 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->vcol_info->set_vcol_type(VCOL_GENERATED_STORED);
}
#line 34636 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 755: /* vcol_opt_specifier: STORED_SYM */
#line 6104 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->vcol_info->set_vcol_type(VCOL_GENERATED_STORED);
}
#line 34644 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 756: /* vcol_opt_attribute: %empty */
#line 6110 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34650 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 757: /* vcol_opt_attribute: vcol_opt_attribute_list */
#line 6111 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34656 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 758: /* vcol_opt_attribute_list: vcol_opt_attribute_list vcol_attribute */
#line 6115 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 34662 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 760: /* vcol_attribute: UNIQUE_SYM */
#line 6121 "/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 34672 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 761: /* vcol_attribute: UNIQUE_SYM KEY_SYM */
#line 6127 "/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 34682 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 762: /* vcol_attribute: COMMENT_SYM TEXT_STRING_sys */
#line 6132 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_field->comment= (yyvsp[0].lex_str); }
#line 34688 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 763: /* vcol_attribute: INVISIBLE_SYM */
#line 6134 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->invisible= INVISIBLE_USER;
}
#line 34696 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 764: /* $@92: %empty */
#line 6141 "/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 34711 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 765: /* parse_vcol_expr: PARSE_VCOL_EXPR_SYM $@92 expr */
#line 6152 "/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 34723 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 767: /* parenthesized_expr: expr ',' expr_list */
#line 6164 "/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 34734 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 768: /* virtual_column_func: '(' parenthesized_expr ')' */
#line 6174 "/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 34746 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 769: /* virtual_column_func: subquery */
#line 6182 "/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 34760 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 773: /* column_default_expr: expr_or_literal */
#line 6198 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.virtual_column)= add_virtual_expression(thd, (yyvsp[0].item)))))
MYSQL_YYABORT;
}
#line 34769 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 774: /* field_type: field_type_all */
#line 6205 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->map_data_type(Lex_ident_sys(), &((yyval.Lex_field_type)= (yyvsp[0].Lex_field_type)));
}
#line 34777 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 775: /* qualified_field_type: field_type_all */
#line 6212 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->map_data_type(Lex_ident_sys(), &((yyval.Lex_field_type)= (yyvsp[0].Lex_field_type)));
}
#line 34785 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 776: /* qualified_field_type: sp_decl_ident '.' field_type_all */
#line 6216 "/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 34794 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 777: /* udt_name: IDENT_sys */
#line 6223 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= (yyvsp[0].ident_sys); }
#line 34800 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 778: /* udt_name: reserved_keyword_udt */
#line 6224 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= (yyvsp[0].kwd); }
#line 34806 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 779: /* udt_name: non_reserved_keyword_udt */
#line 6225 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= (yyvsp[0].kwd); }
#line 34812 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 785: /* field_type_all: udt_name float_options srid_option */
#line 6235 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->set_field_type_udt(&(yyval.Lex_field_type), (yyvsp[-2].lex_str), (yyvsp[-1].Lex_length_and_dec)))
MYSQL_YYABORT;
}
#line 34821 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 786: /* field_type_numeric: int_type opt_field_length last_field_options */
#line 6243 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set_handler_length_flags((yyvsp[-2].type_handler), (yyvsp[-1].Lex_length_and_dec), (uint32) (yyvsp[0].ulong_num));
}
#line 34829 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 787: /* field_type_numeric: real_type opt_precision last_field_options */
#line 6246 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set((yyvsp[-2].type_handler), (yyvsp[-1].Lex_length_and_dec)); }
#line 34835 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 788: /* field_type_numeric: FLOAT_SYM float_options last_field_options */
#line 6248 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_float, (yyvsp[-1].Lex_length_and_dec));
if ((yyvsp[-1].Lex_length_and_dec).has_explicit_length() && !(yyvsp[-1].Lex_length_and_dec).has_explicit_dec())
{
if (unlikely((yyvsp[-1].Lex_length_and_dec).length() > PRECISION_FOR_DOUBLE))
my_yyabort_error((ER_WRONG_FIELD_SPEC, MYF(0),
Lex->last_field->field_name.str));
if ((yyvsp[-1].Lex_length_and_dec).length() > PRECISION_FOR_FLOAT)
(yyval.Lex_field_type).set(&type_handler_double);
else
(yyval.Lex_field_type).set(&type_handler_float);
}
}
#line 34853 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 789: /* field_type_numeric: BIT_SYM opt_field_length */
#line 6262 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_bit, (yyvsp[0].Lex_length_and_dec));
}
#line 34861 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 790: /* field_type_numeric: BOOL_SYM */
#line 6266 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set_handler_length(&type_handler_stiny, 1);
}
#line 34869 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 791: /* field_type_numeric: BOOLEAN_SYM */
#line 6270 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set_handler_length(&type_handler_stiny, 1);
}
#line 34877 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 792: /* field_type_numeric: DECIMAL_SYM float_options last_field_options */
#line 6274 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_newdecimal, (yyvsp[-1].Lex_length_and_dec));}
#line 34883 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 793: /* field_type_numeric: NUMBER_ORACLE_SYM float_options last_field_options */
#line 6276 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyvsp[-1].Lex_length_and_dec).has_explicit_length())
(yyval.Lex_field_type).set(&type_handler_newdecimal, (yyvsp[-1].Lex_length_and_dec));
else
(yyval.Lex_field_type).set(&type_handler_double);
}
#line 34894 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 794: /* field_type_numeric: NUMERIC_SYM float_options last_field_options */
#line 6283 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_newdecimal, (yyvsp[-1].Lex_length_and_dec));}
#line 34900 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 795: /* field_type_numeric: FIXED_SYM float_options last_field_options */
#line 6285 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_newdecimal, (yyvsp[-1].Lex_length_and_dec));}
#line 34906 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 796: /* opt_binary_and_compression: %empty */
#line 6290 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_exact_charset_extended_collation_attrs).init(); }
#line 34912 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 797: /* opt_binary_and_compression: binary */
#line 6291 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_exact_charset_extended_collation_attrs)= (yyvsp[0].Lex_exact_charset_extended_collation_attrs); }
#line 34918 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 798: /* opt_binary_and_compression: binary compressed_deprecated_data_type_attribute */
#line 6292 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_exact_charset_extended_collation_attrs)= (yyvsp[-1].Lex_exact_charset_extended_collation_attrs); }
#line 34924 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 799: /* opt_binary_and_compression: compressed opt_binary */
#line 6293 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_exact_charset_extended_collation_attrs)= (yyvsp[0].Lex_exact_charset_extended_collation_attrs); }
#line 34930 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 800: /* field_type_string: char opt_field_length opt_binary */
#line 6298 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_string, (yyvsp[-1].Lex_length_and_dec), (yyvsp[0].Lex_exact_charset_extended_collation_attrs));
}
#line 34938 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 801: /* field_type_string: nchar opt_field_length opt_bin_mod */
#line 6302 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_string, (yyvsp[-1].Lex_length_and_dec),
Lex_exact_charset_extended_collation_attrs::national((yyvsp[0].num)));
}
#line 34947 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 802: /* field_type_string: BINARY opt_field_length */
#line 6307 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_string, (yyvsp[0].Lex_length_and_dec), &my_charset_bin);
}
#line 34955 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 803: /* field_type_string: varchar opt_field_length opt_binary_and_compression */
#line 6311 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].Lex_length_and_dec), (yyvsp[0].Lex_exact_charset_extended_collation_attrs));
}
#line 34963 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 804: /* field_type_string: VARCHAR2_ORACLE_SYM opt_field_length opt_binary_and_compression */
#line 6315 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].Lex_length_and_dec), (yyvsp[0].Lex_exact_charset_extended_collation_attrs));
}
#line 34971 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 805: /* field_type_string: nvarchar opt_field_length opt_compressed opt_bin_mod */
#line 6319 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-2].Lex_length_and_dec),
Lex_exact_charset_extended_collation_attrs::national((yyvsp[0].num)));
}
#line 34980 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 806: /* field_type_string: VARBINARY opt_field_length opt_compressed */
#line 6324 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].Lex_length_and_dec), &my_charset_bin);
}
#line 34988 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 807: /* field_type_string: RAW_ORACLE_SYM opt_field_length opt_compressed */
#line 6328 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].Lex_length_and_dec), &my_charset_bin);
}
#line 34996 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 808: /* field_type_temporal: YEAR_SYM opt_field_length last_field_options */
#line 6335 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyvsp[-1].Lex_length_and_dec).has_explicit_length())
{
if ((yyvsp[-1].Lex_length_and_dec).length() != 4)
{
char buff[sizeof("YEAR()") + MY_INT64_NUM_DECIMAL_DIGITS + 1];
my_snprintf(buff, sizeof(buff), "YEAR(%u)", (uint) (yyvsp[-1].Lex_length_and_dec).length());
warn_deprecated<1007>(thd, buff, "YEAR(4)");
}
}
(yyval.Lex_field_type).set(&type_handler_year, (yyvsp[-1].Lex_length_and_dec));
}
#line 35013 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 809: /* field_type_temporal: DATE_SYM */
#line 6347 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_newdate); }
#line 35019 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 810: /* field_type_temporal: TIME_SYM opt_field_length */
#line 6349 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(opt_mysql56_temporal_format ?
static_cast(&type_handler_time2) :
static_cast(&type_handler_time),
(yyvsp[0].Lex_length_and_dec));
}
#line 35030 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 811: /* field_type_temporal: TIMESTAMP opt_field_length */
#line 6356 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(opt_mysql56_temporal_format ?
static_cast(&type_handler_timestamp2):
static_cast(&type_handler_timestamp),
(yyvsp[0].Lex_length_and_dec));
}
#line 35041 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 812: /* field_type_temporal: DATETIME opt_field_length */
#line 6363 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(thd->type_handler_for_datetime(), (yyvsp[0].Lex_length_and_dec));
}
#line 35049 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 813: /* field_type_lob: TINYBLOB opt_compressed */
#line 6371 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_tiny_blob, &my_charset_bin);
}
#line 35057 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 814: /* field_type_lob: BLOB_MARIADB_SYM opt_field_length opt_compressed */
#line 6375 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_blob, (yyvsp[-1].Lex_length_and_dec), &my_charset_bin);
}
#line 35065 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 815: /* field_type_lob: BLOB_ORACLE_SYM field_length opt_compressed */
#line 6379 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_blob, (yyvsp[-1].Lex_length_and_dec), &my_charset_bin);
}
#line 35073 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 816: /* field_type_lob: BLOB_ORACLE_SYM opt_compressed */
#line 6383 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_long_blob, &my_charset_bin);
}
#line 35081 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 817: /* field_type_lob: MEDIUMBLOB opt_compressed */
#line 6387 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_medium_blob, &my_charset_bin);
}
#line 35089 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 818: /* field_type_lob: LONGBLOB opt_compressed */
#line 6391 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_long_blob, &my_charset_bin);
}
#line 35097 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 819: /* field_type_lob: LONG_SYM VARBINARY opt_compressed */
#line 6395 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_medium_blob, &my_charset_bin);
}
#line 35105 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 820: /* field_type_lob: LONG_SYM varchar opt_binary_and_compression */
#line 6399 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_medium_blob, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
#line 35111 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 821: /* field_type_lob: TINYTEXT opt_binary_and_compression */
#line 6401 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_tiny_blob, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
#line 35117 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 822: /* field_type_lob: TEXT_SYM opt_field_length opt_binary_and_compression */
#line 6403 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_blob, (yyvsp[-1].Lex_length_and_dec), (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
#line 35123 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 823: /* field_type_lob: MEDIUMTEXT opt_binary_and_compression */
#line 6405 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_medium_blob, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
#line 35129 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 824: /* field_type_lob: LONGTEXT opt_binary_and_compression */
#line 6407 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_long_blob, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
#line 35135 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 825: /* field_type_lob: CLOB_ORACLE_SYM opt_binary_and_compression */
#line 6409 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_long_blob, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
#line 35141 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 826: /* field_type_lob: LONG_SYM opt_binary_and_compression */
#line 6411 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_medium_blob, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
#line 35147 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 827: /* field_type_lob: JSON_SYM opt_compressed */
#line 6413 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_field_type).set(&type_handler_long_blob_json, &my_charset_utf8mb4_bin);
}
#line 35155 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 828: /* field_type_misc: ENUM '(' string_list ')' opt_binary */
#line 6420 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_enum, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
#line 35161 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 829: /* field_type_misc: SET '(' string_list ')' opt_binary */
#line 6422 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_field_type).set(&type_handler_set, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
#line 35167 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 830: /* char: CHAR_SYM */
#line 6426 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35173 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 831: /* nchar: NCHAR_SYM */
#line 6430 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35179 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 832: /* nchar: NATIONAL_SYM CHAR_SYM */
#line 6431 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35185 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 833: /* varchar: char VARYING */
#line 6435 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35191 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 834: /* varchar: VARCHAR */
#line 6436 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35197 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 835: /* nvarchar: NATIONAL_SYM VARCHAR */
#line 6440 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35203 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 836: /* nvarchar: NVARCHAR_SYM */
#line 6441 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35209 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 837: /* nvarchar: NCHAR_SYM VARCHAR */
#line 6442 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35215 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 838: /* nvarchar: NATIONAL_SYM CHAR_SYM VARYING */
#line 6443 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35221 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 839: /* nvarchar: NCHAR_SYM VARYING */
#line 6444 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35227 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 840: /* int_type: INT_SYM */
#line 6448 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.type_handler)= &type_handler_slong; }
#line 35233 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 841: /* int_type: TINYINT */
#line 6449 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.type_handler)= &type_handler_stiny; }
#line 35239 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 842: /* int_type: SMALLINT */
#line 6450 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.type_handler)= &type_handler_sshort; }
#line 35245 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 843: /* int_type: MEDIUMINT */
#line 6451 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.type_handler)= &type_handler_sint24; }
#line 35251 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 844: /* int_type: BIGINT */
#line 6452 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.type_handler)= &type_handler_slonglong; }
#line 35257 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 845: /* real_type: REAL */
#line 6457 "/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 35267 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 846: /* real_type: DOUBLE_SYM */
#line 6462 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.type_handler)= &type_handler_double; }
#line 35273 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 847: /* real_type: DOUBLE_SYM PRECISION */
#line 6463 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.type_handler)= &type_handler_double; }
#line 35279 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 848: /* srid_option: %empty */
#line 6468 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_field->srid= 0; }
#line 35285 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 849: /* srid_option: REF_SYSTEM_ID_SYM '=' NUM */
#line 6471 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->srid=atoi((yyvsp[0].lex_str).str);
}
#line 35293 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 850: /* float_options: %empty */
#line 6477 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_length_and_dec).reset(); }
#line 35299 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 853: /* precision: '(' NUM ',' NUM ')' */
#line 6483 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_length_and_dec).set((yyvsp[-3].lex_str).str, (yyvsp[-1].lex_str).str); }
#line 35305 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 854: /* field_options: %empty */
#line 6487 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 0; }
#line 35311 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 855: /* field_options: SIGNED_SYM */
#line 6488 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 0; }
#line 35317 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 856: /* field_options: UNSIGNED */
#line 6489 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= UNSIGNED_FLAG; }
#line 35323 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 857: /* field_options: ZEROFILL */
#line 6490 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= UNSIGNED_FLAG | ZEROFILL_FLAG; }
#line 35329 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 858: /* field_options: UNSIGNED ZEROFILL */
#line 6491 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= UNSIGNED_FLAG | ZEROFILL_FLAG; }
#line 35335 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 859: /* field_options: ZEROFILL UNSIGNED */
#line 6492 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= UNSIGNED_FLAG | ZEROFILL_FLAG; }
#line 35341 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 860: /* last_field_options: field_options */
#line 6496 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_field->flags|= ((yyval.ulong_num)= (yyvsp[0].ulong_num)); }
#line 35347 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 861: /* field_length_str: '(' LONG_NUM ')' */
#line 6500 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.const_simple_string)= (yyvsp[-1].lex_str).str; }
#line 35353 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 862: /* field_length_str: '(' ULONGLONG_NUM ')' */
#line 6501 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.const_simple_string)= (yyvsp[-1].lex_str).str; }
#line 35359 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 863: /* field_length_str: '(' DECIMAL_NUM ')' */
#line 6502 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.const_simple_string)= (yyvsp[-1].lex_str).str; }
#line 35365 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 864: /* field_length_str: '(' NUM ')' */
#line 6503 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.const_simple_string)= (yyvsp[-1].lex_str).str; }
#line 35371 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 865: /* field_length: field_length_str */
#line 6506 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_length_and_dec).set((yyvsp[0].const_simple_string), NULL); }
#line 35377 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 866: /* field_scale: field_length_str */
#line 6510 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_length_and_dec).set(NULL, (yyvsp[0].const_simple_string)); }
#line 35383 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 867: /* opt_field_length: %empty */
#line 6515 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_length_and_dec).reset(); /* use default length */ }
#line 35389 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 869: /* opt_field_scale: %empty */
#line 6520 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_length_and_dec).reset(); }
#line 35395 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 871: /* opt_precision: %empty */
#line 6525 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_length_and_dec).reset(); }
#line 35401 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 872: /* opt_precision: precision */
#line 6526 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_length_and_dec)= (yyvsp[0].Lex_length_and_dec); }
#line 35407 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 873: /* attribute_list: attribute_list attribute */
#line 6532 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (((yyval.Lex_exact_charset_extended_collation_attrs)= (yyvsp[-1].Lex_exact_charset_extended_collation_attrs)).merge_column_collate_clause_and_collate_clause(
thd, thd->variables.character_set_collations, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)))
MYSQL_YYABORT;
}
#line 35417 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 875: /* attribute: NULL_SYM */
#line 6542 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->flags&= ~NOT_NULL_FLAG;
Lex->last_field->explicitly_nullable= true;
(yyval.Lex_exact_charset_extended_collation_attrs).init();
}
#line 35427 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 876: /* attribute: DEFAULT column_default_expr */
#line 6548 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->default_value= (yyvsp[0].virtual_column);
(yyval.Lex_exact_charset_extended_collation_attrs).init();
}
#line 35436 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 877: /* attribute: ON UPDATE_SYM NOW_SYM opt_default_time_precision */
#line 6553 "/home/buildbot/git/sql/sql_yacc.yy"
{
Item *item= new (thd->mem_root) Item_func_now_local(thd, (yyvsp[0].num));
if (unlikely(item == NULL))
MYSQL_YYABORT;
Lex->last_field->on_update= item;
(yyval.Lex_exact_charset_extended_collation_attrs).init();
}
#line 35448 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 878: /* attribute: AUTO_INC */
#line 6560 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG; (yyval.Lex_exact_charset_extended_collation_attrs).init(); }
#line 35454 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 879: /* attribute: SERIAL_SYM DEFAULT VALUE_SYM */
#line 6562 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNIQUE_KEY_FLAG;
lex->alter_info.flags|= ALTER_ADD_INDEX;
(yyval.Lex_exact_charset_extended_collation_attrs).init();
}
#line 35465 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 880: /* attribute: COLLATE_SYM collation_name */
#line 6569 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_exact_charset_extended_collation_attrs)= Lex_exact_charset_extended_collation_attrs((yyvsp[0].Lex_extended_collation));
}
#line 35473 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 881: /* attribute: serial_attribute */
#line 6572 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_exact_charset_extended_collation_attrs).init(); }
#line 35479 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 882: /* opt_compression_method: %empty */
#line 6576 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.const_simple_string)= NULL; }
#line 35485 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 883: /* opt_compression_method: equal ident */
#line 6577 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.const_simple_string)= (yyvsp[0].ident_sys).str; }
#line 35491 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 884: /* opt_compressed: %empty */
#line 6581 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35497 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 885: /* opt_compressed: compressed */
#line 6582 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 35503 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 886: /* opt_enable: %empty */
#line 6586 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35509 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 887: /* opt_enable: ENABLE_SYM */
#line 6587 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 35515 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 888: /* compressed: COMPRESSED_SYM opt_compression_method */
#line 6592 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->last_field->set_compressed((yyvsp[0].const_simple_string))))
MYSQL_YYABORT;
}
#line 35524 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 889: /* compressed_deprecated_data_type_attribute: COMPRESSED_SYM opt_compression_method */
#line 6600 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(Lex->last_field->set_compressed_deprecated(thd, (yyvsp[0].const_simple_string))))
MYSQL_YYABORT;
}
#line 35533 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 890: /* compressed_deprecated_column_attribute: COMPRESSED_SYM opt_compression_method */
#line 6608 "/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 35543 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 891: /* asrow_attribute: not NULL_SYM opt_enable */
#line 6617 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_field->flags|= NOT_NULL_FLAG;
}
#line 35551 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 892: /* asrow_attribute: opt_primary KEY_SYM */
#line 6621 "/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 35561 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 895: /* serial_attribute: engine_defined_option */
#line 6632 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[0].engine_option_value_ptr)->link(&Lex->last_field->option_list, &Lex->option_list_last);
}
#line 35569 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 896: /* serial_attribute: with_or_without_system VERSIONING_SYM */
#line 6636 "/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 35583 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 897: /* with_or_without_system: WITH_SYSTEM_SYM */
#line 6649 "/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 35593 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 898: /* with_or_without_system: WITHOUT SYSTEM */
#line 6655 "/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 35603 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 899: /* charset: CHAR_SYM SET */
#line 6664 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.kwd)= (yyvsp[-1].kwd); }
#line 35609 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 900: /* charset: CHARSET */
#line 6665 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.kwd)= (yyvsp[0].kwd); }
#line 35615 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 901: /* charset_name: ident_or_text */
#line 6670 "/home/buildbot/git/sql/sql_yacc.yy"
{
myf utf8_flag= thd->get_utf8_flag();
if (unlikely(!((yyval.charset)=get_charset_by_csname((yyvsp[0].lex_str).str, MY_CS_PRIMARY,
MYF(utf8_flag)))))
my_yyabort_error((ER_UNKNOWN_CHARACTER_SET, MYF(0), (yyvsp[0].lex_str).str));
}
#line 35626 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 902: /* charset_name: BINARY */
#line 6676 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)= &my_charset_bin; }
#line 35632 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 903: /* charset_name_or_default: charset_name */
#line 6680 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)=(yyvsp[0].charset); }
#line 35638 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 904: /* charset_name_or_default: DEFAULT */
#line 6681 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)=NULL; }
#line 35644 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 905: /* opt_load_data_charset: %empty */
#line 6685 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)= NULL; }
#line 35650 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 906: /* opt_load_data_charset: charset charset_name_or_default */
#line 6686 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)= (yyvsp[0].charset); }
#line 35656 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 907: /* old_or_new_charset_name: ident_or_text */
#line 6691 "/home/buildbot/git/sql/sql_yacc.yy"
{
myf utf8_flag= thd->get_utf8_flag();
if (unlikely(!((yyval.charset)=get_charset_by_csname((yyvsp[0].lex_str).str,
MY_CS_PRIMARY,
MYF(utf8_flag))) &&
!((yyval.charset)=get_old_charset_by_name((yyvsp[0].lex_str).str))))
my_yyabort_error((ER_UNKNOWN_CHARACTER_SET, MYF(0), (yyvsp[0].lex_str).str));
}
#line 35669 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 908: /* old_or_new_charset_name: BINARY */
#line 6699 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)= &my_charset_bin; }
#line 35675 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 909: /* old_or_new_charset_name_or_default: old_or_new_charset_name */
#line 6703 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)=(yyvsp[0].charset); }
#line 35681 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 910: /* old_or_new_charset_name_or_default: DEFAULT */
#line 6704 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)=NULL; }
#line 35687 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 911: /* collation_name: ident_or_text */
#line 6709 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyval.Lex_extended_collation).set_by_name((yyvsp[0].lex_str).str, thd->get_utf8_flag()))
MYSQL_YYABORT;
}
#line 35696 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 912: /* collation_name_or_default: collation_name */
#line 6716 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_extended_collation)=(yyvsp[0].Lex_extended_collation); }
#line 35702 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 913: /* collation_name_or_default: DEFAULT */
#line 6717 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_extended_collation).set_collate_default(); }
#line 35708 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 914: /* opt_default: %empty */
#line 6721 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35714 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 915: /* opt_default: DEFAULT */
#line 6722 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 35720 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 916: /* charset_or_alias: charset charset_name */
#line 6726 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)= (yyvsp[0].charset); }
#line 35726 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 917: /* charset_or_alias: ASCII_SYM */
#line 6727 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.charset)= &my_charset_latin1; }
#line 35732 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 918: /* charset_or_alias: UNICODE_SYM */
#line 6729 "/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 35741 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 919: /* opt_binary: %empty */
#line 6736 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_exact_charset_extended_collation_attrs).init(); }
#line 35747 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 921: /* binary: BYTE_SYM */
#line 6742 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_exact_charset_extended_collation_attrs).set_charset(Lex_exact_charset(&my_charset_bin));
}
#line 35755 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 922: /* binary: charset_or_alias */
#line 6746 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_exact_charset_extended_collation_attrs).set_charset(Lex_exact_charset((yyvsp[0].charset)));
}
#line 35763 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 923: /* binary: charset_or_alias BINARY */
#line 6750 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyval.Lex_exact_charset_extended_collation_attrs).set_charset_collate_binary(Lex_exact_charset((yyvsp[-1].charset))))
MYSQL_YYABORT;
}
#line 35772 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 924: /* binary: BINARY */
#line 6754 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_exact_charset_extended_collation_attrs).set_contextually_typed_binary_style(); }
#line 35778 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 925: /* binary: BINARY charset_or_alias */
#line 6756 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyval.Lex_exact_charset_extended_collation_attrs).set_charset_collate_binary(Lex_exact_charset((yyvsp[0].charset))))
MYSQL_YYABORT;
}
#line 35787 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 926: /* binary: charset_or_alias COLLATE_SYM DEFAULT */
#line 6761 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_exact_charset_extended_collation_attrs).set_charset_collate_default(
thd,
thd->variables.character_set_collations,
Lex_exact_charset((yyvsp[-2].charset)));
}
#line 35798 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 927: /* binary: charset_or_alias COLLATE_SYM collation_name */
#line 6768 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyvsp[0].Lex_extended_collation).merge_exact_charset(
thd,
thd->variables.character_set_collations,
Lex_exact_charset((yyvsp[-2].charset))))
MYSQL_YYABORT;
(yyval.Lex_exact_charset_extended_collation_attrs)= Lex_exact_charset_extended_collation_attrs((yyvsp[0].Lex_extended_collation));
}
#line 35811 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 928: /* binary: COLLATE_SYM collation_name */
#line 6777 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_exact_charset_extended_collation_attrs)= Lex_exact_charset_extended_collation_attrs((yyvsp[0].Lex_extended_collation));
}
#line 35819 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 929: /* binary: COLLATE_SYM DEFAULT */
#line 6781 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_exact_charset_extended_collation_attrs).set_collate_default();
}
#line 35827 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 930: /* opt_bin_mod: %empty */
#line 6787 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= false; }
#line 35833 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 931: /* opt_bin_mod: BINARY */
#line 6788 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= true; }
#line 35839 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 932: /* $@93: %empty */
#line 6793 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely((yyvsp[0].ulong_num) == 0))
{
thd->parse_error();
MYSQL_YYABORT;
}
}
#line 35851 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 933: /* ws_nweights: '(' real_ulong_num $@93 ')' */
#line 6801 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= (yyvsp[-2].ulong_num); }
#line 35857 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 934: /* ws_level_flag_desc: ASC */
#line 6805 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 0; }
#line 35863 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 935: /* ws_level_flag_desc: DESC */
#line 6806 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 1 << MY_STRXFRM_DESC_SHIFT; }
#line 35869 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 936: /* ws_level_flag_reverse: REVERSE_SYM */
#line 6810 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 1 << MY_STRXFRM_REVERSE_SHIFT; }
#line 35875 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 937: /* ws_level_flags: %empty */
#line 6813 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 0; }
#line 35881 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 938: /* ws_level_flags: ws_level_flag_desc */
#line 6814 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= (yyvsp[0].ulong_num); }
#line 35887 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 939: /* ws_level_flags: ws_level_flag_desc ws_level_flag_reverse */
#line 6815 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= (yyvsp[-1].ulong_num) | (yyvsp[0].ulong_num); }
#line 35893 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 940: /* ws_level_flags: ws_level_flag_reverse */
#line 6816 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= (yyvsp[0].ulong_num) ; }
#line 35899 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 941: /* ws_level_number: real_ulong_num */
#line 6821 "/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 35908 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 942: /* ws_level_list_item: ws_level_number ws_level_flags */
#line 6829 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.ulong_num)= (1 | (yyvsp[0].ulong_num)) << (yyvsp[-1].ulong_num);
}
#line 35916 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 943: /* ws_level_list: ws_level_list_item */
#line 6835 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= (yyvsp[0].ulong_num); }
#line 35922 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 944: /* ws_level_list: ws_level_list ',' ws_level_list_item */
#line 6836 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)|= (yyvsp[0].ulong_num); }
#line 35928 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 945: /* ws_level_range: ws_level_number '-' ws_level_number */
#line 6841 "/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 35939 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 946: /* ws_level_list_or_range: ws_level_list */
#line 6850 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= (yyvsp[0].ulong_num); }
#line 35945 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 947: /* ws_level_list_or_range: ws_level_range */
#line 6851 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= (yyvsp[0].ulong_num); }
#line 35951 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 948: /* opt_ws_levels: %empty */
#line 6855 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= 0; }
#line 35957 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 949: /* opt_ws_levels: LEVEL_SYM ws_level_list_or_range */
#line 6856 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ulong_num)= (yyvsp[0].ulong_num); }
#line 35963 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 952: /* references: REFERENCES table_ident opt_ref_list opt_match_clause opt_on_update_delete */
#line 6870 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.table)=(yyvsp[-3].table);
}
#line 35971 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 953: /* opt_ref_list: %empty */
#line 6877 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ref_list.empty(); }
#line 35977 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 955: /* ref_list: ref_list ',' ident */
#line 6883 "/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 35988 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 956: /* ref_list: ident */
#line 6890 "/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 36001 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 957: /* opt_match_clause: %empty */
#line 6902 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->fk_match_option= Foreign_key::FK_MATCH_UNDEF; }
#line 36007 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 958: /* opt_match_clause: MATCH FULL */
#line 6904 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->fk_match_option= Foreign_key::FK_MATCH_FULL; }
#line 36013 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 959: /* opt_match_clause: MATCH PARTIAL */
#line 6906 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->fk_match_option= Foreign_key::FK_MATCH_PARTIAL; }
#line 36019 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 960: /* opt_match_clause: MATCH SIMPLE_SYM */
#line 6908 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->fk_match_option= Foreign_key::FK_MATCH_SIMPLE; }
#line 36025 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 961: /* opt_on_update_delete: %empty */
#line 6913 "/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 36035 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 962: /* opt_on_update_delete: ON UPDATE_SYM delete_option */
#line 6919 "/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 36045 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 963: /* opt_on_update_delete: ON DELETE_SYM delete_option */
#line 6925 "/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 36055 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 964: /* opt_on_update_delete: ON UPDATE_SYM delete_option ON DELETE_SYM delete_option */
#line 6932 "/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 36065 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 965: /* opt_on_update_delete: ON DELETE_SYM delete_option ON UPDATE_SYM delete_option */
#line 6939 "/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 36075 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 966: /* delete_option: RESTRICT */
#line 6947 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_fk_option)= FK_OPTION_RESTRICT; }
#line 36081 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 967: /* delete_option: CASCADE */
#line 6948 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_fk_option)= FK_OPTION_CASCADE; }
#line 36087 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 968: /* delete_option: SET NULL_SYM */
#line 6949 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_fk_option)= FK_OPTION_SET_NULL; }
#line 36093 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 969: /* delete_option: NO_SYM ACTION */
#line 6950 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_fk_option)= FK_OPTION_NO_ACTION; }
#line 36099 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 970: /* delete_option: SET DEFAULT */
#line 6951 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.m_fk_option)= FK_OPTION_SET_DEFAULT; }
#line 36105 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 971: /* constraint_key_type: PRIMARY_SYM KEY_SYM */
#line 6955 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_type)= Key::PRIMARY; }
#line 36111 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 972: /* constraint_key_type: UNIQUE_SYM opt_key_or_index */
#line 6956 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_type)= Key::UNIQUE; }
#line 36117 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 973: /* key_or_index: KEY_SYM */
#line 6960 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36123 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 974: /* key_or_index: INDEX_SYM */
#line 6961 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36129 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 975: /* opt_key_or_index: %empty */
#line 6965 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36135 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 977: /* keys_or_index: KEYS */
#line 6970 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36141 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 978: /* keys_or_index: INDEX_SYM */
#line 6971 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36147 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 979: /* keys_or_index: INDEXES */
#line 6972 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36153 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 980: /* fulltext: FULLTEXT_SYM */
#line 6976 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_type)= Key::FULLTEXT;}
#line 36159 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 981: /* spatial: SPATIAL_SYM */
#line 6981 "/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 36172 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 982: /* normal_key_options: %empty */
#line 6992 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36178 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 983: /* normal_key_options: normal_key_opts */
#line 6993 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_key->option_list= Lex->option_list; }
#line 36184 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 984: /* fulltext_key_options: %empty */
#line 6997 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36190 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 985: /* fulltext_key_options: fulltext_key_opts */
#line 6998 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_key->option_list= Lex->option_list; }
#line 36196 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 986: /* spatial_key_options: %empty */
#line 7002 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36202 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 987: /* spatial_key_options: spatial_key_opts */
#line 7003 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_key->option_list= Lex->option_list; }
#line 36208 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 994: /* opt_USING_key_algorithm: %empty */
#line 7022 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_alg)= HA_KEY_ALG_UNDEF; }
#line 36214 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 995: /* opt_USING_key_algorithm: USING btree_or_rtree */
#line 7023 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_alg)= (yyvsp[0].key_alg); }
#line 36220 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 996: /* opt_key_algorithm_clause: %empty */
#line 7028 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_alg)= HA_KEY_ALG_UNDEF; }
#line 36226 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 997: /* opt_key_algorithm_clause: USING btree_or_rtree */
#line 7029 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_alg)= (yyvsp[0].key_alg); }
#line 36232 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 998: /* opt_key_algorithm_clause: TYPE_SYM btree_or_rtree */
#line 7030 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_alg)= (yyvsp[0].key_alg); }
#line 36238 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 999: /* key_using_alg: USING btree_or_rtree */
#line 7035 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_key->key_create_info.algorithm= (yyvsp[0].key_alg); }
#line 36244 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1000: /* key_using_alg: TYPE_SYM btree_or_rtree */
#line 7037 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_key->key_create_info.algorithm= (yyvsp[0].key_alg); }
#line 36250 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1001: /* all_key_opt: KEY_BLOCK_SIZE opt_equal ulong_num */
#line 7042 "/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 36259 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1002: /* all_key_opt: COMMENT_SYM TEXT_STRING_sys */
#line 7047 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_key->key_create_info.comment= (yyvsp[0].lex_str); }
#line 36265 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1003: /* all_key_opt: VISIBLE_SYM */
#line 7049 "/home/buildbot/git/sql/sql_yacc.yy"
{
/* This is mainly for MySQL 8.0 compatibility */
}
#line 36273 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1004: /* all_key_opt: ignorability */
#line 7053 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_key->key_create_info.is_ignored= (yyvsp[0].num);
}
#line 36281 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1005: /* all_key_opt: engine_defined_option */
#line 7057 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[0].engine_option_value_ptr)->link(&Lex->option_list, &Lex->option_list_last);
}
#line 36289 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1010: /* fulltext_key_opt: WITH PARSER_SYM IDENT_sys */
#line 7074 "/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 36300 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1011: /* btree_or_rtree: BTREE_SYM */
#line 7083 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_alg)= HA_KEY_ALG_BTREE; }
#line 36306 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1012: /* btree_or_rtree: RTREE_SYM */
#line 7084 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_alg)= HA_KEY_ALG_RTREE; }
#line 36312 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1013: /* btree_or_rtree: HASH_SYM */
#line 7085 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.key_alg)= HA_KEY_ALG_HASH; }
#line 36318 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1014: /* ignorability: IGNORED_SYM */
#line 7089 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= true; }
#line 36324 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1015: /* ignorability: NOT_SYM IGNORED_SYM */
#line 7090 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= false; }
#line 36330 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1016: /* key_list: key_list ',' key_part order_dir */
#line 7095 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[-1].key_part)->asc= (yyvsp[0].num);
Lex->last_key->columns.push_back((yyvsp[-1].key_part), thd->mem_root);
}
#line 36339 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1017: /* key_list: key_part order_dir */
#line 7100 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[-1].key_part)->asc= (yyvsp[0].num);
Lex->last_key->columns.push_back((yyvsp[-1].key_part), thd->mem_root);
}
#line 36348 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1018: /* opt_without_overlaps: %empty */
#line 7107 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36354 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1019: /* opt_without_overlaps: ',' ident WITHOUT OVERLAPS_SYM */
#line 7109 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->last_key->without_overlaps= true;
Lex->last_key->period= (yyvsp[-2].ident_sys);
}
#line 36363 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1020: /* key_part: ident */
#line 7117 "/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 36373 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1021: /* key_part: ident '(' NUM ')' */
#line 7123 "/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 36386 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1022: /* opt_ident: %empty */
#line 7134 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= null_clex_str; }
#line 36392 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1023: /* opt_ident: field_ident */
#line 7135 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= (yyvsp[0].lex_str); }
#line 36398 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1024: /* string_list: text_string */
#line 7140 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_field->interval_list.push_back((yyvsp[0].string), thd->mem_root); }
#line 36404 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1025: /* string_list: string_list ',' text_string */
#line 7142 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->last_field->interval_list.push_back((yyvsp[0].string), thd->mem_root); }
#line 36410 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1026: /* $@94: %empty */
#line 7151 "/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 36430 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1027: /* $@95: %empty */
#line 7167 "/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 36446 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1028: /* alter: ALTER $@94 alter_options TABLE_SYM opt_if_exists table_ident opt_lock_wait_timeout $@95 alter_commands */
#line 7179 "/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 36461 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1029: /* $@96: %empty */
#line 7190 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.init();
if (Lex->main_select_push(true))
MYSQL_YYABORT;
}
#line 36471 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1030: /* alter: ALTER DATABASE ident_or_empty $@96 create_database_options */
#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 36485 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1031: /* $@97: %empty */
#line 7206 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.init();
Lex->create_info.schema_comment= thd->make_clex_string((yyvsp[0].lex_str));
Lex->create_info.used_fields|= HA_CREATE_USED_COMMENT;
}
#line 36495 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1032: /* alter: ALTER DATABASE COMMENT_SYM opt_equal TEXT_STRING_sys $@97 opt_create_database_options */
#line 7212 "/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 36508 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1033: /* alter: ALTER DATABASE ident UPGRADE_SYM DATA_SYM DIRECTORY_SYM NAME_SYM */
#line 7221 "/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 36520 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1034: /* $@98: %empty */
#line 7229 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_alter_procedure_start((yyvsp[0].spname)))
MYSQL_YYABORT;
}
#line 36529 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1035: /* alter: ALTER PROCEDURE_SYM sp_name $@98 sp_a_chistics stmt_end */
#line 7234 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36535 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1036: /* $@99: %empty */
#line 7236 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_alter_function_start((yyvsp[0].spname)))
MYSQL_YYABORT;
}
#line 36544 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1037: /* alter: ALTER FUNCTION_SYM sp_name $@99 sp_a_chistics stmt_end */
#line 7241 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36550 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1038: /* $@100: %empty */
#line 7243 "/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 36561 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1039: /* alter: ALTER view_algorithm definer_opt opt_view_suid VIEW_SYM table_ident $@100 view_list_opt AS view_select stmt_end */
#line 7249 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36567 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1040: /* $@101: %empty */
#line 7256 "/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 36578 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1041: /* alter: ALTER definer_opt opt_view_suid VIEW_SYM table_ident $@101 view_list_opt AS view_select stmt_end */
#line 7262 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36584 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1042: /* $@102: %empty */
#line 7264 "/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 36607 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1043: /* alter: ALTER definer_opt remember_name EVENT_SYM sp_name $@102 ev_alter_on_schedule_completion opt_ev_rename_to opt_ev_status opt_ev_comment opt_ev_sql_stmt */
#line 7287 "/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 36627 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1044: /* $@103: %empty */
#line 7303 "/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 36637 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1045: /* alter: ALTER SERVER_SYM ident_or_text $@103 OPTIONS_SYM '(' server_options_list ')' */
#line 7307 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 36643 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1046: /* alter: ALTER USER_SYM opt_if_exists clear_privileges grant_list opt_require_clause opt_resource_options opt_account_locking_and_opt_password_expiration */
#line 7311 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_info.set((yyvsp[-5].object_ddl_options));
Lex->sql_command= SQLCOM_ALTER_USER;
}
#line 36652 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1047: /* $@104: %empty */
#line 7316 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_ALTER_SEQUENCE;
DBUG_ASSERT(!lex->m_sql_cmd);
if (Lex->main_select_push())
MYSQL_YYABORT;
}
#line 36664 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1048: /* $@105: %empty */
#line 7324 "/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 36678 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1049: /* $@106: %empty */
#line 7334 "/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 36689 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1050: /* alter: ALTER SEQUENCE_SYM opt_if_exists $@104 table_ident $@105 sequence_defs $@106 stmt_end */
#line 7339 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 36695 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1051: /* account_locking_option: LOCK_SYM */
#line 7344 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->account_options.account_locked= ACCOUNTLOCK_LOCKED;
}
#line 36703 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1052: /* account_locking_option: UNLOCK_SYM */
#line 7348 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->account_options.account_locked= ACCOUNTLOCK_UNLOCKED;
}
#line 36711 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1053: /* opt_password_expire_option: %empty */
#line 7355 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->account_options.password_expire= PASSWORD_EXPIRE_NOW;
}
#line 36719 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1054: /* opt_password_expire_option: NEVER_SYM */
#line 7359 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->account_options.password_expire= PASSWORD_EXPIRE_NEVER;
}
#line 36727 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1055: /* opt_password_expire_option: DEFAULT */
#line 7363 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->account_options.password_expire= PASSWORD_EXPIRE_DEFAULT;
}
#line 36735 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1056: /* opt_password_expire_option: INTERVAL_SYM NUM DAY_SYM */
#line 7367 "/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 36745 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1062: /* ev_alter_on_schedule_completion: %empty */
#line 7383 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0;}
#line 36751 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1063: /* ev_alter_on_schedule_completion: ON SCHEDULE_SYM ev_schedule_time */
#line 7384 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 36757 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1064: /* ev_alter_on_schedule_completion: ev_on_completion */
#line 7385 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 36763 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1065: /* ev_alter_on_schedule_completion: ON SCHEDULE_SYM ev_schedule_time ev_on_completion */
#line 7386 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 36769 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1066: /* opt_ev_rename_to: %empty */
#line 7390 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0;}
#line 36775 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1067: /* opt_ev_rename_to: RENAME TO_SYM sp_name */
#line 7392 "/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 36788 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1068: /* opt_ev_sql_stmt: %empty */
#line 7403 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0;}
#line 36794 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1069: /* opt_ev_sql_stmt: DO_SYM ev_sql_stmt */
#line 7404 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 36800 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1070: /* ident_or_empty: %empty */
#line 7409 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.ident_sys)= Lex_ident_sys(); }
#line 36806 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1073: /* alter_commands: DISCARD TABLESPACE */
#line 7416 "/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 36818 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1074: /* alter_commands: IMPORT TABLESPACE */
#line 7424 "/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);
Lex->create_info.add(DDL_options_st::OPT_IMPORT_TABLESPACE);
if (unlikely(Lex->m_sql_cmd == NULL))
MYSQL_YYABORT;
}
#line 36831 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1080: /* alter_commands: DROP PARTITION_SYM opt_if_exists alt_part_name_list */
#line 7447 "/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 36841 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1081: /* alter_commands: REBUILD_SYM PARTITION_SYM opt_no_write_to_binlog all_or_alt_part_name_list */
#line 7454 "/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 36851 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1082: /* $@107: %empty */
#line 7461 "/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 36866 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1084: /* alter_commands: ANALYZE_SYM PARTITION_SYM opt_no_write_to_binlog all_or_alt_part_name_list */
#line 7474 "/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 36881 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1085: /* $@108: %empty */
#line 7485 "/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 36895 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1087: /* $@109: %empty */
#line 7497 "/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 36910 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1089: /* alter_commands: COALESCE PARTITION_SYM opt_no_write_to_binlog real_ulong_num */
#line 7509 "/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 36921 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1090: /* alter_commands: TRUNCATE_SYM PARTITION_SYM all_or_alt_part_name_list */
#line 7516 "/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 36935 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1092: /* alter_commands: EXCHANGE_SYM PARTITION_SYM alt_part_name_item WITH TABLE_SYM table_ident opt_without_validation have_partitioning */
#line 7528 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_alter_table_exchange_partition((yyvsp[-2].table)))
MYSQL_YYABORT;
}
#line 36944 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1093: /* alter_commands: CONVERT_SYM PARTITION_SYM alt_part_name_item TO_SYM TABLE_SYM table_ident opt_without_validation have_partitioning */
#line 7534 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (Lex->stmt_alter_table((yyvsp[-2].table)))
MYSQL_YYABORT;
lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_alter_table();
if (unlikely(lex->m_sql_cmd == NULL))
MYSQL_YYABORT;
lex->alter_info.partition_flags|= ALTER_PARTITION_CONVERT_OUT;
}
#line 36958 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1094: /* $@110: %empty */
#line 7544 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
if (!lex->first_select_lex()->add_table_to_list(thd, (yyvsp[0].table), nullptr, 0,
TL_READ_NO_INSERT,
MDL_SHARED_NO_WRITE))
MYSQL_YYABORT;
/*
This will appear as (new_db, new_name) in alter_ctx.
new_db will be IX-locked and new_name X-locked.
*/
lex->first_select_lex()->db= (yyvsp[0].table)->db;
lex->name= (yyvsp[0].table)->table;
if (lex->first_select_lex()->db.str == NULL &&
lex->copy_db_to(&lex->first_select_lex()->db))
MYSQL_YYABORT;
lex->part_info= new (thd->mem_root) partition_info();
if (unlikely(!lex->part_info))
MYSQL_YYABORT;
lex->part_info->num_parts= 1;
/*
OR-ed with ALTER_PARTITION_ADD because too many checks of
ALTER_PARTITION_ADD required.
*/
lex->alter_info.partition_flags|= ALTER_PARTITION_ADD |
ALTER_PARTITION_CONVERT_IN;
}
#line 36992 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1095: /* alter_commands: CONVERT_SYM TABLE_SYM table_ident $@110 TO_SYM PARTITION_SYM part_definition opt_without_validation have_partitioning */
#line 7574 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_alter_table();
if (unlikely(lex->m_sql_cmd == NULL))
MYSQL_YYABORT;
}
#line 37003 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1096: /* remove_partitioning: REMOVE_SYM PARTITIONING_SYM */
#line 7584 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.partition_flags|= ALTER_PARTITION_REMOVE;
}
#line 37011 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1097: /* all_or_alt_part_name_list: ALL */
#line 7591 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.partition_flags|= ALTER_PARTITION_ALL;
}
#line 37019 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1099: /* $@111: %empty */
#line 7600 "/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 37035 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1100: /* add_partition_rule: ADD PARTITION_SYM opt_if_not_exists opt_no_write_to_binlog $@111 add_part_extra */
#line 7612 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37041 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1102: /* add_part_extra: '(' part_def_list ')' */
#line 7618 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
lex->part_info->num_parts= lex->part_info->partitions.elements;
}
#line 37050 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1103: /* add_part_extra: PARTITIONS_SYM real_ulong_num */
#line 7623 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->part_info->num_parts= (yyvsp[0].ulong_num);
}
#line 37058 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1104: /* $@112: %empty */
#line 7630 "/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 37071 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1106: /* reorg_parts_rule: %empty */
#line 7643 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.partition_flags|= ALTER_PARTITION_TABLE_REORG;
}
#line 37079 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1107: /* $@113: %empty */
#line 7647 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.partition_flags|= ALTER_PARTITION_REORGANIZE;
}
#line 37087 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1108: /* reorg_parts_rule: alt_part_name_list $@113 INTO '(' part_def_list ')' */
#line 7651 "/home/buildbot/git/sql/sql_yacc.yy"
{
partition_info *part_info= Lex->part_info;
part_info->num_parts= part_info->partitions.elements;
}
#line 37096 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1109: /* alt_part_name_list: alt_part_name_item */
#line 7658 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37102 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1110: /* alt_part_name_list: alt_part_name_list ',' alt_part_name_item */
#line 7659 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37108 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1111: /* alt_part_name_item: ident */
#line 7664 "/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 37118 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1115: /* alter_list_item: add_column column_def opt_place */
#line 7686 "/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 37129 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1116: /* alter_list_item: ADD key_def */
#line 7693 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->create_last_non_select_table= Lex->last_table();
Lex->alter_info.flags|= ALTER_ADD_INDEX;
}
#line 37138 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1117: /* alter_list_item: ADD period_for_system_time */
#line 7698 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.flags|= ALTER_ADD_PERIOD;
}
#line 37146 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1118: /* alter_list_item: ADD PERIOD_SYM opt_if_not_exists_table_element period_for_application_time */
#line 7703 "/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 37156 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1119: /* alter_list_item: add_column '(' create_field_list ')' */
#line 7709 "/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 37167 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1120: /* alter_list_item: ADD constraint_def */
#line 7716 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.flags|= ALTER_ADD_CHECK_CONSTRAINT;
}
#line 37175 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1121: /* alter_list_item: ADD CONSTRAINT IF_SYM not EXISTS field_ident check_constraint */
#line 7720 "/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 37184 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1122: /* alter_list_item: CHANGE opt_column opt_if_exists_table_element field_ident field_spec opt_place */
#line 7726 "/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 37195 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1123: /* alter_list_item: MODIFY_SYM opt_column opt_if_exists_table_element field_spec opt_place */
#line 7734 "/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 37206 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1124: /* alter_list_item: DROP opt_column opt_if_exists_table_element field_ident opt_restrict */
#line 7741 "/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 37220 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1125: /* alter_list_item: DROP CONSTRAINT opt_if_exists_table_element field_ident */
#line 7751 "/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 37235 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1126: /* alter_list_item: DROP FOREIGN KEY_SYM opt_if_exists_table_element field_ident */
#line 7762 "/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 37249 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1127: /* alter_list_item: DROP opt_constraint_no_id PRIMARY_SYM KEY_SYM */
#line 7772 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
Alter_drop *ad= (new (thd->mem_root)
Alter_drop(Alter_drop::KEY, primary_key_name.str,
FALSE));
if (unlikely(ad == NULL))
MYSQL_YYABORT;
lex->alter_info.drop_list.push_back(ad, thd->mem_root);
lex->alter_info.flags|= ALTER_DROP_INDEX;
}
#line 37264 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1128: /* alter_list_item: DROP key_or_index opt_if_exists_table_element field_ident */
#line 7783 "/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 37278 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1129: /* alter_list_item: DISABLE_SYM KEYS */
#line 7793 "/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 37288 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1130: /* alter_list_item: ENABLE_SYM KEYS */
#line 7799 "/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 37298 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1131: /* alter_list_item: ALTER opt_column opt_if_exists_table_element field_ident SET DEFAULT column_default_expr */
#line 7805 "/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 37309 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1132: /* alter_list_item: ALTER key_or_index opt_if_exists_table_element ident ignorability */
#line 7812 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex= Lex;
Alter_index_ignorability *ac= new (thd->mem_root)
Alter_index_ignorability((yyvsp[-1].ident_sys).str, (yyvsp[0].num), (yyvsp[-2].num));
if (ac == NULL)
MYSQL_YYABORT;
lex->alter_info.alter_index_ignorability_list.push_back(ac);
lex->alter_info.flags|= ALTER_INDEX_IGNORABILITY;
}
#line 37323 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1133: /* alter_list_item: ALTER opt_column opt_if_exists_table_element field_ident DROP DEFAULT */
#line 7822 "/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 37332 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1134: /* alter_list_item: RENAME opt_to table_ident */
#line 7827 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->stmt_alter_table((yyvsp[0].table)))
MYSQL_YYABORT;
Lex->alter_info.flags|= ALTER_RENAME;
}
#line 37342 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1135: /* alter_list_item: RENAME COLUMN_SYM opt_if_exists_table_element ident TO_SYM ident */
#line 7833 "/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 37351 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1136: /* alter_list_item: RENAME key_or_index opt_if_exists_table_element field_ident TO_SYM field_ident */
#line 7838 "/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 37365 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1137: /* alter_list_item: CONVERT_SYM TO_SYM charset charset_name_or_default */
#line 7848 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->add_alter_list_item_convert_to_charset(
thd, thd->variables.character_set_collations, (yyvsp[0].charset)))
MYSQL_YYABORT;
}
#line 37375 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1138: /* alter_list_item: CONVERT_SYM TO_SYM charset charset_name_or_default COLLATE_SYM collation_name_or_default */
#line 7855 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->add_alter_list_item_convert_to_charset(
thd, thd->variables.character_set_collations, (yyvsp[-2].charset), (yyvsp[0].Lex_extended_collation)))
MYSQL_YYABORT;
}
#line 37385 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1139: /* alter_list_item: create_table_options_space_separated */
#line 7861 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->alter_info.flags|= ALTER_OPTIONS;
}
#line 37394 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1140: /* alter_list_item: FORCE_SYM */
#line 7866 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.flags|= ALTER_RECREATE;
}
#line 37402 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1141: /* alter_list_item: alter_order_clause */
#line 7870 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->alter_info.flags|= ALTER_ORDER;
}
#line 37411 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1144: /* alter_list_item: ADD SYSTEM VERSIONING_SYM */
#line 7877 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.flags|= ALTER_ADD_SYSTEM_VERSIONING;
Lex->create_info.options|= HA_VERSIONED_TABLE;
}
#line 37420 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1145: /* alter_list_item: DROP SYSTEM VERSIONING_SYM */
#line 7882 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.flags|= ALTER_DROP_SYSTEM_VERSIONING;
Lex->create_info.options&= ~HA_VERSIONED_TABLE;
}
#line 37429 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1146: /* alter_list_item: DROP PERIOD_SYM FOR_SYSTEM_TIME_SYM */
#line 7887 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.flags|= ALTER_DROP_PERIOD;
}
#line 37437 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1147: /* alter_list_item: DROP PERIOD_SYM opt_if_exists_table_element FOR_SYM ident */
#line 7891 "/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 37449 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1149: /* opt_without_validation: WITH VALIDATION_SYM */
#line 7903 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->without_validation= 0;
}
#line 37457 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1150: /* opt_without_validation: WITHOUT VALIDATION_SYM */
#line 7907 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->without_validation= 1;
}
#line 37465 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1156: /* alter_algorithm_option: ALGORITHM_SYM opt_equal DEFAULT */
#line 7922 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.set_requested_algorithm(
Alter_info::ALTER_TABLE_ALGORITHM_DEFAULT);
}
#line 37474 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1157: /* alter_algorithm_option: ALGORITHM_SYM opt_equal ident */
#line 7927 "/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 37483 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1158: /* alter_lock_option: LOCK_SYM opt_equal DEFAULT */
#line 7935 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.requested_lock=
Alter_info::ALTER_TABLE_LOCK_DEFAULT;
}
#line 37492 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1159: /* alter_lock_option: LOCK_SYM opt_equal ident */
#line 7940 "/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 37501 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1160: /* opt_column: %empty */
#line 7947 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37507 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1161: /* opt_column: COLUMN_SYM */
#line 7948 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37513 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1162: /* opt_ignore: %empty */
#line 7952 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ignore= 0;}
#line 37519 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1163: /* opt_ignore: IGNORE_SYM */
#line 7953 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ignore= 1;}
#line 37525 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1164: /* $@114: %empty */
#line 7957 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ignore= 0;}
#line 37531 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1170: /* alter_option: IGNORE_SYM */
#line 7971 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->ignore= 1;}
#line 37537 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1171: /* alter_option: ONLINE_SYM */
#line 7973 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.requested_lock=
Alter_info::ALTER_TABLE_LOCK_NONE;
}
#line 37546 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1172: /* opt_restrict: %empty */
#line 7980 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->drop_mode= DROP_DEFAULT; }
#line 37552 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1173: /* opt_restrict: RESTRICT */
#line 7981 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->drop_mode= DROP_RESTRICT; }
#line 37558 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1174: /* opt_restrict: CASCADE */
#line 7982 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->drop_mode= DROP_CASCADE; }
#line 37564 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1175: /* opt_place: %empty */
#line 7986 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= null_clex_str; }
#line 37570 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1176: /* opt_place: AFTER_SYM ident */
#line 7988 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.lex_str)= (yyvsp[0].ident_sys);
Lex->alter_info.flags |= ALTER_COLUMN_ORDER;
}
#line 37579 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1177: /* opt_place: FIRST_SYM */
#line 7993 "/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 37589 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1178: /* opt_to: %empty */
#line 8001 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37595 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1179: /* opt_to: TO_SYM */
#line 8002 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37601 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1180: /* opt_to: '=' */
#line 8003 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37607 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1181: /* opt_to: AS */
#line 8004 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37613 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1182: /* $@115: %empty */
#line 8009 "/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 37624 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1183: /* slave: START_SYM SLAVE optional_connection_name slave_thread_opts optional_for_channel $@115 slave_until */
#line 8016 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37630 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1184: /* $@116: %empty */
#line 8018 "/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 37641 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1185: /* slave: START_SYM ALL SLAVES slave_thread_opts $@116 */
#line 8024 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37647 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1186: /* slave: STOP_SYM SLAVE optional_connection_name slave_thread_opts optional_for_channel */
#line 8026 "/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 37658 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1187: /* slave: STOP_SYM ALL SLAVES slave_thread_opts */
#line 8033 "/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 37669 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1188: /* start: START_SYM TRANSACTION_SYM opt_start_transaction_option_list */
#line 8043 "/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 37686 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1189: /* opt_start_transaction_option_list: %empty */
#line 8059 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= 0;
}
#line 37694 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1190: /* opt_start_transaction_option_list: start_transaction_option_list */
#line 8063 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= (yyvsp[0].num);
}
#line 37702 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1191: /* start_transaction_option_list: start_transaction_option */
#line 8070 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= (yyvsp[0].num);
}
#line 37710 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1192: /* start_transaction_option_list: start_transaction_option_list ',' start_transaction_option */
#line 8074 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= (yyvsp[-2].num) | (yyvsp[0].num);
}
#line 37718 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1193: /* start_transaction_option: WITH CONSISTENT_SYM SNAPSHOT_SYM */
#line 8081 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= MYSQL_START_TRANS_OPT_WITH_CONS_SNAPSHOT;
}
#line 37726 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1194: /* start_transaction_option: READ_SYM ONLY_SYM */
#line 8085 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= MYSQL_START_TRANS_OPT_READ_ONLY;
}
#line 37734 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1195: /* start_transaction_option: READ_SYM WRITE_SYM */
#line 8089 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= MYSQL_START_TRANS_OPT_READ_WRITE;
}
#line 37742 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1196: /* $@117: %empty */
#line 8095 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->slave_thd_opt= 0; }
#line 37748 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1197: /* slave_thread_opts: $@117 slave_thread_opt_list */
#line 8097 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37754 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1200: /* slave_thread_opt: %empty */
#line 8106 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37760 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1201: /* slave_thread_opt: SQL_THREAD */
#line 8107 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->slave_thd_opt|=SLAVE_SQL; }
#line 37766 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1202: /* slave_thread_opt: RELAY_THREAD */
#line 8108 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->slave_thd_opt|=SLAVE_IO; }
#line 37772 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1203: /* slave_until: %empty */
#line 8112 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37778 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1204: /* slave_until: UNTIL_SYM slave_until_opts */
#line 8114 "/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 37791 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1205: /* slave_until: UNTIL_SYM MASTER_GTID_POS_SYM '=' TEXT_STRING_sys */
#line 8123 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->mi.gtid_pos_str = (yyvsp[0].lex_str);
Lex->mi.is_until_before_gtids= false;
}
#line 37800 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1206: /* slave_until: UNTIL_SYM SQL_AFTER_GTIDS_SYM '=' TEXT_STRING_sys */
#line 8128 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->mi.gtid_pos_str = (yyvsp[0].lex_str);
Lex->mi.is_until_before_gtids= false;
}
#line 37809 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1207: /* slave_until: UNTIL_SYM SQL_BEFORE_GTIDS_SYM '=' TEXT_STRING_sys */
#line 8133 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->mi.gtid_pos_str = (yyvsp[0].lex_str);
Lex->mi.is_until_before_gtids= true;
}
#line 37818 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1210: /* $@118: %empty */
#line 8146 "/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 37829 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1211: /* checksum: CHECKSUM_SYM table_or_tables $@118 table_list opt_checksum_type */
#line 8153 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37835 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1212: /* opt_checksum_type: %empty */
#line 8157 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags= 0; }
#line 37841 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1213: /* opt_checksum_type: QUICK */
#line 8158 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags= T_QUICK; }
#line 37847 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1214: /* opt_checksum_type: EXTENDED_SYM */
#line 8159 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags= T_EXTEND; }
#line 37853 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1216: /* $@119: %empty */
#line 8165 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->table_type= TABLE_TYPE_VIEW; }
#line 37859 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1218: /* $@120: %empty */
#line 8171 "/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 37873 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1219: /* repair: REPAIR opt_no_write_to_binlog $@120 repair_table_or_view */
#line 8181 "/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 37885 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1220: /* opt_mi_repair_type: %empty */
#line 8191 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags = T_MEDIUM; }
#line 37891 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1221: /* opt_mi_repair_type: mi_repair_types */
#line 8192 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37897 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1222: /* mi_repair_types: mi_repair_type */
#line 8196 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37903 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1223: /* mi_repair_types: mi_repair_type mi_repair_types */
#line 8197 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37909 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1224: /* mi_repair_type: QUICK */
#line 8201 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags|= T_QUICK; }
#line 37915 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1225: /* mi_repair_type: EXTENDED_SYM */
#line 8202 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags|= T_EXTEND; }
#line 37921 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1226: /* mi_repair_type: USE_FRM */
#line 8203 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.sql_flags|= TT_USEFRM; }
#line 37927 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1227: /* opt_view_repair_type: %empty */
#line 8207 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 37933 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1228: /* opt_view_repair_type: FOR_SYM UPGRADE_SYM */
#line 8208 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.sql_flags|= TT_FOR_UPGRADE; }
#line 37939 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1229: /* opt_view_repair_type: FROM MYSQL_SYM */
#line 8209 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.sql_flags|= TT_FROM_MYSQL; }
#line 37945 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1230: /* $@121: %empty */
#line 8214 "/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 37959 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1231: /* analyze: ANALYZE_SYM opt_no_write_to_binlog table_or_tables $@121 analyze_table_list */
#line 8224 "/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 37971 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1235: /* opt_persistent_stat_clause: %empty */
#line 8244 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37977 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1236: /* opt_persistent_stat_clause: PERSISTENT_SYM FOR_SYM persistent_stat_spec */
#line 8246 "/home/buildbot/git/sql/sql_yacc.yy"
{
thd->lex->with_persistent_for_clause= TRUE;
}
#line 37985 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1237: /* persistent_stat_spec: ALL */
#line 8253 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37991 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1238: /* persistent_stat_spec: COLUMNS persistent_column_stat_spec INDEXES persistent_index_stat_spec */
#line 8255 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 37997 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1239: /* persistent_column_stat_spec: ALL */
#line 8259 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38003 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1240: /* $@122: %empty */
#line 8261 "/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 38014 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1241: /* persistent_column_stat_spec: '(' $@122 table_column_list ')' */
#line 8269 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 38020 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1242: /* persistent_index_stat_spec: ALL */
#line 8273 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38026 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1243: /* $@123: %empty */
#line 8275 "/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 38037 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1244: /* persistent_index_stat_spec: '(' $@123 table_index_list ')' */
#line 8283 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 38043 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1245: /* table_column_list: %empty */
#line 8288 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38049 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1246: /* table_column_list: ident */
#line 8290 "/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 38058 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1247: /* table_column_list: table_column_list ',' ident */
#line 8295 "/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 38067 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1248: /* table_index_list: %empty */
#line 8303 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38073 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1251: /* table_index_name: ident */
#line 8310 "/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 38083 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1252: /* table_index_name: PRIMARY_SYM */
#line 8317 "/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 38094 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1253: /* binlog_base64_event: BINLOG_SYM TEXT_STRING_sys */
#line 8327 "/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 38105 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1254: /* binlog_base64_event: BINLOG_SYM '@' ident_or_text ',' '@' ident_or_text */
#line 8335 "/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 38115 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1256: /* $@124: %empty */
#line 8345 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->table_type= TABLE_TYPE_VIEW; }
#line 38121 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1258: /* $@125: %empty */
#line 8350 "/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 38135 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1259: /* check: CHECK_SYM $@125 check_view_or_table */
#line 8360 "/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 38149 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1260: /* opt_mi_check_type: %empty */
#line 8372 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags = T_MEDIUM; }
#line 38155 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1261: /* opt_mi_check_type: mi_check_types */
#line 8373 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38161 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1262: /* mi_check_types: mi_check_type */
#line 8377 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38167 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1263: /* mi_check_types: mi_check_type mi_check_types */
#line 8378 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 38173 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1264: /* mi_check_type: QUICK */
#line 8382 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags|= T_QUICK; }
#line 38179 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1265: /* mi_check_type: FAST_SYM */
#line 8383 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags|= T_FAST; }
#line 38185 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1266: /* mi_check_type: MEDIUM_SYM */
#line 8384 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags|= T_MEDIUM; }
#line 38191 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1267: /* mi_check_type: EXTENDED_SYM */
#line 8385 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags|= T_EXTEND; }
#line 38197 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1268: /* mi_check_type: CHANGED */
#line 8386 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.flags|= T_CHECK_ONLY_CHANGED; }
#line 38203 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1269: /* mi_check_type: FOR_SYM UPGRADE_SYM */
#line 8387 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.sql_flags|= TT_FOR_UPGRADE; }
#line 38209 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1270: /* opt_view_check_type: %empty */
#line 8391 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 38215 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1271: /* opt_view_check_type: FOR_SYM UPGRADE_SYM */
#line 8392 "/home/buildbot/git/sql/sql_yacc.yy"
{ Lex->check_opt.sql_flags|= TT_FOR_UPGRADE; }
#line 38221 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1272: /* $@126: %empty */
#line 8397 "/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 38235 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1273: /* optimize: OPTIMIZE opt_no_write_to_binlog table_or_tables $@126 table_list opt_lock_wait_timeout */
#line 8407 "/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 38247 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1274: /* opt_no_write_to_binlog: %empty */
#line 8417 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 38253 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1275: /* opt_no_write_to_binlog: NO_WRITE_TO_BINLOG */
#line 8418 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 38259 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1276: /* opt_no_write_to_binlog: LOCAL_SYM */
#line 8419 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 1; }
#line 38265 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1277: /* $@127: %empty */
#line 8424 "/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 38276 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1278: /* rename: RENAME table_or_tables opt_if_exists $@127 table_to_table_list */
#line 8431 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->pop_select(); //main select
}
#line 38284 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1279: /* rename: RENAME USER_SYM clear_privileges rename_list */
#line 8435 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->sql_command = SQLCOM_RENAME_USER;
}
#line 38292 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1280: /* rename_list: user TO_SYM user */
#line 8442 "/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 38302 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1281: /* rename_list: rename_list ',' user TO_SYM user */
#line 8448 "/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 38312 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1284: /* table_to_table: table_ident opt_lock_wait_timeout TO_SYM table_ident */
#line 8462 "/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 38328 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1285: /* $@128: %empty */
#line 8477 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.reset();
}
#line 38336 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1286: /* keycache: CACHE_SYM INDEX_SYM $@128 keycache_list_or_parts IN_SYM key_cache_name */
#line 8481 "/home/buildbot/git/sql/sql_yacc.yy"
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_ASSIGN_TO_KEYCACHE;
lex->ident= (yyvsp[0].lex_str);
}
#line 38346 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1291: /* assign_to_keycache: table_ident cache_keys_spec */
#line 8500 "/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 38358 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1292: /* assign_to_keycache_parts: table_ident adm_partition cache_keys_spec */
#line 8511 "/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 38370 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1293: /* key_cache_name: ident */
#line 8521 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)= (yyvsp[0].ident_sys); }
#line 38376 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1294: /* key_cache_name: DEFAULT */
#line 8522 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str) = default_base; }
#line 38382 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1295: /* $@129: %empty */
#line 8527 "/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 38394 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1296: /* preload: LOAD INDEX_SYM INTO CACHE_SYM $@129 preload_list_or_parts */
#line 8535 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->pop_select(); //main select
}
#line 38402 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1301: /* preload_keys: table_ident cache_keys_spec opt_ignore_leaves */
#line 8552 "/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 38414 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1302: /* preload_keys_parts: table_ident adm_partition cache_keys_spec opt_ignore_leaves */
#line 8563 "/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 38426 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1303: /* $@130: %empty */
#line 8574 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->alter_info.partition_flags|= ALTER_PARTITION_ADMIN;
}
#line 38434 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1305: /* $@131: %empty */
#line 8581 "/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 38444 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1307: /* cache_key_list_or_empty: %empty */
#line 8590 "/home/buildbot/git/sql/sql_yacc.yy"
{ }
#line 38450 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1309: /* opt_ignore_leaves: %empty */
#line 8596 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 38456 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1310: /* opt_ignore_leaves: IGNORE_SYM LEAVES */
#line 8597 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= TL_OPTION_IGNORE_LEAVES; }
#line 38462 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1311: /* $@132: %empty */
#line 8607 "/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 38473 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1312: /* select: query_expression_no_with_clause $@132 opt_procedure_or_into */
#line 8614 "/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 38484 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1313: /* $@133: %empty */
#line 8621 "/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 38495 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1314: /* select: with_clause query_expression_no_with_clause $@133 opt_procedure_or_into */
#line 8628 "/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 38507 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1315: /* $@134: %empty */
#line 8639 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->push_select((yyvsp[0].select_lex)))
MYSQL_YYABORT;
}
#line 38516 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1316: /* select_into: select_into_query_specification $@134 opt_order_limit_lock */
#line 8644 "/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 38530 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1317: /* $@135: %empty */
#line 8655 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->push_select((yyvsp[0].select_lex)))
MYSQL_YYABORT;
}
#line 38539 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1318: /* select_into: with_clause select_into_query_specification $@135 opt_order_limit_lock */
#line 8660 "/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 38555 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1319: /* simple_table: query_specification */
#line 8674 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_lex)= (yyvsp[0].select_lex); }
#line 38561 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1320: /* simple_table: table_value_constructor */
#line 8675 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_lex)= (yyvsp[0].select_lex); }
#line 38567 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1321: /* $@136: %empty */
#line 8680 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (Lex->parsed_TVC_start())
MYSQL_YYABORT;
}
#line 38576 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1322: /* table_value_constructor: VALUES $@136 values_list */
#line 8685 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.select_lex)= Lex->parsed_TVC_end()))
MYSQL_YYABORT;
}
#line 38585 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1323: /* $@137: %empty */
#line 8693 "/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 38598 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1324: /* $@138: %empty */
#line 8702 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->parsing_place= SELECT_LIST;
}
#line 38606 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1325: /* query_specification_start: SELECT_SYM $@137 select_options $@138 select_item_list */
#line 8706 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->parsing_place= NO_MATTER;
}
#line 38614 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1326: /* query_specification: query_specification_start opt_from_clause opt_where_clause opt_group_clause opt_having_clause opt_window_clause */
#line 8718 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lex)= Lex->pop_select();
}
#line 38622 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1327: /* select_into_query_specification: query_specification_start into opt_from_clause opt_where_clause opt_group_clause opt_having_clause opt_window_clause */
#line 8731 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lex)= Lex->pop_select();
}
#line 38630 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1328: /* query_expression: query_expression_no_with_clause */
#line 8789 "/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 38639 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1329: /* query_expression: with_clause query_expression_no_with_clause */
#line 8795 "/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 38649 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1330: /* query_expression_no_with_clause: query_expression_body_ext */
#line 8808 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_lex_unit)= (yyvsp[0].select_lex_unit); }
#line 38655 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1331: /* query_expression_no_with_clause: query_expression_body_ext_parens */
#line 8809 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_lex_unit)= (yyvsp[0].select_lex_unit); }
#line 38661 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1332: /* $@139: %empty */
#line 8824 "/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 38673 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1333: /* query_expression_body_ext: query_expression_body $@139 opt_query_expression_tail */
#line 8832 "/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 38684 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1334: /* $@140: %empty */
#line 8839 "/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 38693 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1335: /* query_expression_body_ext: query_expression_body_ext_parens $@140 query_expression_tail */
#line 8844 "/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 38702 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1336: /* query_expression_body_ext_parens: '(' query_expression_body_ext_parens ')' */
#line 8852 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_lex_unit)= (yyvsp[-1].select_lex_unit); }
#line 38708 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1337: /* query_expression_body_ext_parens: '(' query_expression_body_ext ')' */
#line 8854 "/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 38719 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1338: /* query_expression_body: query_simple */
#line 8869 "/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 38729 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1339: /* $@141: %empty */
#line 8876 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!(yyvsp[-1].select_lex_unit)->first_select()->next_select())
{
Lex->pop_select();
}
}
#line 38740 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1340: /* query_expression_body: query_expression_body unit_type_decl $@141 query_primary */
#line 8883 "/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 38751 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1341: /* query_expression_body: query_expression_body_ext_parens unit_type_decl query_primary */
#line 8892 "/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 38763 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1342: /* query_primary: query_simple */
#line 8908 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_lex)= (yyvsp[0].select_lex); }
#line 38769 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1343: /* query_primary: query_expression_body_ext_parens */
#line 8910 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_lex)= (yyvsp[0].select_lex_unit)->first_select(); }
#line 38775 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1344: /* query_simple: simple_table */
#line 8919 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.select_lex)= (yyvsp[0].select_lex);}
#line 38781 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1345: /* subselect: query_expression */
#line 8924 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!((yyval.select_lex)= Lex->parsed_subselect((yyvsp[0].select_lex_unit))))
MYSQL_YYABORT;
}
#line 38790 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1346: /* subquery: query_expression_body_ext_parens */
#line 8965 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!(yyvsp[0].select_lex_unit)->fake_select_lex)
(yyvsp[0].select_lex_unit)->first_select()->braces= false;
else
(yyvsp[0].select_lex_unit)->fake_select_lex->braces= false;
if (!((yyval.select_lex)= Lex->parsed_subselect((yyvsp[0].select_lex_unit))))
MYSQL_YYABORT;
}
#line 38803 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1347: /* subquery: '(' with_clause query_expression_no_with_clause ')' */
#line 8974 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[-1].select_lex_unit)->set_with_clause((yyvsp[-2].with_clause));
(yyvsp[-2].with_clause)->attach_to((yyvsp[-1].select_lex_unit)->first_select());
if (!((yyval.select_lex)= Lex->parsed_subselect((yyvsp[-1].select_lex_unit))))
MYSQL_YYABORT;
}
#line 38814 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1351: /* table_reference_list: join_table_list */
#line 8993 "/home/buildbot/git/sql/sql_yacc.yy"
{
Select->context.table_list=
Select->context.first_name_resolution_table=
Select->table_list.first;
}
#line 38824 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1354: /* select_options: select_option_list */
#line 9008 "/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 38834 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1355: /* opt_history_unit: %empty */
#line 9017 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.vers_range_unit)= VERS_TIMESTAMP;
}
#line 38842 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1356: /* opt_history_unit: TRANSACTION_SYM */
#line 9021 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.vers_range_unit)= VERS_TRX_ID;
}
#line 38850 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1357: /* opt_history_unit: TIMESTAMP */
#line 9025 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.vers_range_unit)= VERS_TIMESTAMP;
}
#line 38858 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1358: /* history_point: TIMESTAMP TEXT_STRING */
#line 9032 "/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 38871 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1359: /* history_point: function_call_keyword_timestamp */
#line 9041 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.vers_history_point)= Vers_history_point(VERS_TIMESTAMP, (yyvsp[0].item));
}
#line 38879 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1360: /* history_point: opt_history_unit bit_expr */
#line 9045 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.vers_history_point)= Vers_history_point((yyvsp[-1].vers_range_unit), (yyvsp[0].item));
}
#line 38887 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1361: /* for_portion_of_time_clause: FOR_SYM PORTION_SYM OF_SYM remember_tok_start ident FROM bit_expr TO_SYM bit_expr */
#line 9053 "/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 38903 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1362: /* opt_for_portion_of_time_clause: %empty */
#line 9068 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= false;
}
#line 38911 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1363: /* opt_for_portion_of_time_clause: for_portion_of_time_clause */
#line 9072 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= true;
}
#line 38919 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1364: /* opt_for_system_time_clause: %empty */
#line 9079 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= false;
}
#line 38927 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1365: /* opt_for_system_time_clause: FOR_SYSTEM_TIME_SYM system_time_expr */
#line 9083 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.num)= true;
}
#line 38935 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1366: /* system_time_expr: AS OF_SYM history_point */
#line 9090 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->vers_conditions.init(SYSTEM_TIME_AS_OF, (yyvsp[0].vers_history_point));
}
#line 38943 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1367: /* system_time_expr: ALL */
#line 9094 "/home/buildbot/git/sql/sql_yacc.yy"
{
Lex->vers_conditions.init(SYSTEM_TIME_ALL);
}
#line 38951 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1368: /* system_time_expr: FROM history_point TO_SYM history_point */
#line 9098 "/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 38959 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1369: /* system_time_expr: BETWEEN_SYM history_point AND_SYM history_point */
#line 9102 "/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 38967 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1373: /* select_option: SQL_NO_CACHE_SYM */
#line 9115 "/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 38980 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1374: /* select_option: SQL_CACHE_SYM */
#line 9124 "/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 38993 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1375: /* select_lock_type: FOR_SYM UPDATE_SYM opt_lock_wait_timeout_new */
#line 9137 "/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 39003 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1376: /* select_lock_type: LOCK_SYM IN_SYM SHARE_SYM MODE_SYM opt_lock_wait_timeout_new */
#line 9143 "/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 39013 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1377: /* opt_select_lock_type: %empty */
#line 9153 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lock).empty();
}
#line 39021 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1378: /* opt_select_lock_type: select_lock_type */
#line 9157 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lock)= (yyvsp[0].select_lock);
}
#line 39029 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1379: /* opt_lock_wait_timeout_new: %empty */
#line 9164 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lock).empty();
}
#line 39037 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1380: /* opt_lock_wait_timeout_new: WAIT_SYM ulong_num */
#line 9168 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lock).empty();
(yyval.select_lock).defined_timeout= TRUE;
(yyval.select_lock).timeout= (yyvsp[0].ulong_num);
}
#line 39047 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1381: /* opt_lock_wait_timeout_new: NOWAIT_SYM */
#line 9174 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lock).empty();
(yyval.select_lock).defined_timeout= TRUE;
(yyval.select_lock).timeout= 0;
}
#line 39057 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1382: /* opt_lock_wait_timeout_new: SKIP_SYM LOCKED_SYM */
#line 9180 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.select_lock).empty();
(yyval.select_lock).skip_locked= 1;
Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SKIP_LOCKED);
}
#line 39067 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1385: /* select_item_list: '*' */
#line 9191 "/home/buildbot/git/sql/sql_yacc.yy"
{
bool is_parsing_returning=
thd->lex->current_select->parsing_place ==
IN_RETURNING;
SELECT_LEX *correct_select= is_parsing_returning ?
thd->lex->returning() :
thd->lex->current_select;
Item *item= new (thd->mem_root)
Item_field(thd, &correct_select->context,
star_clex_str);
if (unlikely(item == NULL))
MYSQL_YYABORT;
if (unlikely(add_item_to_list(thd, item)))
MYSQL_YYABORT;
correct_select->with_wild++;
}
#line 39088 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1386: /* select_item: remember_name select_sublist_qualified_asterisk remember_end */
#line 9211 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(add_item_to_list(thd, (yyvsp[-1].item))))
MYSQL_YYABORT;
}
#line 39097 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1387: /* select_item: remember_name expr remember_end select_alias */
#line 9216 "/home/buildbot/git/sql/sql_yacc.yy"
{
DBUG_ASSERT((yyvsp[-3].simple_string) < (yyvsp[-1].simple_string));
if (unlikely(add_item_to_list(thd, (yyvsp[-2].item))))
MYSQL_YYABORT;
if ((yyvsp[0].lex_str).str)
{
if (unlikely(Lex->sql_command == SQLCOM_CREATE_VIEW &&
check_column_name((yyvsp[0].lex_str).str)))
my_yyabort_error((ER_WRONG_COLUMN_NAME, MYF(0), (yyvsp[0].lex_str).str));
(yyvsp[-2].item)->base_flags|= item_base_t::IS_EXPLICIT_NAME;
(yyvsp[-2].item)->set_name(thd, (yyvsp[0].lex_str));
}
else if (!(yyvsp[-2].item)->name.str || (yyvsp[-2].item)->name.str == item_empty_name)
{
(yyvsp[-2].item)->set_name(thd, (yyvsp[-3].simple_string), (uint) ((yyvsp[-1].simple_string) - (yyvsp[-3].simple_string)), thd->charset());
}
}
#line 39120 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1388: /* remember_tok_start: %empty */
#line 9237 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.simple_string)= (char*) YYLIP->get_tok_start();
}
#line 39128 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1389: /* remember_name: %empty */
#line 9243 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.simple_string)= (char*) YYLIP->get_cpp_tok_start();
}
#line 39136 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1390: /* remember_end: %empty */
#line 9249 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.simple_string)= (char*) YYLIP->get_cpp_tok_end_rtrim();
}
#line 39144 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1391: /* remember_cpp_ptr: %empty */
#line 9255 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.simple_string)= (char*) YYLIP->get_cpp_ptr();
}
#line 39152 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1392: /* remember_start_opt: %empty */
#line 9261 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (yychar == YYEMPTY)
(yyval.simple_string)= (char*) YYLIP->get_cpp_ptr();
else
(yyval.simple_string)= (char*) YYLIP->get_cpp_tok_start();
}
#line 39163 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1393: /* remember_end_opt: %empty */
#line 9270 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (yychar == YYEMPTY)
(yyval.simple_string)= (char*) YYLIP->get_cpp_ptr_rtrim();
else
(yyval.simple_string)= (char*) YYLIP->get_cpp_tok_end_rtrim();
}
#line 39174 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1394: /* remember_lex: %empty */
#line 9279 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.lex)= thd->lex;
}
#line 39182 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1395: /* select_alias: %empty */
#line 9285 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=null_clex_str;}
#line 39188 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1396: /* select_alias: AS ident */
#line 9286 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].ident_sys); }
#line 39194 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1397: /* select_alias: AS TEXT_STRING_sys */
#line 9287 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].lex_str); }
#line 39200 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1398: /* select_alias: ident */
#line 9288 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].ident_sys); }
#line 39206 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1399: /* select_alias: TEXT_STRING_sys */
#line 9289 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.lex_str)=(yyvsp[0].lex_str); }
#line 39212 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1400: /* opt_default_time_precision: %empty */
#line 9293 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= NOT_FIXED_DEC; }
#line 39218 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1401: /* opt_default_time_precision: '(' ')' */
#line 9294 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= NOT_FIXED_DEC; }
#line 39224 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1402: /* opt_default_time_precision: '(' real_ulong_num ')' */
#line 9295 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= (yyvsp[-1].ulong_num); }
#line 39230 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1403: /* opt_time_precision: %empty */
#line 9299 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 39236 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1404: /* opt_time_precision: '(' ')' */
#line 9300 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= 0; }
#line 39242 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1405: /* opt_time_precision: '(' real_ulong_num ')' */
#line 9301 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num)= (yyvsp[-1].ulong_num); }
#line 39248 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1406: /* optional_braces: %empty */
#line 9305 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 39254 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1407: /* optional_braces: '(' ')' */
#line 9306 "/home/buildbot/git/sql/sql_yacc.yy"
{}
#line 39260 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1408: /* expr: expr or expr */
#line 9312 "/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 39315 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1409: /* expr: expr XOR expr */
#line 9363 "/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 39326 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1410: /* expr: expr and expr */
#line 9370 "/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 39373 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1411: /* expr: NOT_SYM expr */
#line 9413 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= negate_expression(thd, (yyvsp[0].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 39383 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1413: /* boolean_test: boolean_test IS TRUE_SYM */
#line 9423 "/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 39393 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1414: /* boolean_test: boolean_test IS not TRUE_SYM */
#line 9429 "/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 39403 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1415: /* boolean_test: boolean_test IS FALSE_SYM */
#line 9435 "/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 39413 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1416: /* boolean_test: boolean_test IS not FALSE_SYM */
#line 9441 "/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 39423 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1417: /* boolean_test: boolean_test IS UNKNOWN_SYM */
#line 9447 "/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 39433 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1418: /* boolean_test: boolean_test IS not UNKNOWN_SYM */
#line 9453 "/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 39443 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1419: /* boolean_test: boolean_test IS NULL_SYM */
#line 9459 "/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 39453 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1420: /* boolean_test: boolean_test IS not NULL_SYM */
#line 9465 "/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 39463 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1421: /* boolean_test: boolean_test EQUAL_SYM predicate */
#line 9471 "/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 39473 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1422: /* boolean_test: boolean_test comp_op predicate */
#line 9477 "/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 39483 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1423: /* boolean_test: boolean_test comp_op all_or_any '(' subselect ')' */
#line 9483 "/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 39493 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1425: /* predicate: predicate IN_SYM subquery */
#line 9493 "/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 39503 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1426: /* predicate: predicate not IN_SYM subquery */
#line 9499 "/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 39516 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1427: /* predicate: predicate IN_SYM '(' expr ')' */
#line 9508 "/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 39526 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1428: /* predicate: predicate IN_SYM '(' expr ',' expr_list ')' */
#line 9514 "/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 39538 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1429: /* predicate: predicate not IN_SYM '(' expr ')' */
#line 9522 "/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 39548 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1430: /* predicate: predicate not IN_SYM '(' expr ',' expr_list ')' */
#line 9528 "/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 39561 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1431: /* predicate: predicate BETWEEN_SYM predicate AND_SYM predicate */
#line 9537 "/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 39571 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1432: /* predicate: predicate not BETWEEN_SYM predicate AND_SYM predicate */
#line 9543 "/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 39583 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1433: /* predicate: predicate SOUNDS_SYM LIKE predicate */
#line 9551 "/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 39597 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1434: /* predicate: predicate LIKE predicate */
#line 9561 "/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 39607 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1435: /* predicate: predicate LIKE predicate ESCAPE_SYM predicate */
#line 9567 "/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 39618 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1436: /* predicate: predicate not LIKE predicate */
#line 9574 "/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 39629 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1437: /* predicate: predicate not LIKE predicate ESCAPE_SYM predicate */
#line 9581 "/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 39641 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1438: /* predicate: predicate REGEXP predicate */
#line 9589 "/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 39651 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1439: /* predicate: predicate not REGEXP predicate */
#line 9595 "/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 39664 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1441: /* bit_expr: bit_expr '|' bit_expr */
#line 9608 "/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 39674 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1442: /* bit_expr: bit_expr '&' bit_expr */
#line 9614 "/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 39684 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1443: /* bit_expr: bit_expr SHIFT_LEFT bit_expr */
#line 9620 "/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 39694 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1444: /* bit_expr: bit_expr SHIFT_RIGHT bit_expr */
#line 9626 "/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 39704 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1445: /* bit_expr: bit_expr ORACLE_CONCAT_SYM bit_expr */
#line 9632 "/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 39715 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1446: /* bit_expr: bit_expr '+' bit_expr */
#line 9639 "/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 39725 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1447: /* bit_expr: bit_expr '-' bit_expr */
#line 9645 "/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 39735 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1448: /* bit_expr: bit_expr '+' INTERVAL_SYM expr interval */
#line 9651 "/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 39745 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1449: /* bit_expr: bit_expr '-' INTERVAL_SYM expr interval */
#line 9657 "/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 39755 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1450: /* bit_expr: INTERVAL_SYM expr interval '+' expr */
#line 9664 "/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 39765 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1451: /* bit_expr: '+' INTERVAL_SYM expr interval '+' expr */
#line 9670 "/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 39775 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1452: /* bit_expr: '-' INTERVAL_SYM expr interval '+' expr */
#line 9676 "/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 39785 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1453: /* bit_expr: bit_expr '*' bit_expr */
#line 9682 "/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 39795 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1454: /* bit_expr: bit_expr '/' bit_expr */
#line 9688 "/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 39805 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1455: /* bit_expr: bit_expr '%' bit_expr */
#line 9694 "/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 39815 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1456: /* bit_expr: bit_expr DIV_SYM bit_expr */
#line 9700 "/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 39825 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1457: /* bit_expr: bit_expr MOD_SYM bit_expr */
#line 9706 "/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 39835 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1458: /* bit_expr: bit_expr '^' bit_expr */
#line 9712 "/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 39845 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1468: /* comp_op: '=' */
#line 9741 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.boolfunc2creator) = &comp_eq_creator; }
#line 39851 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1469: /* comp_op: GE */
#line 9742 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.boolfunc2creator) = &comp_ge_creator; }
#line 39857 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1470: /* comp_op: '>' */
#line 9743 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.boolfunc2creator) = &comp_gt_creator; }
#line 39863 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1471: /* comp_op: LE */
#line 9744 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.boolfunc2creator) = &comp_le_creator; }
#line 39869 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1472: /* comp_op: '<' */
#line 9745 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.boolfunc2creator) = &comp_lt_creator; }
#line 39875 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1473: /* comp_op: NE */
#line 9746 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.boolfunc2creator) = &comp_ne_creator; }
#line 39881 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1474: /* all_or_any: ALL */
#line 9750 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 1; }
#line 39887 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1475: /* all_or_any: ANY_SYM */
#line 9751 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.num) = 0; }
#line 39893 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1476: /* opt_dyncol_type: %empty */
#line 9756 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_dyncol_type).set(DYN_COL_NULL); /* automatic type */
}
#line 39901 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1477: /* opt_dyncol_type: AS dyncol_type */
#line 9759 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type)= (yyvsp[0].Lex_dyncol_type); }
#line 39907 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1481: /* numeric_dyncol_type: INT_SYM */
#line 9769 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type).set(DYN_COL_INT); }
#line 39913 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1482: /* numeric_dyncol_type: UNSIGNED INT_SYM */
#line 9770 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type).set(DYN_COL_UINT); }
#line 39919 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1483: /* numeric_dyncol_type: DOUBLE_SYM */
#line 9771 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type).set(DYN_COL_DOUBLE); }
#line 39925 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1484: /* numeric_dyncol_type: REAL */
#line 9772 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type).set(DYN_COL_DOUBLE); }
#line 39931 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1485: /* numeric_dyncol_type: FLOAT_SYM */
#line 9773 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type).set(DYN_COL_DOUBLE); }
#line 39937 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1486: /* numeric_dyncol_type: DECIMAL_SYM float_options */
#line 9774 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type).set(DYN_COL_DECIMAL, (yyvsp[0].Lex_length_and_dec)); }
#line 39943 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1487: /* temporal_dyncol_type: DATE_SYM */
#line 9778 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type).set(DYN_COL_DATE); }
#line 39949 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1488: /* temporal_dyncol_type: TIME_SYM opt_field_scale */
#line 9779 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type).set(DYN_COL_TIME, (yyvsp[0].Lex_length_and_dec)); }
#line 39955 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1489: /* temporal_dyncol_type: DATETIME opt_field_scale */
#line 9780 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.Lex_dyncol_type).set(DYN_COL_DATETIME, (yyvsp[0].Lex_length_and_dec)); }
#line 39961 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1490: /* string_dyncol_type: char opt_binary */
#line 9785 "/home/buildbot/git/sql/sql_yacc.yy"
{
if ((yyval.Lex_dyncol_type).set(DYN_COL_STRING, thd,
thd->variables.character_set_collations,
(yyvsp[0].Lex_exact_charset_extended_collation_attrs), thd->variables.collation_connection))
MYSQL_YYABORT;
}
#line 39972 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1491: /* string_dyncol_type: nchar */
#line 9792 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.Lex_dyncol_type).set(DYN_COL_STRING, national_charset_info);
}
#line 39980 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1492: /* dyncall_create_element: expr ',' expr opt_dyncol_type */
#line 9799 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.dyncol_def)= (DYNCALL_CREATE_DEF *)
alloc_root(thd->mem_root, sizeof(DYNCALL_CREATE_DEF));
if (unlikely((yyval.dyncol_def) == NULL))
MYSQL_YYABORT;
(yyval.dyncol_def)->key= (yyvsp[-3].item);
(yyval.dyncol_def)->value= (yyvsp[-1].item);
(yyval.dyncol_def)->type= (DYNAMIC_COLUMN_TYPE)(yyvsp[0].Lex_dyncol_type).dyncol_type();
(yyval.dyncol_def)->cs= (yyvsp[0].Lex_dyncol_type).charset_collation();
if ((yyvsp[0].Lex_dyncol_type).has_explicit_length())
(yyval.dyncol_def)->len= (yyvsp[0].Lex_dyncol_type).length();
else
(yyval.dyncol_def)->len= 0;
if ((yyvsp[0].Lex_dyncol_type).has_explicit_dec())
(yyval.dyncol_def)->frac= (yyvsp[0].Lex_dyncol_type).dec();
else
(yyval.dyncol_def)->len= 0;
}
#line 40003 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1493: /* dyncall_create_list: dyncall_create_element */
#line 9821 "/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 40014 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1494: /* dyncall_create_list: dyncall_create_list ',' dyncall_create_element */
#line 9828 "/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 40023 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1495: /* plsql_cursor_attr: ISOPEN_SYM */
#line 9836 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.plsql_cursor_attr)= PLSQL_CURSOR_ATTR_ISOPEN; }
#line 40029 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1496: /* plsql_cursor_attr: FOUND_SYM */
#line 9837 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.plsql_cursor_attr)= PLSQL_CURSOR_ATTR_FOUND; }
#line 40035 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1497: /* plsql_cursor_attr: NOTFOUND_SYM */
#line 9838 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.plsql_cursor_attr)= PLSQL_CURSOR_ATTR_NOTFOUND; }
#line 40041 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1498: /* plsql_cursor_attr: ROWCOUNT_SYM */
#line 9839 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.plsql_cursor_attr)= PLSQL_CURSOR_ATTR_ROWCOUNT; }
#line 40047 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1499: /* explicit_cursor_attr: ident PERCENT_ORACLE_SYM plsql_cursor_attr */
#line 9844 "/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 40056 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1502: /* trim_operands_regular: expr */
#line 9857 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.trim).set(TRIM_BOTH, (yyvsp[0].item)); }
#line 40062 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1503: /* trim_operands_special: LEADING expr FROM expr */
#line 9861 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.trim).set(TRIM_LEADING, (yyvsp[-2].item), (yyvsp[0].item)); }
#line 40068 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1504: /* trim_operands_special: TRAILING expr FROM expr */
#line 9862 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.trim).set(TRIM_TRAILING, (yyvsp[-2].item), (yyvsp[0].item)); }
#line 40074 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1505: /* trim_operands_special: BOTH expr FROM expr */
#line 9863 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.trim).set(TRIM_BOTH, (yyvsp[-2].item), (yyvsp[0].item)); }
#line 40080 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1506: /* trim_operands_special: LEADING FROM expr */
#line 9864 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.trim).set(TRIM_LEADING, (yyvsp[0].item)); }
#line 40086 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1507: /* trim_operands_special: TRAILING FROM expr */
#line 9865 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.trim).set(TRIM_TRAILING, (yyvsp[0].item)); }
#line 40092 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1508: /* trim_operands_special: BOTH FROM expr */
#line 9866 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.trim).set(TRIM_BOTH, (yyvsp[0].item)); }
#line 40098 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1509: /* trim_operands_special: expr FROM expr */
#line 9867 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.trim).set(TRIM_BOTH, (yyvsp[-2].item), (yyvsp[0].item)); }
#line 40104 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1516: /* column_default_non_parenthesized_expr: param_marker */
#line 9905 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)= (yyvsp[0].item_param); }
#line 40110 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1518: /* column_default_non_parenthesized_expr: sum_expr */
#line 9908 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (!Lex->select_stack_top || Lex->json_table)
{
my_error(ER_INVALID_GROUP_FUNC_USE, MYF(0));
MYSQL_YYABORT;
}
}
#line 40122 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1519: /* column_default_non_parenthesized_expr: window_func_expr */
#line 9916 "/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 40134 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1521: /* column_default_non_parenthesized_expr: ROW_SYM '(' expr ',' expr_list ')' */
#line 9925 "/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 40145 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1522: /* column_default_non_parenthesized_expr: EXISTS '(' subselect ')' */
#line 9932 "/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 40155 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1523: /* column_default_non_parenthesized_expr: '{' ident expr '}' */
#line 9938 "/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 40164 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1524: /* column_default_non_parenthesized_expr: MATCH ident_list_arg AGAINST '(' bit_expr fulltext_options ')' */
#line 9943 "/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 40178 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1525: /* column_default_non_parenthesized_expr: CAST_SYM '(' expr AS cast_type ')' */
#line 9953 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= (yyvsp[-1].Lex_cast_type).create_typecast_item_or_error(thd, (yyvsp[-3].item)))))
MYSQL_YYABORT;
}
#line 40187 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1526: /* column_default_non_parenthesized_expr: CASE_SYM when_list_opt_else END */
#line 9958 "/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 40196 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1527: /* column_default_non_parenthesized_expr: CASE_SYM expr when_list_opt_else END */
#line 9963 "/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 40206 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1528: /* column_default_non_parenthesized_expr: CONVERT_SYM '(' expr ',' cast_type ')' */
#line 9969 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= (yyvsp[-1].Lex_cast_type).create_typecast_item_or_error(thd, (yyvsp[-3].item)))))
MYSQL_YYABORT;
}
#line 40215 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1529: /* column_default_non_parenthesized_expr: CONVERT_SYM '(' expr USING charset_name ')' */
#line 9974 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[-1].charset)= thd->variables.character_set_collations.
get_collation_for_charset(thd, (yyvsp[-1].charset));
(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 40227 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1530: /* column_default_non_parenthesized_expr: DEFAULT '(' simple_ident ')' */
#line 9982 "/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 40242 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1531: /* column_default_non_parenthesized_expr: VALUE_SYM '(' simple_ident_nospvar ')' */
#line 9993 "/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 40253 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1532: /* column_default_non_parenthesized_expr: NEXT_SYM VALUE_SYM FOR_SYM table_ident */
#line 10000 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_func_nextval(thd, (yyvsp[0].table)))))
MYSQL_YYABORT;
}
#line 40262 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1533: /* column_default_non_parenthesized_expr: NEXTVAL_SYM '(' table_ident ')' */
#line 10005 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_func_nextval(thd, (yyvsp[-1].table)))))
MYSQL_YYABORT;
}
#line 40271 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1534: /* column_default_non_parenthesized_expr: PREVIOUS_SYM VALUE_SYM FOR_SYM table_ident */
#line 10010 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_func_lastval(thd, (yyvsp[0].table)))))
MYSQL_YYABORT;
}
#line 40280 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1535: /* column_default_non_parenthesized_expr: LASTVAL_SYM '(' table_ident ')' */
#line 10015 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->create_item_func_lastval(thd, (yyvsp[-1].table)))))
MYSQL_YYABORT;
}
#line 40289 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1536: /* column_default_non_parenthesized_expr: SETVAL_SYM '(' table_ident ',' longlong_num ')' */
#line 10020 "/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 40298 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1537: /* column_default_non_parenthesized_expr: SETVAL_SYM '(' table_ident ',' longlong_num ',' bool ')' */
#line 10025 "/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 40307 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1538: /* column_default_non_parenthesized_expr: SETVAL_SYM '(' table_ident ',' longlong_num ',' bool ',' ulonglong_num ')' */
#line 10030 "/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 40316 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1541: /* primary_expr: '(' parenthesized_expr ')' */
#line 10039 "/home/buildbot/git/sql/sql_yacc.yy"
{ (yyval.item)= (yyvsp[-1].item); }
#line 40322 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1542: /* primary_expr: subquery */
#line 10041 "/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 40331 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1544: /* string_factor_expr: string_factor_expr COLLATE_SYM collation_name */
#line 10050 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= new (thd->mem_root)
Item_func_set_collation(thd, (yyvsp[-2].item), (yyvsp[0].Lex_extended_collation)))))
MYSQL_YYABORT;
}
#line 40341 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1546: /* simple_expr: BINARY simple_expr */
#line 10060 "/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 40351 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1547: /* simple_expr: '+' simple_expr */
#line 10066 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= (yyvsp[0].item);
}
#line 40359 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1548: /* simple_expr: '-' simple_expr */
#line 10070 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= (yyvsp[0].item)->neg(thd);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40369 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1549: /* simple_expr: '~' simple_expr */
#line 10076 "/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 40379 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1550: /* simple_expr: not2 simple_expr */
#line 10082 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= negate_expression(thd, (yyvsp[0].item));
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40389 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1552: /* mysql_concatenation_expr: mysql_concatenation_expr MYSQL_CONCAT_SYM simple_expr */
#line 10092 "/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 40399 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1553: /* function_call_keyword_timestamp: TIMESTAMP '(' expr ')' */
#line 10101 "/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 40410 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1554: /* function_call_keyword_timestamp: TIMESTAMP '(' expr ',' expr ')' */
#line 10108 "/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 40420 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1555: /* function_call_keyword: CHAR_SYM '(' expr_list ')' */
#line 10122 "/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 40430 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1556: /* function_call_keyword: CHAR_SYM '(' expr_list USING charset_name ')' */
#line 10128 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyvsp[-1].charset)= thd->variables.character_set_collations.
get_collation_for_charset(thd, (yyvsp[-1].charset));
(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 40442 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1557: /* function_call_keyword: CURRENT_USER optional_braces */
#line 10136 "/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 40455 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1558: /* function_call_keyword: CURRENT_ROLE optional_braces */
#line 10145 "/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 40468 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1559: /* function_call_keyword: DATE_SYM '(' expr ')' */
#line 10154 "/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;
Lex->set_date_funcs_used_flag();
}
#line 40479 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1560: /* function_call_keyword: DAY_SYM '(' expr ')' */
#line 10161 "/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 40489 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1561: /* function_call_keyword: HOUR_SYM '(' expr ')' */
#line 10167 "/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 40499 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1562: /* function_call_keyword: INSERT '(' expr ',' expr ',' expr ',' expr ')' */
#line 10173 "/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 40509 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1563: /* function_call_keyword: INTERVAL_SYM '(' expr ',' expr ')' */
#line 10179 "/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 40528 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1564: /* function_call_keyword: INTERVAL_SYM '(' expr ',' expr ',' expr_list ')' */
#line 10194 "/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 40543 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1565: /* function_call_keyword: LEFT '(' expr ',' expr ')' */
#line 10205 "/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 40553 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1566: /* function_call_keyword: MINUTE_SYM '(' expr ')' */
#line 10211 "/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 40563 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1567: /* function_call_keyword: MONTH_SYM '(' expr ')' */
#line 10217 "/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;
Lex->set_date_funcs_used_flag();
}
#line 40574 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1568: /* function_call_keyword: RIGHT '(' expr ',' expr ')' */
#line 10224 "/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 40584 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1569: /* function_call_keyword: SECOND_SYM '(' expr ')' */
#line 10230 "/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 40594 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1570: /* function_call_keyword: SQL_SYM PERCENT_ORACLE_SYM ROWCOUNT_SYM */
#line 10236 "/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 40606 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1571: /* function_call_keyword: TIME_SYM '(' expr ')' */
#line 10244 "/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 40617 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1572: /* function_call_keyword: function_call_keyword_timestamp */
#line 10251 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= (yyvsp[0].item);
}
#line 40625 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1573: /* function_call_keyword: TRIM '(' trim_operands ')' */
#line 10255 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Schema::find_implied(thd)->
make_item_func_trim(thd, (yyvsp[-1].trim)))))
MYSQL_YYABORT;
}
#line 40635 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1574: /* function_call_keyword: USER_SYM '(' ')' */
#line 10261 "/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 40647 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1575: /* function_call_keyword: YEAR_SYM '(' expr ')' */
#line 10269 "/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;
Lex->set_date_funcs_used_flag();
}
#line 40658 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1578: /* substring_operands_regular: expr ',' expr ',' expr */
#line 10284 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.substring_spec)= Lex_substring_spec_st::init((yyvsp[-4].item), (yyvsp[-2].item), (yyvsp[0].item));
}
#line 40666 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1579: /* substring_operands_regular: expr ',' expr */
#line 10288 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.substring_spec)= Lex_substring_spec_st::init((yyvsp[-2].item), (yyvsp[0].item));
}
#line 40674 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1580: /* substring_operands_special: expr FROM expr FOR_SYM expr */
#line 10295 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.substring_spec)= Lex_substring_spec_st::init((yyvsp[-4].item), (yyvsp[-2].item), (yyvsp[0].item));
}
#line 40682 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1581: /* substring_operands_special: expr FROM expr */
#line 10299 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.substring_spec)= Lex_substring_spec_st::init((yyvsp[-2].item), (yyvsp[0].item));
}
#line 40690 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1582: /* function_call_nonkeyword: ADDDATE_SYM '(' expr ',' expr ')' */
#line 10319 "/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 40701 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1583: /* function_call_nonkeyword: ADDDATE_SYM '(' expr ',' INTERVAL_SYM expr interval ')' */
#line 10326 "/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 40711 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1584: /* function_call_nonkeyword: CURDATE optional_braces */
#line 10332 "/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 40722 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1585: /* function_call_nonkeyword: CURTIME opt_time_precision */
#line 10339 "/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 40733 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1586: /* function_call_nonkeyword: DATE_ADD_INTERVAL '(' expr ',' INTERVAL_SYM expr interval ')' */
#line 10346 "/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 40743 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1587: /* function_call_nonkeyword: DATE_SUB_INTERVAL '(' expr ',' INTERVAL_SYM expr interval ')' */
#line 10352 "/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 40753 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1588: /* function_call_nonkeyword: EXTRACT_SYM '(' interval FROM expr ')' */
#line 10358 "/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 40763 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1589: /* function_call_nonkeyword: GET_FORMAT '(' date_time_type ',' expr ')' */
#line 10364 "/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 40773 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1590: /* function_call_nonkeyword: NOW_SYM opt_time_precision */
#line 10370 "/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 40784 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1591: /* function_call_nonkeyword: POSITION_SYM '(' bit_expr IN_SYM expr ')' */
#line 10377 "/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 40794 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1592: /* function_call_nonkeyword: ROWNUM_SYM optional_braces */
#line 10388 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= new (thd->mem_root) Item_func_rownum(thd);
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40804 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1593: /* function_call_nonkeyword: SUBDATE_SYM '(' expr ',' expr ')' */
#line 10394 "/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 40815 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1594: /* function_call_nonkeyword: SUBDATE_SYM '(' expr ',' INTERVAL_SYM expr interval ')' */
#line 10401 "/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 40825 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1595: /* function_call_nonkeyword: SUBSTRING '(' substring_operands ')' */
#line 10407 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Schema::find_implied(thd)->
make_item_func_substr(thd, (yyvsp[-1].substring_spec)))))
MYSQL_YYABORT;
}
#line 40835 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1596: /* function_call_nonkeyword: SYSDATE */
#line 10414 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->make_item_func_sysdate(thd, 0))))
MYSQL_YYABORT;
}
#line 40844 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1597: /* function_call_nonkeyword: SYSDATE '(' ')' */
#line 10420 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->make_item_func_sysdate(thd, 0))))
MYSQL_YYABORT;
}
#line 40853 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1598: /* function_call_nonkeyword: SYSDATE '(' real_ulong_num ')' */
#line 10425 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Lex->make_item_func_sysdate(thd, (uint) (yyvsp[-1].ulong_num)))))
MYSQL_YYABORT;
}
#line 40862 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1599: /* function_call_nonkeyword: TIMESTAMP_ADD '(' interval_time_stamp ',' expr ',' expr ')' */
#line 10430 "/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 40872 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1600: /* function_call_nonkeyword: TIMESTAMP_DIFF '(' interval_time_stamp ',' expr ',' expr ')' */
#line 10436 "/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 40882 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1601: /* function_call_nonkeyword: TRIM_ORACLE '(' trim_operands ')' */
#line 10442 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= (yyvsp[-1].trim).make_item_func_trim_oracle(thd))))
MYSQL_YYABORT;
}
#line 40891 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1602: /* function_call_nonkeyword: UTC_DATE_SYM optional_braces */
#line 10447 "/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 40902 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1603: /* function_call_nonkeyword: UTC_TIME_SYM opt_time_precision */
#line 10454 "/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 40913 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1604: /* function_call_nonkeyword: UTC_TIMESTAMP_SYM opt_time_precision */
#line 10461 "/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 40924 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1605: /* function_call_nonkeyword: COLUMN_ADD_SYM '(' expr ',' dyncall_create_list ')' */
#line 10469 "/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 40934 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1606: /* function_call_nonkeyword: COLUMN_DELETE_SYM '(' expr ',' expr_list ')' */
#line 10476 "/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 40944 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1607: /* function_call_nonkeyword: COLUMN_CREATE_SYM '(' dyncall_create_list ')' */
#line 10483 "/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 40954 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1608: /* function_call_nonkeyword: COLUMN_GET_SYM '(' expr ',' expr AS cast_type ')' */
#line 10490 "/home/buildbot/git/sql/sql_yacc.yy"
{
(yyval.item)= create_func_dyncol_get(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].Lex_cast_type).type_handler(),
(yyvsp[-1].Lex_cast_type), (yyvsp[-1].Lex_cast_type).charset());
if (unlikely((yyval.item) == NULL))
MYSQL_YYABORT;
}
#line 40965 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1609: /* function_call_conflict: ASCII_SYM '(' expr ')' */
#line 10505 "/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 40975 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1610: /* function_call_conflict: CHARSET '(' expr ')' */
#line 10511 "/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 40985 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1611: /* function_call_conflict: IF_SYM '(' expr ',' expr ',' expr ')' */
#line 10517 "/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 40995 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1612: /* function_call_conflict: LAST_VALUE '(' expr ')' */
#line 10526 "/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 41010 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1613: /* function_call_conflict: LAST_VALUE '(' expr_list ',' expr ')' */
#line 10537 "/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 41021 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1614: /* function_call_conflict: MOD_SYM '(' expr ',' expr ')' */
#line 10544 "/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 41031 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1615: /* function_call_conflict: PASSWORD_SYM '(' expr ')' */
#line 10550 "/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 41043 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1616: /* function_call_conflict: REPEAT_SYM '(' expr ',' expr ')' */
#line 10558 "/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 41053 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1617: /* function_call_conflict: REPLACE '(' expr ',' expr ',' expr ')' */
#line 10564 "/home/buildbot/git/sql/sql_yacc.yy"
{
if (unlikely(!((yyval.item)= Schema::find_implied(thd)->
make_item_func_replace(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item)))))
MYSQL_YYABORT;
}
#line 41063 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1618: /* function_call_conflict: TRUNCATE_SYM '(' expr ',' expr ')' */
#line 10570 "/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 41073 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1619: /* function_call_conflict: WEIGHT_STRING_SYM '(' expr opt_ws_levels ')' */
#line 10576 "/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 41083 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1620: /* function_call_conflict: WEIGHT_STRING_SYM '(' expr AS CHAR_SYM ws_nweights opt_ws_levels ')' */
#line 10582 "/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 41095 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1621: /* function_call_conflict: WEIGHT_STRING_SYM '(' expr AS BINARY ws_nweights ')' */
#line 10590 "/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 41111 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1622: /* function_call_conflict: WEIGHT_STRING_SYM '(' expr ',' ulong_num ',' ulong_num ',' ulong_num ')' */
#line 10602 "/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 41122 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1623: /* @142: %empty */
#line 10621 "/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 41145 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
break;
case 1624: /* function_call_generic: ident_func '(' @142 opt_udf_expr_list ')' */
#line 10640 "/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