1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

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.
This commit is contained in:
Vladislav Vaintroub
2011-11-29 08:50:54 +01:00
parent 82adfe7b2a
commit 389acf0a30
5 changed files with 5 additions and 3 deletions

View File

@@ -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;

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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