summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorAlexander Nozdrin <alik@sun.com>2009-09-23 17:57:39 +0400
committerAlexander Nozdrin <alik@sun.com>2009-09-23 17:57:39 +0400
commitff83a4285376c8f259fea451d92e5909ddb5049e (patch)
treec148b3632f4b93b84d5f1e31dd3669612181702e /sql/sql_select.cc
parent7947948c5225b5e48dfeb18a17f0c170620bfc89 (diff)
parent1ecaf1bc1e589a7246b2a4c18490ecf96209154e (diff)
downloadmariadb-git-ff83a4285376c8f259fea451d92e5909ddb5049e.tar.gz
Merge mysql-trunk-signal (into mysql-next-mr-alik, which is mysql-next-mr).
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index a82137222e5..db3a73aec74 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -10874,7 +10874,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())
@@ -11128,7 +11127,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);
@@ -11238,7 +11237,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));
@@ -11247,6 +11245,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)
@@ -11260,7 +11259,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
{
@@ -11269,7 +11271,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;