diff options
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r-- | sql/sql_yacc.yy | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 10186806f05..1c673f4ca42 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -526,8 +526,7 @@ set_trigger_new_row(THD *thd, LEX_STRING *name, Item *val) Let us add this item to list of all Item_trigger_field objects in trigger. */ - lex->trg_table_fields.link_in_list((uchar *) trg_fld, - (uchar **) &trg_fld->next_trg_field); + lex->trg_table_fields.link_in_list(trg_fld, &trg_fld->next_trg_field); return lex->sphead->add_instr(sp_fld); } @@ -5124,7 +5123,7 @@ create_table_option: */ TABLE_LIST *last_non_sel_table= lex->create_last_non_select_table; DBUG_ASSERT(last_non_sel_table->next_global == - (TABLE_LIST *)lex->create_info.merge_list.first); + lex->create_info.merge_list.first); last_non_sel_table->next_global= 0; Lex->query_tables_last= &last_non_sel_table->next_global; @@ -6166,8 +6165,7 @@ alter: MYSQL_YYABORT; lex->col_list.empty(); lex->select_lex.init_order(); - lex->select_lex.db= - ((TABLE_LIST*) lex->select_lex.table_list.first)->db; + lex->select_lex.db= (lex->select_lex.table_list.first)->db; bzero((char*) &lex->create_info,sizeof(lex->create_info)); lex->create_info.db_type= 0; lex->create_info.default_table_charset= NULL; @@ -7231,8 +7229,8 @@ select_from: opt_order_clause opt_limit_clause procedure_clause { Select->context.table_list= - Select->context.first_name_resolution_table= - (TABLE_LIST *) Select->table_list.first; + Select->context.first_name_resolution_table= + Select->table_list.first; } | FROM DUAL_SYM where_clause opt_limit_clause /* oracle compatibility: oracle always requires FROM clause, @@ -8924,9 +8922,8 @@ opt_gorder_clause: | order_clause { SELECT_LEX *select= Select; - select->gorder_list= - (SQL_LIST*) sql_memdup((char*) &select->order_list, - sizeof(st_sql_list)); + select->gorder_list= new (YYTHD->mem_root) + SQL_I_List<ORDER>(select->order_list); if (select->gorder_list == NULL) MYSQL_YYABORT; select->order_list.empty(); @@ -9984,7 +9981,7 @@ procedure_clause: } lex->proc_list.elements=0; lex->proc_list.first=0; - lex->proc_list.next= (uchar**) &lex->proc_list.first; + lex->proc_list.next= &lex->proc_list.first; Item_field *item= new (YYTHD->mem_root) Item_field(&lex->current_select->context, NULL, NULL, $2.str); @@ -11949,8 +11946,8 @@ simple_ident_q: Let us add this item to list of all Item_trigger_field objects in trigger. */ - lex->trg_table_fields.link_in_list((uchar*) trg_fld, - (uchar**) &trg_fld->next_trg_field); + lex->trg_table_fields.link_in_list(trg_fld, + &trg_fld->next_trg_field); $$= trg_fld; } @@ -12036,7 +12033,7 @@ field_ident: ident { $$=$1;} | ident '.' ident '.' ident { - TABLE_LIST *table= (TABLE_LIST*) Select->table_list.first; + TABLE_LIST *table= Select->table_list.first; if (my_strcasecmp(table_alias_charset, $1.str, table->db)) { my_error(ER_WRONG_DB_NAME, MYF(0), $1.str); @@ -12052,7 +12049,7 @@ field_ident: } | ident '.' ident { - TABLE_LIST *table= (TABLE_LIST*) Select->table_list.first; + TABLE_LIST *table= Select->table_list.first; if (my_strcasecmp(table_alias_charset, $1.str, table->alias)) { my_error(ER_WRONG_TABLE_NAME, MYF(0), $1.str); |