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
1d604866
Commit
1d604866
authored
May 30, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into mysql.com:/home/ram/work/b28436/b28436.5.1
parents
a8ca722a
e7ad04ea
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
4 deletions
+15
-4
mysql-test/r/ctype_cp932_binlog_stm.result
mysql-test/r/ctype_cp932_binlog_stm.result
+4
-0
mysql-test/t/ctype_cp932_binlog_stm.test
mysql-test/t/ctype_cp932_binlog_stm.test
+9
-1
sql/log_event.cc
sql/log_event.cc
+2
-3
No files found.
mysql-test/r/ctype_cp932_binlog_stm.result
View file @
1d604866
...
@@ -43,3 +43,7 @@ END
...
@@ -43,3 +43,7 @@ END
master-bin.000001 783 Query 1 1002 use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1 0x466F6F2773206120426172), NAME_CONST('ins2',_cp932 0xED40ED41ED42), NAME_CONST('ind',47.93))
master-bin.000001 783 Query 1 1002 use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1 0x466F6F2773206120426172), NAME_CONST('ins2',_cp932 0xED40ED41ED42), NAME_CONST('ind',47.93))
master-bin.000001 1002 Query 1 1091 use `test`; DROP PROCEDURE bug18293
master-bin.000001 1002 Query 1 1091 use `test`; DROP PROCEDURE bug18293
master-bin.000001 1091 Query 1 1170 use `test`; DROP TABLE t4
master-bin.000001 1091 Query 1 1170 use `test`; DROP TABLE t4
End of 5.0 tests
SHOW BINLOG EVENTS FROM 364;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error
End of 5.1 tests
mysql-test/t/ctype_cp932_binlog_stm.test
View file @
1d604866
...
@@ -25,5 +25,13 @@ DROP TABLE t4|
...
@@ -25,5 +25,13 @@ DROP TABLE t4|
SHOW
BINLOG
EVENTS
FROM
369
|
SHOW
BINLOG
EVENTS
FROM
369
|
delimiter
;
|
delimiter
;
|
#
End of 5.0 tests
--
echo
End
of
5.0
tests
#
# #28436: Incorrect position in SHOW BINLOG EVENTS causes server coredump
# Note: 364 is a magic position (found experimentally, depends on
# the log's contents) that caused the server crash.
--
error
1220
SHOW
BINLOG
EVENTS
FROM
364
;
--
echo
End
of
5.1
tests
sql/log_event.cc
View file @
1d604866
...
@@ -911,16 +911,15 @@ Log_event* Log_event::read_log_event(const char* buf, uint event_len,
...
@@ -911,16 +911,15 @@ Log_event* Log_event::read_log_event(const char* buf, uint event_len,
DBUG_ENTER
(
"Log_event::read_log_event(char*,...)"
);
DBUG_ENTER
(
"Log_event::read_log_event(char*,...)"
);
DBUG_ASSERT
(
description_event
!=
0
);
DBUG_ASSERT
(
description_event
!=
0
);
DBUG_PRINT
(
"info"
,
(
"binlog_version: %d"
,
description_event
->
binlog_version
));
DBUG_PRINT
(
"info"
,
(
"binlog_version: %d"
,
description_event
->
binlog_version
));
/* Check the integrity */
if
(
event_len
<
EVENT_LEN_OFFSET
||
if
(
event_len
<
EVENT_LEN_OFFSET
||
buf
[
EVENT_TYPE_OFFSET
]
>=
ENUM_END_EVENT
||
(
uint
)
event_len
!=
uint4korr
(
buf
+
EVENT_LEN_OFFSET
))
(
uint
)
event_len
!=
uint4korr
(
buf
+
EVENT_LEN_OFFSET
))
{
{
*
error
=
"Sanity check failed"
;
// Needed to free buffer
*
error
=
"Sanity check failed"
;
// Needed to free buffer
DBUG_RETURN
(
NULL
);
// general sanity check - will fail on a partial read
DBUG_RETURN
(
NULL
);
// general sanity check - will fail on a partial read
}
}
/* To check the integrity of the Log_event_type enumeration */
DBUG_ASSERT
(
buf
[
EVENT_TYPE_OFFSET
]
<
ENUM_END_EVENT
);
switch
(
buf
[
EVENT_TYPE_OFFSET
])
{
switch
(
buf
[
EVENT_TYPE_OFFSET
])
{
case
QUERY_EVENT
:
case
QUERY_EVENT
:
ev
=
new
Query_log_event
(
buf
,
event_len
,
description_event
,
QUERY_EVENT
);
ev
=
new
Query_log_event
(
buf
,
event_len
,
description_event
,
QUERY_EVENT
);
...
...
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