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
0f1cf039
Commit
0f1cf039
authored
Sep 01, 2003
by
vva@eagle.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bug #1073
(Replication LOAD DATA INFILE mysqlbinlog doesn't cleanup tmp files)
parent
2a53d5a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
client/mysqlbinlog.cc
client/mysqlbinlog.cc
+18
-2
No files found.
client/mysqlbinlog.cc
View file @
0f1cf039
...
...
@@ -21,6 +21,7 @@
#include <assert.h>
#include "log_event.h"
#include "include/my_sys.h"
#include "unistd.h"
#define BIN_LOG_HEADER_SIZE 4
#define PROBE_HEADER_LEN (EVENT_LEN_OFFSET+4)
...
...
@@ -81,9 +82,9 @@ class Load_log_processor
bname
--
;
uint
blen
=
ce
->
fname_len
-
(
bname
-
ce
->
fname
);
uint
full_len
=
target_dir_name_len
+
blen
;
uint
full_len
=
target_dir_name_len
+
blen
+
9
+
9
+
1
;
char
*
tmp
;
if
(
!
(
tmp
=
my_malloc
(
full_len
+
9
+
1
,
MYF
(
MY_WME
)))
||
if
(
!
(
tmp
=
my_malloc
(
full_len
,
MYF
(
MY_WME
)))
||
set_dynamic
(
&
file_names
,(
gptr
)
&
ce
,
ce
->
file_id
))
{
die
(
"Could not construct local filename %s%s"
,
target_dir_name
,
bname
);
...
...
@@ -96,6 +97,21 @@ class Load_log_processor
memcpy
(
ptr
,
bname
,
blen
);
ptr
+=
blen
;
sprintf
(
ptr
,
"-%08x"
,
ce
->
file_id
);
ptr
+=
9
;
uint
version
=
0
;
for
(;;)
{
sprintf
(
ptr
,
"-%08x"
,
version
);
if
(
access
(
tmp
,
F_OK
))
break
;
version
++
;
if
(
version
>
UINT_MAX
)
{
die
(
"Could not construct local filename %s%s"
,
target_dir_name
,
bname
);
return
0
;
}
}
ce
->
set_fname_outside_temp_buf
(
tmp
,
full_len
);
...
...
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