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
16cd55a3
Commit
16cd55a3
authored
Jan 03, 2018
by
Monty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed crashing bug in mysqlbinlog
- The fix in mf_iocache2.c was just to fix a compiler warning
parent
14e01bd8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
mysys/mf_iocache2.c
mysys/mf_iocache2.c
+2
-2
sql/log_event.cc
sql/log_event.cc
+8
-3
No files found.
mysys/mf_iocache2.c
View file @
16cd55a3
...
...
@@ -266,11 +266,11 @@ my_b_write_backtick_quote(IO_CACHE *info, const char *str, size_t len)
++
p
;
count
=
p
-
start
;
if
(
count
&&
my_b_write
(
info
,
start
,
count
))
return
(
size_t
)
-
1
;
return
1
;
if
(
p
>=
end
)
break
;
if
(
my_b_write
(
info
,
(
uchar
*
)
"``"
,
2
))
return
(
size_t
)
-
1
;
return
1
;
++
p
;
}
return
(
my_b_write
(
info
,
(
uchar
*
)
"`"
,
1
));
...
...
sql/log_event.cc
View file @
16cd55a3
...
...
@@ -3405,9 +3405,12 @@ static size_t calc_field_event_length(const uchar *ptr, uint type, uint meta)
return
(
meta
<=
4
?
meta
:
0
);
case
MYSQL_TYPE_VARCHAR
:
case
MYSQL_TYPE_VAR_STRING
:
case
MYSQL_TYPE_STRING
:
length
=
meta
;
return
length
<
256
?
length
+
1
:
length
+
2
;
/* Fall trough */
case
MYSQL_TYPE_STRING
:
if
(
length
<
256
)
return
(
uint
)
*
ptr
+
1
;
return
uint2korr
(
ptr
)
+
2
;
case
MYSQL_TYPE_DECIMAL
:
break
;
default:
...
...
@@ -3506,6 +3509,7 @@ void Rows_log_event::count_row_events(PRINT_EVENT_INFO *print_event_info)
&
m_cols
,
value
)))
break
;
value
+=
length
;
DBUG_ASSERT
(
value
<=
m_rows_end
);
/* Print the second image (for UPDATE only) */
if
(
row_events
==
2
)
...
...
@@ -3514,6 +3518,7 @@ void Rows_log_event::count_row_events(PRINT_EVENT_INFO *print_event_info)
&
m_cols_ai
,
value
)))
break
;
value
+=
length
;
DBUG_ASSERT
(
value
<=
m_rows_end
);
}
}
delete
td
;
...
...
@@ -3531,7 +3536,7 @@ bool Rows_log_event::print_verbose(IO_CACHE *file,
PRINT_EVENT_INFO
*
print_event_info
)
{
Table_map_log_event
*
map
;
table_def
*
td
;
table_def
*
td
=
0
;
const
char
*
sql_command
,
*
sql_clause1
,
*
sql_clause2
;
const
char
*
sql_command_short
__attribute__
((
unused
));
Log_event_type
general_type_code
=
get_general_type_code
();
...
...
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