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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
17c5725c
Commit
17c5725c
authored
Aug 08, 2012
by
Rohit Kalhans
Browse files
Options
Browse Files
Download
Plain Diff
upmerge from mysql-5.1=>mysql-5.5
parents
ffdc4bc8
ff04c5bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
client/mysqlbinlog.cc
client/mysqlbinlog.cc
+12
-1
No files found.
client/mysqlbinlog.cc
View file @
17c5725c
...
...
@@ -36,6 +36,7 @@
#include "sql_priv.h"
#include "log_event.h"
#include "sql_common.h"
#include "my_dir.h"
#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
#define BIN_LOG_HEADER_SIZE 4
...
...
@@ -1775,6 +1776,7 @@ static Exit_status check_header(IO_CACHE* file,
uchar
header
[
BIN_LOG_HEADER_SIZE
];
uchar
buf
[
PROBE_HEADER_LEN
];
my_off_t
tmp_pos
,
pos
;
MY_STAT
my_file_stat
;
delete
glob_description_event
;
if
(
!
(
glob_description_event
=
new
Format_description_log_event
(
3
)))
...
...
@@ -1784,7 +1786,16 @@ static Exit_status check_header(IO_CACHE* file,
}
pos
=
my_b_tell
(
file
);
my_b_seek
(
file
,
(
my_off_t
)
0
);
/* fstat the file to check if the file is a regular file. */
if
(
my_fstat
(
file
->
file
,
&
my_file_stat
,
MYF
(
0
))
==
-
1
)
{
error
(
"Unable to stat the file."
);
return
ERROR_STOP
;
}
if
((
my_file_stat
.
st_mode
&
S_IFMT
)
==
S_IFREG
)
my_b_seek
(
file
,
(
my_off_t
)
0
);
if
(
my_b_read
(
file
,
header
,
sizeof
(
header
)))
{
error
(
"Failed reading header; probably an empty file."
);
...
...
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