Commit 389acf0a authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Fix testcases:

1. main.merge fails with errno 13 in copy_file().

The reason for the error is that copy_file tries to create a file with the same name as recently deleted one,
and there is still an open handle for the deleted file.
To fix, use my_delete_allow_opened() for MTR's delete_file. On Windows,  this renames file to unique name
prior to deletion, and prevents EACCES errors for files opened with FILE_SHARE_DELETE.

2. innodb_bug59641 
generates warnings, after server was killed and restarted in the test case.
The warnings are about test_suppression table (needs to be repaired, as it that was written just prior to the crash)
Fixed by using FLUSH TABLES after populating warning suppression table.
parent 82adfe7b
...@@ -3060,7 +3060,7 @@ void do_remove_file(struct st_command *command) ...@@ -3060,7 +3060,7 @@ void do_remove_file(struct st_command *command)
' '); ' ');
DBUG_PRINT("info", ("removing file: %s", ds_filename.str)); DBUG_PRINT("info", ("removing file: %s", ds_filename.str));
error= my_delete(ds_filename.str, MYF(disable_warnings ? 0 : MY_WME)) != 0; error= my_delete_allow_opened(ds_filename.str, MYF(disable_warnings ? 0 : MY_WME)) != 0;
handle_command_error(command, error, my_errno); handle_command_error(command, error, my_errno);
dynstr_free(&ds_filename); dynstr_free(&ds_filename);
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
......
...@@ -16,6 +16,7 @@ UPDATE t SET b=4*a WHERE a=32; ...@@ -16,6 +16,7 @@ UPDATE t SET b=4*a WHERE a=32;
XA END '789'; XA END '789';
XA PREPARE '789'; XA PREPARE '789';
call mtr.add_suppression("Found 3 prepared XA transactions"); call mtr.add_suppression("Found 3 prepared XA transactions");
FLUSH TABLES;
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT * FROM t; SELECT * FROM t;
a b a b
......
...@@ -33,7 +33,7 @@ XA PREPARE '789'; ...@@ -33,7 +33,7 @@ XA PREPARE '789';
# The server would issue this warning on restart. # The server would issue this warning on restart.
call mtr.add_suppression("Found 3 prepared XA transactions"); call mtr.add_suppression("Found 3 prepared XA transactions");
FLUSH TABLES;
# Kill the server without sending a shutdown command # Kill the server without sending a shutdown command
-- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect -- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
-- shutdown_server 0 -- shutdown_server 0
......
...@@ -16,6 +16,7 @@ UPDATE t SET b=4*a WHERE a=32; ...@@ -16,6 +16,7 @@ UPDATE t SET b=4*a WHERE a=32;
XA END '789'; XA END '789';
XA PREPARE '789'; XA PREPARE '789';
call mtr.add_suppression("Found 3 prepared XA transactions"); call mtr.add_suppression("Found 3 prepared XA transactions");
FLUSH TABLES;
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT * FROM t; SELECT * FROM t;
a b a b
......
...@@ -33,7 +33,7 @@ XA PREPARE '789'; ...@@ -33,7 +33,7 @@ XA PREPARE '789';
# The server would issue this warning on restart. # The server would issue this warning on restart.
call mtr.add_suppression("Found 3 prepared XA transactions"); call mtr.add_suppression("Found 3 prepared XA transactions");
FLUSH TABLES;
# Kill the server without sending a shutdown command # Kill the server without sending a shutdown command
-- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect -- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
-- shutdown_server 0 -- shutdown_server 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment