From f0c6ce9adec82ceec054b0f6e973ab1526a033c4 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Fri, 23 Sep 2011 13:55:01 +0300 Subject: Fixed issue with slow query logging where examined rows where wrong Reset 'examined_rows_count' in union to not count same rows twice mysql-test/r/subselect_mat_cost.result: Test also slow query logging mysql-test/t/subselect_mat_cost.test: Test also slow query logging sql/sql_union.cc: Reset 'examined_rows_count' in union to not count same rows twice --- sql/sql_union.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'sql/sql_union.cc') diff --git a/sql/sql_union.cc b/sql/sql_union.cc index d2cb21a59a1..50de42d153c 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -645,6 +645,7 @@ bool st_select_lex_unit::exec() if (!saved_error) { examined_rows+= thd->examined_row_count; + thd->examined_row_count= 0; if (union_result->flush()) { thd->lex->current_select= lex_select_save; -- cgit v1.2.1