mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
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
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user