diff options
author | Sinisa@sinisa.nasamreza.org <> | 2002-11-30 23:13:00 +0200 |
---|---|---|
committer | Sinisa@sinisa.nasamreza.org <> | 2002-11-30 23:13:00 +0200 |
commit | ba053ef95007e3f4fa95b3dedef887c998d15f7d (patch) | |
tree | 6caecef56f9ecb49b3d23266ef0b0581f4522c98 | |
parent | 1b625220ba4a061670186a4cb563ab23ae42be4e (diff) | |
download | mariadb-git-ba053ef95007e3f4fa95b3dedef887c998d15f7d.tar.gz |
A better fix
-rw-r--r-- | sql/item.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/item.cc b/sql/item.cc index 1e25af13fb2..180a558da37 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -538,8 +538,8 @@ bool Item_field::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) SELECT_LEX *cursel=(SELECT_LEX *) thd->lex.current_select; // Prevent using outer fields in subselects, that is not supported now if (cursel->linkage != DERIVED_TABLE_TYPE) - for (SELECT_LEX *sl= (cursel->get_master()->linkage == GLOBAL_OPTIONS_TYPE && - cursel->get_master()->order_list.elements) ? cursel->select_lex() + for (SELECT_LEX *sl= (cursel->get_master()->order_list.elements) ? + cursel->select_lex() : cursel->outer_select(); sl; sl= sl->outer_select()) |