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
19d99faf
Commit
19d99faf
authored
Nov 16, 2015
by
Oleksandr Byelkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-8734 mysqlbinlog --start-position isn't bigint
fix it only for local operations.
parent
c0216f1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
client/mysqlbinlog.cc
client/mysqlbinlog.cc
+14
-2
No files found.
client/mysqlbinlog.cc
View file @
19d99faf
...
...
@@ -1405,8 +1405,11 @@ static struct my_option my_options[] =
"passed on the command line."
,
&
start_position
,
&
start_position
,
0
,
GET_ULL
,
REQUIRED_ARG
,
BIN_LOG_HEADER_SIZE
,
BIN_LOG_HEADER_SIZE
,
/* COM_BINLOG_DUMP accepts only 4 bytes for the position */
(
ulonglong
)(
~
(
uint32
)
0
),
0
,
0
,
0
},
/*
COM_BINLOG_DUMP accepts only 4 bytes for the position
so remote log reading has lower limit.
*/
(
ulonglong
)(
0xffffffffffffffffULL
),
0
,
0
,
0
},
{
"stop-datetime"
,
OPT_STOP_DATETIME
,
"Stop reading the binlog at first event having a datetime equal or "
"posterior to the argument; the argument must be a date and time "
...
...
@@ -1721,6 +1724,14 @@ static int parse_args(int *argc, char*** argv)
my_end_arg
=
MY_CHECK_ERROR
|
MY_GIVE_INFO
;
if
(
debug_check_flag
)
my_end_arg
=
MY_CHECK_ERROR
;
if
(
start_position
>
UINT_MAX32
&&
remote_opt
)
{
/* Here we just emulate old behaviour of option limit handling */
fprintf
(
stderr
,
"Warning: option 'start-position': unsigned value %llu "
"adjusted to 4294967295 (limitation of the client-server protocol)"
,
start_position
);
start_position
=
UINT_MAX32
;
}
return
0
;
}
...
...
@@ -1953,6 +1964,7 @@ static Exit_status dump_remote_log_entries(PRINT_EVENT_INFO *print_event_info,
COM_BINLOG_DUMP accepts only 4 bytes for the position, so we are forced to
cast to uint32.
*/
DBUG_ASSERT
(
start_position
<=
UINT_MAX32
);
int4store
(
buf
,
(
uint32
)
start_position
);
if
(
!
opt_skip_annotate_row_events
)
binlog_flags
|=
BINLOG_SEND_ANNOTATE_ROWS_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