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
5ec2bfe9
Commit
5ec2bfe9
authored
Sep 14, 2006
by
tsmith/tim@siva.hindu.god
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #4053: too many of "error 1236: 'binlog truncated in the middle of event' from master"
- Detect read failure in my_read_charset_file
parent
b6cd727e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
mysys/charset.c
mysys/charset.c
+9
-6
No files found.
mysys/charset.c
View file @
5ec2bfe9
...
...
@@ -312,7 +312,7 @@ static my_bool my_read_charset_file(const char *filename, myf myflags)
{
char
*
buf
;
int
fd
;
uint
len
;
uint
len
,
tmp_len
;
MY_STAT
stat_info
;
if
(
!
my_stat
(
filename
,
&
stat_info
,
MYF
(
myflags
))
||
...
...
@@ -321,12 +321,11 @@ static my_bool my_read_charset_file(const char *filename, myf myflags)
return
TRUE
;
if
((
fd
=
my_open
(
filename
,
O_RDONLY
,
myflags
))
<
0
)
{
my_free
(
buf
,
myflags
);
return
TRUE
;
}
len
=
read
(
fd
,
buf
,
len
);
goto
error
;
tmp_len
=
my_read
(
fd
,
buf
,
len
,
myflags
);
my_close
(
fd
,
myflags
);
if
(
tmp_len
!=
len
)
goto
error
;
if
(
my_parse_charset_xml
(
buf
,
len
,
add_collation
))
{
...
...
@@ -340,6 +339,10 @@ static my_bool my_read_charset_file(const char *filename, myf myflags)
my_free
(
buf
,
myflags
);
return
FALSE
;
error:
my_free
(
buf
,
myflags
);
return
TRUE
;
}
...
...
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