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
0e2de06a
Commit
0e2de06a
authored
Mar 29, 2007
by
msvensson@pilot.blaudden
Browse files
Options
Browse Files
Download
Plain Diff
Merge pilot.blaudden:/home/msvensson/mysql/bug26837/my50-bug26837
into pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
parents
07178311
696102a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
6 deletions
+21
-6
sql/log_event.cc
sql/log_event.cc
+21
-6
No files found.
sql/log_event.cc
View file @
0e2de06a
...
...
@@ -669,19 +669,34 @@ int Log_event::read_log_event(IO_CACHE* file, String* packet,
LOG_READ_TOO_LARGE
);
goto
end
;
}
packet
->
append
(
buf
,
sizeof
(
buf
));
/* Append the log event header to packet */
if
(
packet
->
append
(
buf
,
sizeof
(
buf
)))
{
/* Failed to allocate packet */
result
=
LOG_READ_MEM
;
goto
end
;
}
data_len
-=
LOG_EVENT_MINIMAL_HEADER_LEN
;
if
(
data_len
)
{
/* Append rest of event, read directly from file into packet */
if
(
packet
->
append
(
file
,
data_len
))
{
/*
Here if we hit EOF it's really an error: as data_len is >=0
there's supposed to be more bytes available.
EOF means we are reading the event partially, which should
never happen: either we read badly or the binlog is truncated.
Fatal error occured when appending rest of the event
to packet, possible failures:
1. EOF occured when reading from file, it's really an error
as data_len is >=0 there's supposed to be more bytes available.
file->error will have been set to number of bytes left to read
2. Read was interrupted, file->error would normally be set to -1
3. Failed to allocate memory for packet, my_errno
will be ENOMEM(file->error shuold be 0, but since the
memory allocation occurs before the call to read it might
be uninitialized)
*/
result
=
file
->
error
>=
0
?
LOG_READ_TRUNC
:
LOG_READ_IO
;
result
=
(
my_errno
==
ENOMEM
?
LOG_READ_MEM
:
(
file
->
error
>=
0
?
LOG_READ_TRUNC
:
LOG_READ_IO
));
/* Implicit goto end; */
}
}
...
...
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