diff options
author | Brandon Nesterenko <brandon.nesterenko@mariadb.com> | 2021-08-11 11:29:37 -0600 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2021-12-15 20:13:46 +0100 |
commit | 97509e270c4a4a8fc7acedbb37c74a3c924740b1 (patch) | |
tree | 238c20b40533ab26565cc5c8c48592c9d6b9fcb7 /man/mysqlbinlog.1 | |
parent | 6208228b78917bff13b5dc34428b38596f7404b4 (diff) | |
download | mariadb-git-preview-10.8-MDEV-4989-mysqlbinlog-gtid.tar.gz |
MDEV-4989: Support for GTID in mysqlbinlogpreview-10.8-MDEV-4989-mysqlbinlog-gtid
New Feature:
===========
This commit extends the mariadb-binlog capabilities to allow events
to be filtered by GTID ranges. More specifically, the following
capabilities are addressed:
1) GTIDs can be used to filter results on local binlog files
2) GTIDs can be used to filter results from remote servers
3) For a given GTID range, its start-position is exclusive and
its stop-position is inclusive. This allows users to receive
events strictly after those that they already have, and is
useful in cases such as: 1) events were received out of order
and should be re-sent, or 2) specifying the gtid state of a
slave to get events newer than their current state.
domain id are reset to their former values. If a seq_no is 0
for start-position, it means to include the entirety of the
domain. If a seq_no is 0 for stop-position, it means to
exclude all events from that domain.
4) Implemented --gtid-strict-mode that ensures the GTID event
stream in each domain is monotonically increasing
5) Added new level of verbosity in mysqlbinlog -vvv to print
additional diagnostic information about invalid GTID states
To facilitate these features, the --start-position and
--stop-position arguments have been extended to accept values
formatted as a list of GTID positions, e.g.
--start-position=0-1-0,1-2-55
A few additional notes:
1) this commit squashes together the commits:
f4319661120e-78a9d49907ba
2) Changed rpl.rpl_blackhole_row_annotate test because it has
out of order GTIDs in its binlog, so I added
--skip-gtid-strict-mode
3) After all binlog events have been written, the session server
id and domain id are reset to their values in the global state.
Reviewed By:
===========
Andrei Elkin: <andrei.elkin@mariadb.com>
Diffstat (limited to 'man/mysqlbinlog.1')
-rw-r--r-- | man/mysqlbinlog.1 | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/man/mysqlbinlog.1 b/man/mysqlbinlog.1 index 633300bb7c5..7ad8c714490 100644 --- a/man/mysqlbinlog.1 +++ b/man/mysqlbinlog.1 @@ -992,8 +992,15 @@ This option is useful for point\-in\-time recovery\&. \fB\-\-start\-position=\fR\fB\fIN\fR\fR, \fB\-j \fR\fB\fIN\fR\fR .sp -Start reading the binary log at the first event having a position equal to or greater than -\fIN\fR\&. This option applies to the first log file named on the command line\&. +Start reading the binary log at \fIN\fR\&. Type can either be a positive +integer or a GTID\& list\&. When using a positive integer, the value only +applies to the first binlog passed on the command line, and the first event +that has a position equal to or greater than \fIN\fR is printed\&. In GTID mode, +multiple GTIDs can be passed as a comma separated list, where each must have a +unique domain id\&. The list represents the gtid binlog state that the client +(another "replica" server) is aware of\&. Therefore, each GTID is exclusive; only +events after a given sequence number will be printed to allow users to receive +events after their current state\&. .sp This option is useful for point\-in\-time recovery\&. .RE @@ -1006,6 +1013,23 @@ This option is useful for point\-in\-time recovery\&. .sp -1 .IP \(bu 2.3 .\} +.\" mysqlbinlog: gtid-strict-mode +.\" gtid-strict-mode option: mysqlbinlog +\fB\-\-gtid\-strict\-mode +.sp +Process binlog according to gtid-strict-mode specification\&. The start, stop +positions are verified to satisfy start < stop comparison condition\&. Sequence +numbers of any gtid domain must comprise monotically growing sequence\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} .\" mysqlbinlog: stop-datetime option .\" stop-datetime option: mysqlbinlog \fB\-\-stop\-datetime=\fR\fB\fIdatetime\fR\fR @@ -1063,8 +1087,13 @@ The slave server_id used for \fB--read-from-remote-server --stop-never\fR\&. .\" stop-position option: mysqlbinlog \fB\-\-stop\-position=\fR\fB\fIN\fR\fR .sp -Stop reading the binary log at the first event having a position equal to or greater than -\fIN\fR\&. This option applies to the last log file named on the command line\&. +Stop reading the binary log at the first event having a position equal to or +greater than \fIN\fR\&. Type can either be a positive integer or a GTID +list\&. When using a positive integer, the value only applies to the last log +file named on the command line\&. When in GTID mode, multiple GTIDs can be +passed as a comma separated list, where each must have a unique domain id\&. +Each GTID is inclusive; only events up to the given sequence numbers are +printed. .sp This option is useful for point\-in\-time recovery\&. .RE @@ -1133,6 +1162,7 @@ The MariaDB username to use when connecting to a remote server\&. \fB\-v\fR .sp Reconstruct row events and display them as commented SQL statements\&. If this option is given twice, the output includes comments to indicate column data types and some metadata\&. +If this option is given three times, the output includes diagnostic warnings about event integrity before program exit\&. .sp For examples that show the effect of \fB\-\-base64\-output\fR |