Enabling and disabling slow query log rotation spuriously adds version suffix to the next slow query log file name

Bug #1704056 reported by Laurynas Biveinis
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.5
Invalid
Undecided
Unassigned
5.6
Invalid
Undecided
Unassigned
5.7
Fix Released
Medium
Laurynas Biveinis

Bug Description

main.percona_bug643149 w4 [ fail ]
        Test ended at 2017-07-12 17:17:15

CURRENT_TEST: main.percona_bug643149
Unable to read slow query log file /mnt/workspace/percona-server-5.7-trunk/BUILD_TYPE/release/Host/ubuntu-zesty-32bit/build/mysql-test/var/4/percona_bug643149_slow.slog: No such file or directory
mysqltest: At line 13: command "perl" failed with error 2. my_errno=175

The result from queries just before the failure was:
SET LOCAL log_slow_verbosity='profiling';
SET LOCAL long_query_time=0;
[log_start.inc] percona_bug643149_slow
SELECT 1;
1
1
[log_stop.inc] percona_bug643149_slow
safe_process[10050]: Child process: 10051, exit: 1

Server [mysqld.1 - pid: 9439, winpid: 9439] log:
Server log from this test:
----------SERVER LOG START-----------
----------SERVER LOG END-------------

tags: added: ci slow-extended
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

To reproduce, $ ./mtr --debug-server percona_bug1416582 percona_bug643149. It looks like percona_bug1416582 breaks it.

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

This is a 5.7 port code regression: setting max_slowlog_size to some value, resetting it to zero, and then setting the slow query log file name results in version suffix being appended where it should not be.

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

The following shows non-versioned percona_bug643149_slow.slog on 5.5/5.6, and versioned on 5.7

SET @old_max_slowlog_size = @@global.max_slowlog_size;
SET @old_slow_query_log_file = @@global.slow_query_log_file;
SET GLOBAL max_slowlog_size=10240000;

--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval SET GLOBAL slow_query_log_file='$MYSQLTEST_VARDIR/abcd';

SET @@global.max_slowlog_size = @old_max_slowlog_size;
SET @@global.slow_query_log_file = @old_slow_query_log_file;

--remove_files_wildcard $MYSQLTEST_VARDIR abcd*

--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval SET GLOBAL slow_query_log_file = '$MYSQLTEST_VARDIR/percona_bug643149_slow.slog';

SET GLOBAL slow_query_log_file = @old_slow_query_log_file;

list_files $MYSQLTEST_VARDIR percona_bug643149_slow*;

--remove_files_wildcard $MYSQLTEST_VARDIR *.slog

summary: - main.percona_bug643149 consistently failing on 5.7
+ Enabling and disabling slow query log rotation spuriously adds version
+ suffix to the next slow query log file name
tags: added: regression
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1810

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.