diff options
author | Michael Widenius <monty@askmonty.org> | 2011-09-23 13:55:01 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2011-09-23 13:55:01 +0300 |
commit | f0c6ce9adec82ceec054b0f6e973ab1526a033c4 (patch) | |
tree | 6cf8c286e19b189973ecde32abcb6c73c29e369d | |
parent | 22e793639aa098aac6712256c67f28a49e4b1126 (diff) | |
download | mariadb-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
-rw-r--r-- | mysql-test/r/subselect_mat_cost.result | 1 | ||||
-rw-r--r-- | mysql-test/t/subselect_mat_cost.test | 5 | ||||
-rw-r--r-- | sql/sql_union.cc | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/mysql-test/r/subselect_mat_cost.result b/mysql-test/r/subselect_mat_cost.result index a642c498e53..e8312c837e6 100644 --- a/mysql-test/r/subselect_mat_cost.result +++ b/mysql-test/r/subselect_mat_cost.result @@ -1,5 +1,6 @@ set @subselect_mat_cost=@@optimizer_switch; set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on'; +set log_slow_time=0.1; TEST GROUP 1: Typical cases of in-to-exists and materialization subquery strategies ===================================================================== diff --git a/mysql-test/t/subselect_mat_cost.test b/mysql-test/t/subselect_mat_cost.test index 8a0d1ac702d..9d7d950114c 100644 --- a/mysql-test/t/subselect_mat_cost.test +++ b/mysql-test/t/subselect_mat_cost.test @@ -15,6 +15,11 @@ set @subselect_mat_cost=@@optimizer_switch; set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on'; +# +# Test logging to slow log (there was some errors in the log files about +# the slow log when running under valgrind, so better to get this tested) +# +set log_slow_time=0.1; -- echo TEST GROUP 1: 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; |