| 24375 | */ |
| 24376 | |
| 24377 | enum_nested_loop_state |
| 24378 | sub_select_postjoin_aggr(JOIN *join, JOIN_TAB *join_tab, bool end_of_records) |
| 24379 | { |
| 24380 | enum_nested_loop_state rc; |
| 24381 | AGGR_OP *aggr= join_tab->aggr; |
| 24382 | |
| 24383 | /* This function cannot be called if join_tab has no associated aggregation */ |
| 24384 | DBUG_ASSERT(aggr != NULL); |
| 24385 | |
| 24386 | DBUG_ENTER("sub_select_aggr_tab"); |
| 24387 | |
| 24388 | if (join->thd->killed) |
| 24389 | { |
| 24390 | /* The user has aborted the execution of the query */ |
| 24391 | join->thd->send_kill_message(); |
| 24392 | DBUG_RETURN(NESTED_LOOP_KILLED); |
| 24393 | } |
| 24394 | |
| 24395 | if (end_of_records) |
| 24396 | { |
| 24397 | rc= aggr->end_send(); |
| 24398 | if (rc >= NESTED_LOOP_OK) |
| 24399 | rc= sub_select(join, join_tab, end_of_records); |
| 24400 | DBUG_RETURN(rc); |
| 24401 | } |
| 24402 | |
| 24403 | rc= aggr->put_record(); |
| 24404 | |
| 24405 | DBUG_RETURN(rc); |
| 24406 | } |
| 24407 | |
| 24408 | |
| 24409 | /* |
nothing calls this directly
no test coverage detected