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
0e5d43cd
Commit
0e5d43cd
authored
Oct 13, 2010
by
Luis Soares
Browse files
Options
Browse Files
Download
Plain Diff
BUG 38718: automerged bzr bundle from bug report into
latest mysql-5.1-bugteam.
parents
fea55c7f
5109d540
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
sql/log_event.cc
sql/log_event.cc
+10
-4
sql/log_event.h
sql/log_event.h
+3
-1
No files found.
sql/log_event.cc
View file @
0e5d43cd
...
...
@@ -1230,7 +1230,7 @@ Log_event* Log_event::read_log_event(const char* buf, uint event_len,
break
;
#ifdef HAVE_REPLICATION
case
SLAVE_EVENT
:
/* can never happen (unused event) */
ev
=
new
Slave_log_event
(
buf
,
event_len
);
ev
=
new
Slave_log_event
(
buf
,
event_len
,
description_event
);
break
;
#endif
/* HAVE_REPLICATION */
case
CREATE_FILE_EVENT
:
...
...
@@ -1318,8 +1318,10 @@ Log_event* Log_event::read_log_event(const char* buf, uint event_len,
(because constructor is "void") ; so instead we leave the pointer we
wanted to allocate (e.g. 'query') to 0 and we test it in is_valid().
Same for Format_description_log_event, member 'post_header_len'.
SLAVE_EVENT is never used, so it should not be read ever.
*/
if
(
!
ev
||
!
ev
->
is_valid
())
if
(
!
ev
||
!
ev
->
is_valid
()
||
(
event_type
==
SLAVE_EVENT
)
)
{
DBUG_PRINT
(
"error"
,(
"Found invalid event in binary log"
));
...
...
@@ -5983,8 +5985,12 @@ void Slave_log_event::init_from_mem_pool(int data_size)
/** This code is not used, so has not been updated to be format-tolerant. */
Slave_log_event
::
Slave_log_event
(
const
char
*
buf
,
uint
event_len
)
:
Log_event
(
buf
,
0
)
/*unused event*/
,
mem_pool
(
0
),
master_host
(
0
)
/* We are using description_event so that slave does not crash on Log_event
constructor */
Slave_log_event
::
Slave_log_event
(
const
char
*
buf
,
uint
event_len
,
const
Format_description_log_event
*
description_event
)
:
Log_event
(
buf
,
description_event
),
mem_pool
(
0
),
master_host
(
0
)
{
if
(
event_len
<
LOG_EVENT_HEADER_LEN
)
return
;
...
...
sql/log_event.h
View file @
0e5d43cd
...
...
@@ -1782,7 +1782,9 @@ class Slave_log_event: public Log_event
void
print
(
FILE
*
file
,
PRINT_EVENT_INFO
*
print_event_info
);
#endif
Slave_log_event
(
const
char
*
buf
,
uint
event_len
);
Slave_log_event
(
const
char
*
buf
,
uint
event_len
,
const
Format_description_log_event
*
description_event
);
~
Slave_log_event
();
int
get_data_size
();
bool
is_valid
()
const
{
return
master_host
!=
0
;
}
...
...
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