diff options
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/sql/item.cc b/sql/item.cc index 301d2990e0b..417f05680cf 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -53,16 +53,16 @@ Item::Item(): thd->free_list= this; /* Item constructor can be called during execution other then SQL_COM - command => we should check thd->lex.current_select on zero (thd->lex + command => we should check thd->lex->current_select on zero (thd->lex can be uninitialised) */ - if (thd->lex.current_select) + if (thd->lex->current_select) { SELECT_LEX_NODE::enum_parsing_place place= - thd->lex.current_select->parsing_place; + thd->lex->current_select->parsing_place; if (place == SELECT_LEX_NODE::SELECT_LIST || place == SELECT_LEX_NODE::IN_HAVING) - thd->lex.current_select->select_n_having_items++; + thd->lex->current_select->select_n_having_items++; } } @@ -802,7 +802,7 @@ static void mark_as_dependent(THD *thd, SELECT_LEX *last, SELECT_LEX *current, // store pointer on SELECT_LEX from wich item is dependent item->depended_from= last; current->mark_as_dependent(last); - if (thd->lex.describe & DESCRIBE_EXTENDED) + if (thd->lex->describe & DESCRIBE_EXTENDED) { char warn_buff[MYSQL_ERRMSG_SIZE]; sprintf(warn_buff, ER(ER_WARN_FIELD_RESOLVED), @@ -843,7 +843,7 @@ bool Item_field::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) Item **refer= (Item **)not_found_item; uint counter; // Prevent using outer fields in subselects, that is not supported now - SELECT_LEX *cursel=(SELECT_LEX *) thd->lex.current_select; + SELECT_LEX *cursel= (SELECT_LEX *) thd->lex->current_select; if (cursel->master_unit()->first_select()->linkage != DERIVED_TABLE_TYPE) { SELECT_LEX_UNIT *prev_unit= cursel->master_unit(); @@ -1439,7 +1439,7 @@ bool Item_ref::fix_fields(THD *thd,TABLE_LIST *tables, Item **reference) { TABLE_LIST *where= 0, *table_list; bool upward_lookup= 0; - SELECT_LEX_UNIT *prev_unit= thd->lex.current_select->master_unit(); + SELECT_LEX_UNIT *prev_unit= thd->lex->current_select->master_unit(); SELECT_LEX *sl= prev_unit->outer_select(); /* Finding only in current select will be performed for selects that have @@ -1447,10 +1447,10 @@ bool Item_ref::fix_fields(THD *thd,TABLE_LIST *tables, Item **reference) fields for now) */ if ((ref= find_item_in_list(this, - *(thd->lex.current_select->get_item_list()), + *(thd->lex->current_select->get_item_list()), &counter, ((sl && - thd->lex.current_select->master_unit()-> + thd->lex->current_select->master_unit()-> first_select()->linkage != DERIVED_TABLE_TYPE) ? REPORT_EXCEPT_NOT_FOUND : @@ -1526,7 +1526,7 @@ bool Item_ref::fix_fields(THD *thd,TABLE_LIST *tables, Item **reference) { // Call to report error find_item_in_list(this, - *(thd->lex.current_select->get_item_list()), + *(thd->lex->current_select->get_item_list()), &counter, REPORT_ALL_ERRORS); } @@ -1539,7 +1539,7 @@ bool Item_ref::fix_fields(THD *thd,TABLE_LIST *tables, Item **reference) Item_field* fld; if (!((*reference)= fld= new Item_field(tmp))) return 1; - mark_as_dependent(thd, last, thd->lex.current_select, fld); + mark_as_dependent(thd, last, thd->lex->current_select, fld); return 0; } else @@ -1550,7 +1550,7 @@ bool Item_ref::fix_fields(THD *thd,TABLE_LIST *tables, Item **reference) "forward reference in item list"); return -1; } - mark_as_dependent(thd, last, thd->lex.current_select, + mark_as_dependent(thd, last, thd->lex->current_select, this); ref= last->ref_pointer_array + counter; } @@ -1565,7 +1565,7 @@ bool Item_ref::fix_fields(THD *thd,TABLE_LIST *tables, Item **reference) "forward reference in item list"); return -1; } - ref= thd->lex.current_select->ref_pointer_array + counter; + ref= thd->lex->current_select->ref_pointer_array + counter; } } @@ -1578,8 +1578,8 @@ bool Item_ref::fix_fields(THD *thd,TABLE_LIST *tables, Item **reference) */ if (((*ref)->with_sum_func && name && (depended_from || - !(thd->lex.current_select->linkage != GLOBAL_OPTIONS_TYPE && - thd->lex.current_select->having_fix_field))) || + !(thd->lex->current_select->linkage != GLOBAL_OPTIONS_TYPE && + thd->lex->current_select->having_fix_field))) || !(*ref)->fixed) { my_error(ER_ILLEGAL_REFERENCE, MYF(0), name, |