diff options
author | gkodinov/kgeorge@macbook.gmz <> | 2007-01-23 12:34:50 +0200 |
---|---|---|
committer | gkodinov/kgeorge@macbook.gmz <> | 2007-01-23 12:34:50 +0200 |
commit | 17a0207ecee35c82e0a488b900d0e6279a596577 (patch) | |
tree | ef50ee2680b393a9652b2c98dfe15de22de7f795 /sql/sql_lex.cc | |
parent | c9df1caac83eac107acb0acfecf3b0a950e7ffa5 (diff) | |
parent | 884713fb08418ae819ba39a5429a3dd18586c423 (diff) | |
download | mariadb-git-17a0207ecee35c82e0a488b900d0e6279a596577.tar.gz |
Merge macbook.gmz:/Users/kgeorge/mysql/work/mysql-5.0-opt
into macbook.gmz:/Users/kgeorge/mysql/work/merge-5.1-opt
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 18d30494701..9c59b98f4e6 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -1209,6 +1209,8 @@ void st_select_lex::init_select() offset_limit= 0; /* denotes the default offset = 0 */ with_sum_func= 0; is_correlated= 0; + cur_pos_in_select_list= UNDEF_POS; + non_agg_fields.empty(); } /* @@ -1398,9 +1400,17 @@ void st_select_lex::mark_as_dependent(SELECT_LEX *last) if (!(s->uncacheable & UNCACHEABLE_DEPENDENT)) { // Select is dependent of outer select - s->uncacheable|= UNCACHEABLE_DEPENDENT; + s->uncacheable= (s->uncacheable & ~UNCACHEABLE_UNITED) | + UNCACHEABLE_DEPENDENT; SELECT_LEX_UNIT *munit= s->master_unit(); - munit->uncacheable|= UNCACHEABLE_DEPENDENT; + munit->uncacheable= (munit->uncacheable & ~UNCACHEABLE_UNITED) | + UNCACHEABLE_DEPENDENT; + for (SELECT_LEX *sl= munit->first_select(); sl ; sl= sl->next_select()) + { + if (sl != s && + !(sl->uncacheable & (UNCACHEABLE_DEPENDENT | UNCACHEABLE_UNITED))) + sl->uncacheable|= UNCACHEABLE_UNITED; + } } is_correlated= TRUE; this->master_unit()->item->is_correlated= TRUE; |