@@ -1129,23 +1129,24 @@ bool mysql_derived_reinit(THD *thd, LEX *lex, TABLE_LIST *derived)
1129
1129
1130
1130
bool pushdown_cond_for_derived (THD *thd, Item *cond, TABLE_LIST *derived)
1131
1131
{
1132
+ DBUG_ENTER (" pushdown_cond_for_derived" );
1132
1133
if (!cond)
1133
- return false ;
1134
+ DBUG_RETURN ( false ) ;
1134
1135
1135
1136
st_select_lex_unit *unit= derived->get_unit ();
1136
1137
st_select_lex *sl= unit->first_select ();
1137
1138
1138
1139
/* Do not push conditions into constant derived */
1139
1140
if (unit->executed )
1140
- return false ;
1141
+ DBUG_RETURN ( false ) ;
1141
1142
1142
1143
/* Do not push conditions into recursive with tables */
1143
1144
if (derived->is_recursive_with_table ())
1144
- return false ;
1145
+ DBUG_RETURN ( false ) ;
1145
1146
1146
1147
/* Do not push conditions into unit with global ORDER BY ... LIMIT */
1147
1148
if (unit->fake_select_lex && unit->fake_select_lex ->explicit_limit )
1148
- return false ;
1149
+ DBUG_RETURN ( false ) ;
1149
1150
1150
1151
/* Check whether any select of 'unit' allows condition pushdown */
1151
1152
bool some_select_allows_cond_pushdown= false ;
@@ -1158,7 +1159,7 @@ bool pushdown_cond_for_derived(THD *thd, Item *cond, TABLE_LIST *derived)
1158
1159
}
1159
1160
}
1160
1161
if (!some_select_allows_cond_pushdown)
1161
- return false ;
1162
+ DBUG_RETURN ( false );
1162
1163
1163
1164
/*
1164
1165
Build the most restrictive condition extractable from 'cond'
@@ -1173,7 +1174,7 @@ bool pushdown_cond_for_derived(THD *thd, Item *cond, TABLE_LIST *derived)
1173
1174
if (!extracted_cond)
1174
1175
{
1175
1176
/* Nothing can be pushed into the derived table */
1176
- return false ;
1177
+ DBUG_RETURN ( false ) ;
1177
1178
}
1178
1179
/* Push extracted_cond into every select of the unit specifying 'derived' */
1179
1180
st_select_lex *save_curr_select= thd->lex ->current_select ;
@@ -1257,6 +1258,6 @@ bool pushdown_cond_for_derived(THD *thd, Item *cond, TABLE_LIST *derived)
1257
1258
sl->cond_pushed_into_having = extracted_cond_copy;
1258
1259
}
1259
1260
thd->lex ->current_select = save_curr_select;
1260
- return false ;
1261
+ DBUG_RETURN ( false ) ;
1261
1262
}
1262
1263
0 commit comments