Commit 47802017 authored by Brandon Nesterenko's avatar Brandon Nesterenko

MDEV-25444: mysql --binary-mode is not able to replay some mysqlbinlog outputs

This is a documentation-only patch to refine the description of
binary mode for the mariadb client.

Reviewed By:
============
Andrei Elkin <andrei.elkin@mariadb.com>
parent 1ce35c32
...@@ -1698,11 +1698,14 @@ static struct my_option my_long_options[] = ...@@ -1698,11 +1698,14 @@ static struct my_option my_long_options[] =
&opt_default_auth, &opt_default_auth, 0, &opt_default_auth, &opt_default_auth, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"binary-mode", 0, {"binary-mode", 0,
"By default, ASCII '\\0' is disallowed and '\\r\\n' is translated to '\\n'. " "Binary mode allows certain character sequences to be processed as data "
"This switch turns off both features, and also turns off parsing of all client" "that would otherwise be treated with a special meaning by the parser. "
"commands except \\C and DELIMITER, in non-interactive mode (for input " "Specifically, this switch turns off parsing of all client commands except "
"piped to mysql or loaded using the 'source' command). This is necessary " "\\C and DELIMITER in non-interactive mode (i.e., when binary mode is "
"when processing output from mysqlbinlog that may contain blobs.", "combined with either 1) piped input, 2) the --batch mysql option, or 3) "
"the 'source' command). Also, in binary mode, occurrences of '\\r\\n' and "
"ASCII '\\0' are preserved within strings, whereas by default, '\\r\\n' is "
"translated to '\\n' and '\\0' is disallowed in user input.",
&opt_binary_mode, &opt_binary_mode, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, &opt_binary_mode, &opt_binary_mode, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
}; };
......
...@@ -206,7 +206,14 @@ option\&. ...@@ -206,7 +206,14 @@ option\&.
.\" binary-mode option: mysql .\" binary-mode option: mysql
\fB\-\-binary\-mode\fR \fB\-\-binary\-mode\fR
.sp .sp
By default, ASCII '\e0' is disallowed and '\er\en' is translated to '\en'\&. This switch turns off both features, and also turns off parsing of all client commands except \eC and DELIMITER, in non-interactive mode (for input piped to mysql or loaded using the 'source' command)\&. This is necessary when processing output from mysqlbinlog that may contain blobs\&. Binary mode allows certain character sequences to be processed as data that
would otherwise be treated with a special meaning by the parser\&.
Specifically, this switch turns off parsing of all client commands except \eC
and DELIMITER in non-interactive mode (i\&.e\&., when binary mode is combined
with either 1) piped input, 2) the --batch mysql option, or 3) the 'source'
command)\&. Also, in binary mode, occurrences of '\er\en' and ASCII '\e0' are
preserved within strings, whereas by default, '\er\en' is translated to '\en'
and '\e0' is disallowed in user input\&.
.RE .RE
.sp .sp
.RS 4 .RS 4
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment