mirror of
https://github.com/percona/percona-toolkit.git
synced 2026-02-27 02:00:57 +08:00
Remove \, from any DSN part (value or bareword). Document that DSN values must be escaped.
This commit is contained in:
@@ -313,6 +313,20 @@ provide defaults for all DSNs that do not specify the option's corresponding
|
||||
key part. For example, if DSN C<h=host1> and option C<--port=12345> are
|
||||
specified, then the tool automatically adds C<P=12345> to DSN.
|
||||
|
||||
=head2 ESCAPING VALUES
|
||||
|
||||
DSNs are usually specified on the command line, so shell quoting and escaping
|
||||
must be taken into account. Special characters, like asterisk (C<*>), need
|
||||
to be quoted and/or escaped properly to be passed as literal characters in
|
||||
DSN values.
|
||||
|
||||
Since DSN parts are separated by commas, literal commas in DSN values must
|
||||
be escaped with a single backslash (C<\>). And since a backslash is
|
||||
the escape character for most shells, two backslashes are required to pass
|
||||
a literal backslash. For example, if the username is literally C<my,name>,
|
||||
it must be specified as C<my\\,name> on most shells. This applies to DSNs
|
||||
and DSN-related options like C<--user>.
|
||||
|
||||
=head2 KEY PARTS
|
||||
|
||||
Many of the tools add more parts to DSNs for special purposes, and sometimes
|
||||
|
||||
Reference in New Issue
Block a user