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
9990ce57
Commit
9990ce57
authored
Jun 22, 2003
by
guilhem@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed cleanup_load_tmpdir() which deleted nothing.
parent
04e5a6ba
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
sql/log_event.cc
sql/log_event.cc
+6
-3
sql/sql_repl.cc
sql/sql_repl.cc
+6
-3
No files found.
sql/log_event.cc
View file @
9990ce57
...
@@ -168,12 +168,15 @@ static void cleanup_load_tmpdir()
...
@@ -168,12 +168,15 @@ static void cleanup_load_tmpdir()
uint
i
;
uint
i
;
if
(
!
(
dirp
=
my_dir
(
slave_load_tmpdir
,
MYF
(
MY_WME
))))
if
(
!
(
dirp
=
my_dir
(
slave_load_tmpdir
,
MYF
(
MY_WME
))))
return
;
return
;
char
fname
[
FN_REFLEN
];
for
(
i
=
0
;
i
<
(
uint
)
dirp
->
number_off_files
;
i
++
)
for
(
i
=
0
;
i
<
(
uint
)
dirp
->
number_off_files
;
i
++
)
{
{
file
=
dirp
->
dir_entry
+
i
;
file
=
dirp
->
dir_entry
+
i
;
if
(
is_prefix
(
file
->
name
,
"SQL_LOAD-"
))
if
(
is_prefix
(
file
->
name
,
"SQL_LOAD-"
))
my_delete
(
file
->
name
,
MYF
(
0
));
{
fn_format
(
fname
,
file
->
name
,
slave_load_tmpdir
,
""
,
0
);
my_delete
(
fname
,
MYF
(
0
));
}
}
}
my_dirend
(
dirp
);
my_dirend
(
dirp
);
...
@@ -813,7 +816,7 @@ Rotate_log_event::Rotate_log_event(const char* buf, int event_len,
...
@@ -813,7 +816,7 @@ Rotate_log_event::Rotate_log_event(const char* buf, int event_len,
int
Rotate_log_event
::
write_data
(
IO_CACHE
*
file
)
int
Rotate_log_event
::
write_data
(
IO_CACHE
*
file
)
{
{
char
buf
[
ROTATE_HEADER_LEN
];
char
buf
[
ROTATE_HEADER_LEN
];
int8store
(
buf
,
pos
+
R_POS_OFFSET
);
int8store
(
buf
+
R_POS_OFFSET
,
pos
);
return
(
my_b_safe_write
(
file
,
(
byte
*
)
buf
,
ROTATE_HEADER_LEN
)
||
return
(
my_b_safe_write
(
file
,
(
byte
*
)
buf
,
ROTATE_HEADER_LEN
)
||
my_b_safe_write
(
file
,
(
byte
*
)
new_log_ident
,
(
uint
)
ident_len
));
my_b_safe_write
(
file
,
(
byte
*
)
new_log_ident
,
(
uint
)
ident_len
));
}
}
...
...
sql/sql_repl.cc
View file @
9990ce57
...
@@ -68,9 +68,12 @@ static int fake_rotate_event(NET* net, String* packet, char* log_file_name,
...
@@ -68,9 +68,12 @@ static int fake_rotate_event(NET* net, String* packet, char* log_file_name,
int4store
(
header
+
LOG_POS_OFFSET
,
0
);
int4store
(
header
+
LOG_POS_OFFSET
,
0
);
packet
->
append
(
header
,
sizeof
(
header
));
packet
->
append
(
header
,
sizeof
(
header
));
/* We need to split the next statement because of problem with cxx */
/*
int4store
(
buf
,
position
);
An old comment said talked about a need for splitting the int8store below
int4store
(
buf
+
4
,
0
);
into 2 int4store because of a problem with cxx; I can't understand that as
we already use int8store in Rotatel_log_event::write_data().
*/
int8store
(
buf
+
R_POS_OFFSET
,
position
);
packet
->
append
(
buf
,
ROTATE_HEADER_LEN
);
packet
->
append
(
buf
,
ROTATE_HEADER_LEN
);
packet
->
append
(
p
,
ident_len
);
packet
->
append
(
p
,
ident_len
);
if
(
my_net_write
(
net
,
(
char
*
)
packet
->
ptr
(),
packet
->
length
()))
if
(
my_net_write
(
net
,
(
char
*
)
packet
->
ptr
(),
packet
->
length
()))
...
...
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