diff options
author | Mikael Ronström <mikael@dator9> | 2011-05-12 14:29:32 +0200 |
---|---|---|
committer | Mikael Ronström <mikael@dator9> | 2011-05-12 14:29:32 +0200 |
commit | 43c55e9a01fed3babab6e53eac2aed388f3ed2dc (patch) | |
tree | b38b221786a2d3d9fc1ff6572ad859f7aeacde27 /sql/sql_base.cc | |
parent | 385551271556a8a4f1c9b669a91cb08adf33a89f (diff) | |
parent | 30265fd178745430101cfe6e15e02fa3dbc28797 (diff) | |
download | mariadb-git-43c55e9a01fed3babab6e53eac2aed388f3ed2dc.tar.gz |
merge
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 628e3b49719..f9d85b1e024 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -7602,9 +7602,10 @@ static bool setup_natural_join_row_types(THD *thd, List<TABLE_LIST> *from_clause, Name_resolution_context *context) { + DBUG_ENTER("setup_natural_join_row_types"); thd->where= "from clause"; if (from_clause->elements == 0) - return FALSE; /* We come here in the case of UNIONs. */ + DBUG_RETURN(false); /* We come here in the case of UNIONs. */ List_iterator_fast<TABLE_LIST> table_ref_it(*from_clause); TABLE_LIST *table_ref; /* Current table reference. */ @@ -7612,10 +7613,6 @@ static bool setup_natural_join_row_types(THD *thd, TABLE_LIST *left_neighbor; /* Table reference to the right of the current. */ TABLE_LIST *right_neighbor= NULL; - bool save_first_natural_join_processing= - context->select_lex->first_natural_join_processing; - - context->select_lex->first_natural_join_processing= FALSE; /* Note that tables in the list are in reversed order */ for (left_neighbor= table_ref_it++; left_neighbor ; ) @@ -7627,12 +7624,11 @@ static bool setup_natural_join_row_types(THD *thd, 1) for stored procedures, 2) for multitable update after lock failure and table reopening. */ - if (save_first_natural_join_processing) + if (context->select_lex->first_natural_join_processing) { - context->select_lex->first_natural_join_processing= FALSE; if (store_top_level_join_columns(thd, table_ref, left_neighbor, right_neighbor)) - return TRUE; + DBUG_RETURN(true); if (left_neighbor) { TABLE_LIST *first_leaf_on_the_right; @@ -7652,8 +7648,9 @@ static bool setup_natural_join_row_types(THD *thd, DBUG_ASSERT(right_neighbor); context->first_name_resolution_table= right_neighbor->first_leaf_for_name_resolution(); + context->select_lex->first_natural_join_processing= false; - return FALSE; + DBUG_RETURN (false); } |