diff options
author | unknown <bell@sanja.is.com.ua> | 2003-08-01 18:24:27 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2003-08-01 18:24:27 +0300 |
commit | 875a26d50a7685def420be8712068f8e880adf7e (patch) | |
tree | de5617c39a1d780f524e2dd50c59216b6e5d6290 /sql/item.cc | |
parent | c44af18bd59a2ab4ff80fe1d82a6053dbccc8647 (diff) | |
parent | 668cd9729f8f1a35ebd6eb95bec9b612b7596f16 (diff) | |
download | mariadb-git-875a26d50a7685def420be8712068f8e880adf7e.tar.gz |
merge
sql/item.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sql/item.cc b/sql/item.cc index 0a3ed39bac7..48f9dfea4e1 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -870,7 +870,7 @@ bool Item_field::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) sl= sl->outer_select()) { table_list= (last= sl)->get_table_list(); - if (sl->insert_select && table_list) + if (sl->resolve_mode == SELECT_LEX::INSERT_MODE && table_list) { // it is primary INSERT st_select_lex => skip first table resolving table_list= table_list->next; @@ -879,7 +879,8 @@ bool Item_field::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) table_list, &where, 0)) != not_found_field) break; - if ((refer= find_item_in_list(this, sl->item_list, &counter, + if (sl->resolve_mode == SELECT_LEX::SELECT_MODE && + (refer= find_item_in_list(this, sl->item_list, &counter, REPORT_EXCEPT_NOT_FOUND)) != (Item **) not_found_item) break; @@ -1356,13 +1357,15 @@ bool Item_ref::fix_fields(THD *thd,TABLE_LIST *tables, Item **reference) SELECT_LEX *last=0; for ( ; sl ; sl= sl->outer_select()) { - if ((ref= find_item_in_list(this, (last= sl)->item_list, + last= sl; + if (sl->resolve_mode == SELECT_LEX::SELECT_MODE && + (ref= find_item_in_list(this, sl->item_list, &counter, REPORT_EXCEPT_NOT_FOUND)) != (Item **)not_found_item) break; table_list= sl->get_table_list(); - if (sl->insert_select && table_list) + if (sl->resolve_mode == SELECT_LEX::INSERT_MODE && table_list) { // it is primary INSERT st_select_lex => skip first table resolving table_list= table_list->next; |