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
3e3cac14
Commit
3e3cac14
authored
Nov 08, 2004
by
lars@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/bkroot/mysql-4.1
into mysql.com:/home/bk/b6239-4.1-v2-pending
parents
98e6ddfe
0d5290fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
client/mysqlbinlog.cc
client/mysqlbinlog.cc
+19
-4
No files found.
client/mysqlbinlog.cc
View file @
3e3cac14
...
@@ -204,7 +204,7 @@ int Load_log_processor::load_old_format_file(NET* net, const char*server_fname,
...
@@ -204,7 +204,7 @@ int Load_log_processor::load_old_format_file(NET* net, const char*server_fname,
for
(;;)
for
(;;)
{
{
u
int
packet_len
=
my_net_read
(
net
);
u
long
packet_len
=
my_net_read
(
net
);
if
(
packet_len
==
0
)
if
(
packet_len
==
0
)
{
{
if
(
my_net_write
(
net
,
""
,
0
)
||
net_flush
(
net
))
if
(
my_net_write
(
net
,
""
,
0
)
||
net_flush
(
net
))
...
@@ -226,7 +226,13 @@ int Load_log_processor::load_old_format_file(NET* net, const char*server_fname,
...
@@ -226,7 +226,13 @@ int Load_log_processor::load_old_format_file(NET* net, const char*server_fname,
return
-
1
;
return
-
1
;
}
}
if
(
my_write
(
file
,
(
byte
*
)
net
->
read_pos
,
packet_len
,
MYF
(
MY_WME
|
MY_NABP
)))
if
(
packet_len
>
UINT_MAX
)
{
sql_print_error
(
"Illegal length of packet read from net"
);
return
-
1
;
}
if
(
my_write
(
file
,
(
byte
*
)
net
->
read_pos
,
(
uint
)
packet_len
,
MYF
(
MY_WME
|
MY_NABP
)))
return
-
1
;
return
-
1
;
}
}
...
@@ -747,7 +753,8 @@ static int dump_remote_log_entries(const char* logname)
...
@@ -747,7 +753,8 @@ static int dump_remote_log_entries(const char* logname)
{
{
char
buf
[
128
];
char
buf
[
128
];
char
last_db
[
FN_REFLEN
+
1
]
=
""
;
char
last_db
[
FN_REFLEN
+
1
]
=
""
;
uint
len
,
logname_len
;
ulong
len
;
uint
logname_len
;
NET
*
net
;
NET
*
net
;
int
old_format
;
int
old_format
;
int
error
=
0
;
int
error
=
0
;
...
@@ -770,7 +777,15 @@ static int dump_remote_log_entries(const char* logname)
...
@@ -770,7 +777,15 @@ static int dump_remote_log_entries(const char* logname)
*/
*/
int4store
(
buf
,
(
uint32
)
start_position
);
int4store
(
buf
,
(
uint32
)
start_position
);
int2store
(
buf
+
BIN_LOG_HEADER_SIZE
,
binlog_flags
);
int2store
(
buf
+
BIN_LOG_HEADER_SIZE
,
binlog_flags
);
logname_len
=
(
uint
)
strlen
(
logname
);
size_s
tlen
=
strlen
(
logname
);
if
(
tlen
>
UINT_MAX
)
{
fprintf
(
stderr
,
"Log name too long
\n
"
);
error
=
1
;
goto
err
;
}
logname_len
=
(
uint
)
tlen
;
int4store
(
buf
+
6
,
0
);
int4store
(
buf
+
6
,
0
);
memcpy
(
buf
+
10
,
logname
,
logname_len
);
memcpy
(
buf
+
10
,
logname
,
logname_len
);
if
(
simple_command
(
mysql
,
COM_BINLOG_DUMP
,
buf
,
logname_len
+
10
,
1
))
if
(
simple_command
(
mysql
,
COM_BINLOG_DUMP
,
buf
,
logname_len
+
10
,
1
))
...
...
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