summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Nesterenko <brandon.nesterenko@mariadb.com>2021-10-07 11:28:49 -0600
committerBrandon Nesterenko <brandon.nesterenko@mariadb.com>2021-10-07 11:30:22 -0600
commit478020171dd048e2584fd774e3cb30a9c4ae690b (patch)
treef7450115c0d34f567135ec93c4298e5f89fbbb3b
parent1ce35c327ed90fa67da53a3f9d470f195d879417 (diff)
downloadmariadb-git-bb-10.2-MDEV-25444-docs.tar.gz
MDEV-25444: mysql --binary-mode is not able to replay some mysqlbinlog outputsbb-10.2-MDEV-25444-docs
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>
-rw-r--r--client/mysql.cc13
-rw-r--r--man/mysql.19
2 files changed, 16 insertions, 6 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index 2baac7b92b8..cd2c37972bc 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -1698,11 +1698,14 @@ static struct my_option my_long_options[] =
&opt_default_auth, &opt_default_auth, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"binary-mode", 0,
- "By default, ASCII '\\0' is disallowed and '\\r\\n' is translated to '\\n'. "
- "This switch turns off both features, and also turns off parsing of all client"
- "commands except \\C 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 "
+ "\\C 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 '\\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},
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
diff --git a/man/mysql.1 b/man/mysql.1
index 56e753160ce..6c05bbab311 100644
--- a/man/mysql.1
+++ b/man/mysql.1
@@ -206,7 +206,14 @@ option\&.
.\" binary-mode option: mysql
\fB\-\-binary\-mode\fR
.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
.sp
.RS 4