-
Committer:
Oleg Tsarev
-
Date:
2011-07-11 01:35:04 UTC
-
mfrom:
(248.2.1 merge_5.1)
-
Revision ID:
oleg.tsarev@percona.com-20110711013504-42y7opw33its2llp
Fixes for bugs #712393 #803867
1) I move query_response_time_collect call from intermediate of log_slow_statement to begin.
Reason of bug #712393 - log_slow_statement exit before call query_response_time_collect
2) I move all DBUG_EXECUTE_IF (what used in percona_query_response_time.test) from response_time_distribution.patch to slow_extended.patch
This functionality requires in the slow_extended sporadic fails
3) If we set "debug" variable:
SET [SESSION|GLOBAL] debug="+d,query_exec_time_debug"
we can setup exact query_exec_time through set "debug" variable:
SET [SESSION|GLOBAL] debug="+d,query_exec_time_TIMES";
where TIMES is [0.31|0.32|0.33|0.34|0.35|0.36|0.37|0.38|0.39|0.4|0.5|1.1|1.2|1.3|1.4|1.5|2.1|2.3|2.5]
After this commit we can also add special comment to the begin of query:
/* query_exec_time="TIMES" */ QUERY;
This changes requires for test SQL_Slave_Thread query execution.
4) I replace logic:
/*----------------------------------------*/
DBUG_EXECUTE_IF("query_exec_time_debug",
if (query_execution_time == 0)
opt_query_response_time_stats= 0;
else
opt_query_response_time_stats= 1;);
/*----------------------------------------*/
By following:
/*----------------------------------------*/
void query_response_time_collect_with_check(ulonglong query_exec_time)
{
DBUG_ENTER("query_response_time_collect_with_check");
bool collect= opt_query_response_time_stats;
DBUG_EXECUTE_IF("query_exec_time_debug",
{
if (0 == query_exec_time)
{
collect= false;
}
});
if(collect)
{
query_response_time_collect(query_exec_time);
}
DBUG_VOID_RETURN;
}
/*----------------------------------------*/
Otherwise debug-code has bad side-effect - set QUERY_RESPONSE_TIME_STATS to OFF if query shouldn't collect
5) I rewrite tests for response_time_distribution.patch, now all test unified and wouldn't have sporadic fails in the feature.
This change fixes the bug #803867.
6) I also remove mysql-test/response_time_distribution.patch and move to patch.
Now this is the suite "percona" and tests "query_response_time[-[stored|replication]]"
7) I also move have_response_time_distribution.[require|inc] to patch
8) I also add "percona_suite.patch" for include "percona" test suite to default suites list