diff options
-rw-r--r-- | sql/sql_select.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 9914b422878..25587f0ada7 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -5415,6 +5415,8 @@ end_write_group(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)), } else { + if (end_of_records) + DBUG_RETURN(0); join->first_record=1; VOID(test_if_group_changed(join->group_fields)); } |