diff options
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r-- | sql/sql_yacc.yy | 57 |
1 files changed, 26 insertions, 31 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 841c0f19c1e..4b99f887721 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1200,7 +1200,7 @@ statement: deallocate: deallocate_or_drop PREPARE_SYM ident { - THD *thd=YYTHD; + THD *thd= YYTHD; LEX *lex= thd->lex; if (lex->stmt_prepare_mode) { @@ -1220,7 +1220,7 @@ deallocate_or_drop: prepare: PREPARE_SYM ident FROM prepare_src { - THD *thd=YYTHD; + THD *thd= YYTHD; LEX *lex= thd->lex; if (lex->stmt_prepare_mode) { @@ -1234,14 +1234,14 @@ prepare: prepare_src: TEXT_STRING_sys { - THD *thd=YYTHD; + THD *thd= YYTHD; LEX *lex= thd->lex; lex->prepared_stmt_code= $1; lex->prepared_stmt_code_is_varref= FALSE; } | '@' ident_or_text { - THD *thd=YYTHD; + THD *thd= YYTHD; LEX *lex= thd->lex; lex->prepared_stmt_code= $2; lex->prepared_stmt_code_is_varref= TRUE; @@ -1250,7 +1250,7 @@ prepare_src: execute: EXECUTE_SYM ident { - THD *thd=YYTHD; + THD *thd= YYTHD; LEX *lex= thd->lex; if (lex->stmt_prepare_mode) { @@ -1411,7 +1411,7 @@ create: CREATE opt_table_options TABLE_SYM opt_if_not_exists table_ident { THD *thd= YYTHD; - LEX *lex=Lex; + LEX *lex= thd->lex; lex->sql_command= SQLCOM_CREATE_TABLE; if (!lex->select_lex.add_table_to_list(thd, $5, NULL, TL_OPTION_UPDATING, @@ -1789,7 +1789,7 @@ create_function_tail: RETURNS_SYM udf_type SONAME_SYM TEXT_STRING_sys { THD *thd= YYTHD; - LEX *lex=Lex; + LEX *lex= thd->lex; if (lex->definer != NULL) { /* @@ -1896,7 +1896,7 @@ create_function_tail: sp_proc_stmt { THD *thd= YYTHD; - LEX *lex= Lex; + LEX *lex= thd->lex; sp_head *sp= lex->sphead; if (sp->is_not_allowed_in_function("function")) @@ -3436,8 +3436,8 @@ create2: create3 {} | LIKE table_ident { - LEX *lex=Lex; - THD *thd= lex->thd; + THD *thd= YYTHD; + LEX *lex= thd->lex; if (!(lex->like_name= $2)) YYABORT; if ($2->db.str == NULL && @@ -3448,8 +3448,8 @@ create2: } | '(' LIKE table_ident ')' { - LEX *lex=Lex; - THD *thd= lex->thd; + THD *thd= YYTHD; + LEX *lex= thd->lex; if (!(lex->like_name= $3)) YYABORT; if ($3->db.str == NULL && @@ -3891,8 +3891,8 @@ part_bit_expr: { Item *part_expr= $1; int part_expression_ok= 1; - LEX *lex= Lex; THD *thd= YYTHD; + LEX *lex= thd->lex; Name_resolution_context *context= &lex->current_select->context; TABLE_LIST *save_list= context->table_list; const char *save_where= thd->where; @@ -4939,8 +4939,8 @@ alter: } opt_create_database_options { - LEX *lex=Lex; - THD *thd= Lex->thd; + THD *thd= YYTHD; + LEX *lex= thd->lex; lex->sql_command=SQLCOM_ALTER_DB; lex->name= $3; if (lex->name.str == NULL && @@ -5377,8 +5377,8 @@ alter_list_item: } | RENAME opt_to table_ident { - LEX *lex=Lex; - THD *thd= lex->thd; + THD *thd= YYTHD; + LEX *lex= thd->lex; uint dummy; lex->select_lex.db=$3->db.str; if (lex->select_lex.db == NULL && @@ -6673,7 +6673,7 @@ function_call_generic: udf_expr_list ')' { THD *thd= YYTHD; - LEX *lex= Lex; + LEX *lex= thd->lex; Create_func *builder; Item *item= NULL; @@ -6696,7 +6696,6 @@ function_call_generic: #ifdef HAVE_DLOPEN /* Retrieving the result of find_udf */ udf_func *udf= $<udf>3; - LEX *lex= Lex; if (udf) { @@ -7090,7 +7089,6 @@ join_table: | table_ref normal_join table_ref USING { - SELECT_LEX *sel= Select; YYERROR_UNLESS($1 && $3); } '(' using_list ')' @@ -7121,7 +7119,6 @@ join_table: } | table_ref LEFT opt_outer JOIN_SYM table_factor { - SELECT_LEX *sel= Select; YYERROR_UNLESS($1 && $5); } USING '(' using_list ')' @@ -7155,7 +7152,6 @@ join_table: } | table_ref RIGHT opt_outer JOIN_SYM table_factor { - SELECT_LEX *sel= Select; YYERROR_UNLESS($1 && $5); } USING '(' using_list ')' @@ -9083,7 +9079,7 @@ text_string: param_marker: PARAM_MARKER { - THD *thd=YYTHD; + THD *thd= YYTHD; LEX *lex= thd->lex; Item_param *item; if (! lex->parsing_options.allows_variable) @@ -10071,7 +10067,7 @@ option_value: | charset old_or_new_charset_name_or_default { THD *thd= YYTHD; - LEX *lex= Lex; + LEX *lex= thd->lex; $2= $2 ? $2: global_system_variables.character_set_client; lex->var_list.push_back(new set_var_collation_client($2,thd->variables.collation_database,$2)); } @@ -10105,9 +10101,9 @@ option_value: } | PASSWORD equal text_or_password { - THD *thd=YYTHD; + THD *thd= YYTHD; + LEX *lex= thd->lex; LEX_USER *user; - LEX *lex= Lex; sp_pcontext *spc= lex->spcont; LEX_STRING pw; @@ -10588,8 +10584,8 @@ require_list_element: grant_ident: '*' { - LEX *lex= Lex; - THD *thd= lex->thd; + THD *thd= YYTHD; + LEX *lex= thd->lex; uint dummy; if (thd->copy_db_to(&lex->current_select->db, &dummy)) YYABORT; @@ -10952,7 +10948,6 @@ subselect: } | '(' subselect_start subselect ')' { - LEX *lex= Lex; THD *thd= YYTHD; /* note that a local variable can't be used for @@ -11152,7 +11147,7 @@ view_select: view_select_aux: SELECT_SYM remember_name select_init2 { - THD *thd=YYTHD; + THD *thd= YYTHD; LEX *lex= thd->lex; char *stmt_beg= (lex->sphead ? (char *)lex->sphead->m_tmp_query : @@ -11161,7 +11156,7 @@ view_select_aux: } | '(' remember_name select_paren ')' union_opt { - THD *thd=YYTHD; + THD *thd= YYTHD; LEX *lex= thd->lex; char *stmt_beg= (lex->sphead ? (char *)lex->sphead->m_tmp_query : |