Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
2d71cea4
Commit
2d71cea4
authored
Jan 26, 2010
by
Luis Soares
Browse files
Options
Browse Files
Download
Plain Diff
Automerge from bug branch.
parents
f52bbe0f
0c906be9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
55 deletions
+25
-55
mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result
mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result
+2
-42
mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test
mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test
+13
-5
mysql-test/suite/rpl/t/rpl_sync.test
mysql-test/suite/rpl/t/rpl_sync.test
+9
-5
sql/log_event.cc
sql/log_event.cc
+1
-3
No files found.
mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result
View file @
2d71cea4
...
...
@@ -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.*");
mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test
View file @
2d71cea4
...
...
@@ -33,10 +33,17 @@ commit;
connection
slave
;
source
include
/
wait_for_slave_sql_to_stop
.
inc
;
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
--
replace_regex
/
SQL_LOAD
-
[
0
-
9
]
-
[
0
-
9
]
-
[
0
-
9
]
*/
SQL_LOAD
/
query_vertical
show
slave
status
;
--
let
$error
=
query_get_value
(
SHOW
SLAVE
STATUS
,
Last_Errno
,
1
)
# windows and linux different error numbers here:
# Windows:
# - Last_Errno 29 (File not found)
# Unix like OS:
# - Last_Errno 13 (Can't stat file)
--
let
$assertion
=
`SELECT $error=29 OR $error=13`
if
(
!
$assertion
)
{
--
echo
UNEXPECTED
ERROR
NUMBER
:
$error
}
##########################################################################
# Clean up
...
...
@@ -49,4 +56,5 @@ connection slave;
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.*"
);
mysql-test/suite/rpl/t/rpl_sync.test
View file @
2d71cea4
...
...
@@ -64,8 +64,15 @@ stop slave IO_THREAD;
source
include
/
wait_for_slave_io_to_stop
.
inc
;
let
$file
=
query_get_value
(
"SHOW SLAVE STATUS"
,
Relay_Log_File
,
1
);
--
replace_result
$MYSQLD_SLAVE_DATADIR
MYSQLD_SLAVE_DATADIR
--
exec
echo
"failure"
>
$MYSQLD_SLAVE_DATADIR
/
$file
--
let
FILE_TO_CORRUPT
=
$MYSQLD_SLAVE_DATADIR
/
$file
perl
;
$file
=
$ENV
{
'FILE_TO_CORRUPT'
};
open
(
FILE
,
">
$file
"
)
||
die
"Unable to open
$file
."
;
truncate
(
FILE
,
0
);
print
FILE
"failure"
;
close
(
$file
);
EOF
--
exec
echo
"restart"
>
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
2.
expect
SET
SESSION
debug
=
"d,crash_before_rotate_relaylog"
;
...
...
@@ -102,9 +109,6 @@ insert into t1(a) values(8);
insert
into
t1
(
a
)
values
(
9
);
connection
slave
;
--
replace_result
$MYSQLD_SLAVE_DATADIR
MYSQLD_SLAVE_DATADIR
--
exec
cat
$MYSQLD_SLAVE_DATADIR
/
master
.
backup
>
$MYSQLD_SLAVE_DATADIR
/
master
.
info
let
MYSQLD_SLAVE_DATADIR
=
`select @@datadir`
;
--
perl
...
...
sql/log_event.cc
View file @
2d71cea4
...
...
@@ -6449,9 +6449,7 @@ int Append_block_log_event::do_apply_event(Relay_log_info const *rli)
DBUG_EXECUTE_IF
(
"remove_slave_load_file_before_write"
,
{
mysql_file_close
(
fd
,
MYF
(
0
));
fd
=
-
1
;
mysql_file_delete
(
0
,
fname
,
MYF
(
0
));
my_delete_allow_opened
(
fname
,
MYF
(
0
));
});
if
(
mysql_file_write
(
fd
,
(
uchar
*
)
block
,
block_len
,
MYF
(
MY_WME
+
MY_NABP
)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment