Commit d028fb9f authored by Vicențiu Ciorbaru's avatar Vicențiu Ciorbaru

cleanup: reduce indentation of end_send

Reorder end_send to exit via return instead of large if-else block.
parent d624464b
...@@ -21943,8 +21943,7 @@ join_read_next_same_or_null(READ_RECORD *info) ...@@ -21943,8 +21943,7 @@ join_read_next_same_or_null(READ_RECORD *info)
/* ARGSUSED */ /* ARGSUSED */
static enum_nested_loop_state static enum_nested_loop_state
end_send(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)), end_send(JOIN *join, JOIN_TAB *join_tab, bool end_of_records)
bool end_of_records)
{ {
DBUG_ENTER("end_send"); DBUG_ENTER("end_send");
/* /*
...@@ -21956,8 +21955,13 @@ end_send(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)), ...@@ -21956,8 +21955,13 @@ end_send(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
//TODO pass fields via argument //TODO pass fields via argument
List<Item> *fields= join_tab ? (join_tab-1)->fields : join->fields; List<Item> *fields= join_tab ? (join_tab-1)->fields : join->fields;
if (!end_of_records) if (end_of_records)
{ {
if (join->procedure && join->procedure->end_of_records())
DBUG_RETURN(NESTED_LOOP_ERROR);
DBUG_RETURN(NESTED_LOOP_OK);
}
if (join->table_count && if (join->table_count &&
join->join_tab->is_using_loose_index_scan()) join->join_tab->is_using_loose_index_scan())
{ {
...@@ -22049,12 +22053,6 @@ end_send(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)), ...@@ -22049,12 +22053,6 @@ end_send(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
*/ */
DBUG_RETURN(NESTED_LOOP_CURSOR_LIMIT); DBUG_RETURN(NESTED_LOOP_CURSOR_LIMIT);
} }
}
else
{
if (join->procedure && join->procedure->end_of_records())
DBUG_RETURN(NESTED_LOOP_ERROR);
}
DBUG_RETURN(NESTED_LOOP_OK); DBUG_RETURN(NESTED_LOOP_OK);
} }
...@@ -22069,8 +22067,7 @@ end_send(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)), ...@@ -22069,8 +22067,7 @@ end_send(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
*/ */
enum_nested_loop_state enum_nested_loop_state
end_send_group(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)), end_send_group(JOIN *join, JOIN_TAB *join_tab, bool end_of_records)
bool end_of_records)
{ {
int idx= -1; int idx= -1;
enum_nested_loop_state ok_code= NESTED_LOOP_OK; enum_nested_loop_state ok_code= NESTED_LOOP_OK;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment