diff options
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 0adb38e0838..0a55a01fcc8 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -10861,7 +10861,6 @@ do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure) so we don't touch it here. */ join->examined_rows++; - join->thd->row_count++; DBUG_ASSERT(join->examined_rows <= 1); } else if (join->send_row_on_empty_set()) @@ -11115,7 +11114,7 @@ sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records) /* Set first_unmatched for the last inner table of this group */ join_tab->last_inner->first_unmatched= join_tab; } - join->thd->row_count= 0; + join->thd->warning_info->reset_current_row_for_warning(); error= (*join_tab->read_first_record)(join_tab); rc= evaluate_join_record(join, join_tab, error); @@ -11225,7 +11224,6 @@ evaluate_join_record(JOIN *join, JOIN_TAB *join_tab, (See above join->return_tab= tab). */ join->examined_rows++; - join->thd->row_count++; DBUG_PRINT("counts", ("join->examined_rows++: %lu", (ulong) join->examined_rows)); @@ -11234,6 +11232,7 @@ evaluate_join_record(JOIN *join, JOIN_TAB *join_tab, enum enum_nested_loop_state rc; /* A match from join_tab is found for the current partial join. */ rc= (*join_tab->next_select)(join, join_tab+1, 0); + join->thd->warning_info->inc_current_row_for_warning(); if (rc != NESTED_LOOP_OK && rc != NESTED_LOOP_NO_MORE_ROWS) return rc; if (join->return_tab < join_tab) @@ -11247,7 +11246,10 @@ evaluate_join_record(JOIN *join, JOIN_TAB *join_tab, return NESTED_LOOP_NO_MORE_ROWS; } else + { + join->thd->warning_info->inc_current_row_for_warning(); join_tab->read_record.file->unlock_row(); + } } else { @@ -11256,7 +11258,7 @@ evaluate_join_record(JOIN *join, JOIN_TAB *join_tab, with the beginning coinciding with the current partial join. */ join->examined_rows++; - join->thd->row_count++; + join->thd->warning_info->inc_current_row_for_warning(); join_tab->read_record.file->unlock_row(); } return NESTED_LOOP_OK; |