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
cdb44cd4
Commit
cdb44cd4
authored
Jul 04, 2003
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bug #670
parent
b22a7976
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
299 additions
and
24 deletions
+299
-24
client/mysqlbinlog.cc
client/mysqlbinlog.cc
+266
-20
sql/log_event.cc
sql/log_event.cc
+25
-4
sql/log_event.h
sql/log_event.h
+8
-0
No files found.
client/mysqlbinlog.cc
View file @
cdb44cd4
This diff is collapsed.
Click to expand it.
sql/log_event.cc
View file @
cdb44cd4
...
...
@@ -1289,7 +1289,10 @@ void Load_log_event::print(FILE* file, bool short_form, char* last_db)
if
(
db
&&
db
[
0
]
&&
!
same_db
)
fprintf
(
file
,
"use %s;
\n
"
,
db
);
fprintf
(
file
,
"LOAD DATA INFILE '%-*s' "
,
fname_len
,
fname
);
fprintf
(
file
,
"LOAD DATA "
);
if
(
check_fname_outside_temp_buf
())
fprintf
(
file
,
"LOCAL "
);
fprintf
(
file
,
"INFILE '%-*s' "
,
fname_len
,
fname
);
if
(
sql_ex
.
opt_flags
&
REPLACE_FLAG
)
fprintf
(
file
,
" REPLACE "
);
...
...
@@ -1550,14 +1553,32 @@ Create_file_log_event::Create_file_log_event(const char* buf, int len,
#ifdef MYSQL_CLIENT
void
Create_file_log_event
::
print
(
FILE
*
file
,
bool
short_form
,
char
*
last_db
)
void
Create_file_log_event
::
print
(
FILE
*
file
,
bool
short_form
,
char
*
last_db
,
bool
enable_local
)
{
if
(
short_form
)
{
if
(
enable_local
&&
check_fname_outside_temp_buf
())
Load_log_event
::
print
(
file
,
1
,
last_db
);
return
;
Load_log_event
::
print
(
file
,
1
,
last_db
);
}
if
(
enable_local
)
{
if
(
!
check_fname_outside_temp_buf
())
fprintf
(
file
,
"#"
);
Load_log_event
::
print
(
file
,
1
,
last_db
);
fprintf
(
file
,
"#"
);
}
fprintf
(
file
,
" file_id: %d block_len: %d
\n
"
,
file_id
,
block_len
);
}
void
Create_file_log_event
::
print
(
FILE
*
file
,
bool
short_form
,
char
*
last_db
)
{
print
(
file
,
short_form
,
last_db
,
0
);
}
#endif
#ifndef MYSQL_CLIENT
...
...
sql/log_event.h
View file @
cdb44cd4
...
...
@@ -404,6 +404,13 @@ public:
uint32
skip_lines
;
sql_ex_info
sql_ex
;
/* fname doesn't point to memory inside Log_event::temp_buf */
void
set_fname_outside_temp_buf
(
const
char
*
afname
,
uint
alen
)
{
fname
=
afname
;
fname_len
=
alen
;}
/* fname doesn't point to memory inside Log_event::temp_buf */
int
check_fname_outside_temp_buf
()
{
return
fname
<
temp_buf
||
fname
>
temp_buf
+
cached_event_len
;}
#ifndef MYSQL_CLIENT
String
field_lens_buf
;
String
fields_buf
;
...
...
@@ -636,6 +643,7 @@ public:
int
exec_event
(
struct
st_relay_log_info
*
rli
);
#else
void
print
(
FILE
*
file
,
bool
short_form
=
0
,
char
*
last_db
=
0
);
void
print
(
FILE
*
file
,
bool
short_form
,
char
*
last_db
,
bool
enable_local
);
#endif
Create_file_log_event
(
const
char
*
buf
,
int
event_len
,
bool
old_format
);
...
...
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