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
This commit is contained in:
parent
22e793639a
commit
f0c6ce9ade
@ -1,5 +1,6 @@
|
|||||||
set @subselect_mat_cost=@@optimizer_switch;
|
set @subselect_mat_cost=@@optimizer_switch;
|
||||||
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
|
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
|
||||||
|
set log_slow_time=0.1;
|
||||||
TEST GROUP 1:
|
TEST GROUP 1:
|
||||||
Typical cases of in-to-exists and materialization subquery strategies
|
Typical cases of in-to-exists and materialization subquery strategies
|
||||||
=====================================================================
|
=====================================================================
|
||||||
|
@ -15,6 +15,11 @@
|
|||||||
|
|
||||||
set @subselect_mat_cost=@@optimizer_switch;
|
set @subselect_mat_cost=@@optimizer_switch;
|
||||||
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
|
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:
|
-- echo TEST GROUP 1:
|
||||||
|
@ -645,6 +645,7 @@ bool st_select_lex_unit::exec()
|
|||||||
if (!saved_error)
|
if (!saved_error)
|
||||||
{
|
{
|
||||||
examined_rows+= thd->examined_row_count;
|
examined_rows+= thd->examined_row_count;
|
||||||
|
thd->examined_row_count= 0;
|
||||||
if (union_result->flush())
|
if (union_result->flush())
|
||||||
{
|
{
|
||||||
thd->lex->current_select= lex_select_save;
|
thd->lex->current_select= lex_select_save;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user