mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
cleanup: reduce indentation of end_send
Reorder end_send to exit via return instead of large if-else block.
This commit is contained in:
@@ -21943,8 +21943,7 @@ join_read_next_same_or_null(READ_RECORD *info)
|
||||
|
||||
/* ARGSUSED */
|
||||
static enum_nested_loop_state
|
||||
end_send(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
|
||||
bool end_of_records)
|
||||
end_send(JOIN *join, JOIN_TAB *join_tab, bool end_of_records)
|
||||
{
|
||||
DBUG_ENTER("end_send");
|
||||
/*
|
||||
@@ -21956,8 +21955,13 @@ end_send(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
|
||||
//TODO pass fields via argument
|
||||
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 &&
|
||||
join->join_tab->is_using_loose_index_scan())
|
||||
{
|
||||
@@ -22049,12 +22053,6 @@ end_send(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -22069,8 +22067,7 @@ end_send(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
|
||||
*/
|
||||
|
||||
enum_nested_loop_state
|
||||
end_send_group(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
|
||||
bool end_of_records)
|
||||
end_send_group(JOIN *join, JOIN_TAB *join_tab, bool end_of_records)
|
||||
{
|
||||
int idx= -1;
|
||||
enum_nested_loop_state ok_code= NESTED_LOOP_OK;
|
||||
|
Reference in New Issue
Block a user