diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2010-03-20 15:01:47 +0300 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2010-03-20 15:01:47 +0300 |
commit | 7df026676b6d845cc0ed7a7437995c3019a5f42d (patch) | |
tree | dc051ac4712ac159b52fc2b48e5dd918cbc39799 /sql/sql_lex.cc | |
parent | f59d1dcf0acc12c482c28c902a0030f12ba263af (diff) | |
parent | f09ca00e088b316441bb76e97ba097bc9f3da7d3 (diff) | |
download | mariadb-git-7df026676b6d845cc0ed7a7437995c3019a5f42d.tar.gz |
Merge MariaDB-5.2 -> MariaDB 5.3
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 4514d428f13..af2c33c51dd 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -790,9 +790,9 @@ int MYSQLlex(void *arg, void *yythd) Lex_input_stream *lip= & thd->m_parser_state->m_lip; LEX *lex= thd->lex; YYSTYPE *yylval=(YYSTYPE*) arg; - CHARSET_INFO *cs= thd->charset(); - uchar *state_map= cs->state_map; - uchar *ident_map= cs->ident_map; + CHARSET_INFO *const cs= thd->charset(); + const uchar *const state_map= cs->state_map; + const uchar *const ident_map= cs->ident_map; LINT_INIT(c); lip->yylval=yylval; // The global state @@ -1843,13 +1843,15 @@ void st_select_lex_unit::exclude_tree() bool st_select_lex::mark_as_dependent(THD *thd, st_select_lex *last, Item *dependency) { + + DBUG_ASSERT(this != last); + /* Mark all selects from resolved to 1 before select where was found table as depended (of select where was found table) */ - for (SELECT_LEX *s= this; - s && s != last; - s= s->outer_select()) + SELECT_LEX *s= this; + do { if (!(s->uncacheable & UNCACHEABLE_DEPENDENT)) { @@ -1871,7 +1873,7 @@ bool st_select_lex::mark_as_dependent(THD *thd, st_select_lex *last, Item *depen if (subquery_expr && subquery_expr->mark_as_dependent(thd, last, dependency)) return TRUE; - } + } while ((s= s->outer_select()) != last && s != 0); is_correlated= TRUE; this->master_unit()->item->is_correlated= TRUE; return FALSE; |