Browse Source

MDEV-7558 analyze_stmt_slow_query_log fails sporadically in buildbot

The reason was that the test was reusing the same log file without deleting it between tests.
Fixed by creating a new log file as part of the test
pull/188/merge
Monty 9 years ago
parent
commit
c33c638f39
  1. 3
      mysql-test/r/analyze_stmt_slow_query_log.result
  2. 15
      mysql-test/t/analyze_stmt_slow_query_log.test

3
mysql-test/r/analyze_stmt_slow_query_log.result

@ -1,4 +1,7 @@
drop table if exists t1;
SET @@global.slow_query_log = OFF;
FLUSH SLOW LOGS;
SET @@global.slow_query_log = ON;
create table t1 (a int);
INSERT INTO t1 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
select * from t1 where a<3;

15
mysql-test/t/analyze_stmt_slow_query_log.test

@ -2,6 +2,21 @@
drop table if exists t1;
--enable_warnings
#
# Remove old log file
#
let SLOW_LOG_FILE= `select @@slow_query_log_file`;
SET @@global.slow_query_log = OFF;
perl;
my $slow_log_file= $ENV{'SLOW_LOG_FILE'} or die "SLOW_LOG_FILE not set";
unlink($slow_log_file);
EOF
FLUSH SLOW LOGS;
SET @@global.slow_query_log = ON;
create table t1 (a int);
INSERT INTO t1 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
select * from t1 where a<3;

Loading…
Cancel
Save