mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
BUG#50474: rpl_slave_load_remove_tmpfile failed on windows debug
enabled binary The test case injects an error in the server by deleting the temporary file that it uses during the load data statement execution. The error consisted of closing, deleting and setting the file descriptor to -1 right before calling mysql_file_write. Although, this error injection seems to work OK in Unix like environments, in Windows, this would cause the server to hit an assertion in 'my_get_open_flags': DBUG_ASSERT(fd >= MY_FILE_MIN && fd < (int)my_file_limit) We fix this by changing the error injection to just call the macro my_delete_allow_opened, instead of the close + delete + set fd=-1. The macro deletes the file and is platform independent. Additionally, this required some changes to how the assertion is handled in the test case to make it cope with this change.
This commit is contained in:
@ -10,47 +10,7 @@ insert into t1(b) values (1);
|
||||
insert into t1(b) values (2);
|
||||
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
commit;
|
||||
show slave status;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_MYPORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 9
|
||||
Last_Error Error in Begin_load_query event: write to '../../tmp/SQL_LOAD.data' failed
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno #
|
||||
Last_IO_Error #
|
||||
Last_SQL_Errno 9
|
||||
Last_SQL_Error Error in Begin_load_query event: write to '../../tmp/SQL_LOAD.data' failed
|
||||
Replicate_Ignore_Server_Ids
|
||||
Master_Server_Id 1
|
||||
drop table t1;
|
||||
drop table t1;
|
||||
call mtr.add_suppression("Slave: Error writing file 'UNKNOWN' .Errcode: 9. Error_code: 3");
|
||||
call mtr.add_suppression("Slave: Can't get stat of .*");
|
||||
call mtr.add_suppression("Slave: File.* not found.*");
|
||||
|
Reference in New Issue
Block a user