summaryrefslogtreecommitdiff
path: root/sql/sql_union.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-09-23 13:55:01 +0300
committerMichael Widenius <monty@askmonty.org>2011-09-23 13:55:01 +0300
commitf0c6ce9adec82ceec054b0f6e973ab1526a033c4 (patch)
tree6cf8c286e19b189973ecde32abcb6c73c29e369d /sql/sql_union.cc
parent22e793639aa098aac6712256c67f28a49e4b1126 (diff)
downloadmariadb-git-f0c6ce9adec82ceec054b0f6e973ab1526a033c4.tar.gz
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
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r--sql/sql_union.cc1
1 files changed, 1 insertions, 0 deletions
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;