@@ -7594,20 +7594,17 @@ static bool setup_natural_join_row_types(THD *thd,
7594
7594
List<TABLE_LIST> *from_clause,
7595
7595
Name_resolution_context *context)
7596
7596
{
7597
+ DBUG_ENTER (" setup_natural_join_row_types" );
7597
7598
thd->where = " from clause" ;
7598
7599
if (from_clause->elements == 0 )
7599
- return FALSE ; /* We come here in the case of UNIONs. */
7600
+ DBUG_RETURN ( false ) ; /* We come here in the case of UNIONs. */
7600
7601
7601
7602
List_iterator_fast<TABLE_LIST> table_ref_it (*from_clause);
7602
7603
TABLE_LIST *table_ref; /* Current table reference. */
7603
7604
/* Table reference to the left of the current. */
7604
7605
TABLE_LIST *left_neighbor;
7605
7606
/* Table reference to the right of the current. */
7606
7607
TABLE_LIST *right_neighbor= NULL ;
7607
- bool save_first_natural_join_processing=
7608
- context->select_lex ->first_natural_join_processing ;
7609
-
7610
- context->select_lex ->first_natural_join_processing = FALSE ;
7611
7608
7612
7609
/* Note that tables in the list are in reversed order */
7613
7610
for (left_neighbor= table_ref_it++; left_neighbor ; )
@@ -7619,12 +7616,11 @@ static bool setup_natural_join_row_types(THD *thd,
7619
7616
1) for stored procedures,
7620
7617
2) for multitable update after lock failure and table reopening.
7621
7618
*/
7622
- if (save_first_natural_join_processing )
7619
+ if (context-> select_lex -> first_natural_join_processing )
7623
7620
{
7624
- context->select_lex ->first_natural_join_processing = FALSE ;
7625
7621
if (store_top_level_join_columns (thd, table_ref,
7626
7622
left_neighbor, right_neighbor))
7627
- return TRUE ;
7623
+ DBUG_RETURN ( true ) ;
7628
7624
if (left_neighbor)
7629
7625
{
7630
7626
TABLE_LIST *first_leaf_on_the_right;
@@ -7644,8 +7640,9 @@ static bool setup_natural_join_row_types(THD *thd,
7644
7640
DBUG_ASSERT (right_neighbor);
7645
7641
context->first_name_resolution_table =
7646
7642
right_neighbor->first_leaf_for_name_resolution ();
7643
+ context->select_lex ->first_natural_join_processing = false ;
7647
7644
7648
- return FALSE ;
7645
+ DBUG_RETURN ( false ) ;
7649
7646
}
7650
7647
7651
7648
0 commit comments