1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-31349 test maria.maria-purge failed on 'aria_log.00000002 not found'

The bug was in the test case.
The problem was that maria_empty_logs.inc deleted aria log files before
the server was properly shutdown.
Fixed by waiting for pid file to disappear before starting to delete log
files.

Other things:
- Fixed that translog_purge_at_flush() will not stop deleting files even
  if one file could not be deleted.
This commit is contained in:
Monty
2023-10-08 18:00:51 +03:00
parent 424a7a2620
commit 185591c1c0
3 changed files with 56 additions and 16 deletions

View File

@ -11,6 +11,7 @@
connection default;
let $default_db=`select database()`;
let $MYSQLD_DATADIR= `SELECT @@datadir`;
let $pid_file=`select @@pid_file`;
#it will used at end of test for wait_for_status_var.inc primitive
#let $status_var= Threads_connected;
@ -23,6 +24,7 @@ wait-maria_empty_logs.inc
EOF
--source include/mysqladmin_shutdown.inc
--source include/wait_until_no_pidfile.inc
--disable_warnings
if (!$mel_keep_control_file)

View File

@ -0,0 +1,30 @@
# Include this script after a shutdown to wait until the pid file,
# stored in $pid_file, has disappered.
#--echo $pid_file
--disable_result_log
--disable_query_log
# Wait one minute
let $counter= 600;
while ($counter)
{
--error 0,1
--file_exists $pid_file
if (!$errno)
{
dec $counter;
--real_sleep 0.1
}
if ($errno)
{
let $counter= 0;
}
}
if (!$errno)
{
--die Pid file "$pid_file" failed to disappear
}
--enable_query_log
--enable_result_log