summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authorevgen@moonbone.local <>2005-10-09 23:05:44 +0400
committerevgen@moonbone.local <>2005-10-09 23:05:44 +0400
commit6bfc2d4b895120378a26e24eaa1b732f103d7ae2 (patch)
tree11e5404006a3237d9df5e8670a681adb0687bfd6 /sql/sql_lex.cc
parenta8bdf632d3cd52d97f2c9fac3cc87c257b080982 (diff)
downloadmariadb-git-6bfc2d4b895120378a26e24eaa1b732f103d7ae2.tar.gz
Fix bug#7672 Unknown column error in order clause
When fixing Item_func_plus in ORDER BY clause field c is searched in all opened tables, but because c is an alias it wasn't found there. This patch adds a flag to select_lex which allows Item_field::fix_fields() to look up in select's item_list to find aliased fields.
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 20aacf42be0..9fb35e3f914 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -154,6 +154,7 @@ LEX *lex_start(THD *thd, uchar *buf,uint length)
lex->slave_thd_opt=0;
lex->sql_command=SQLCOM_END;
bzero((char *)&lex->mi,sizeof(lex->mi));
+ lex->select_lex.is_item_list_lookup= 0;
return lex;
}