~percona-toolkit-dev/percona-toolkit/fix-password-comma-bug-886077

« back to all changes in this revision

Viewing changes to docs/percona-toolkit.pod

  • Committer: Daniel Nichter
  • Date: 2012-05-24 17:20:38 UTC
  • Revision ID: daniel@percona.com-20120524172038-325wq54rx5xjuj0c
Remove \, from any DSN part (value or bareword).  Document that DSN values must be escaped.

Show diffs side-by-side

added added

removed removed

Lines of Context:
313
313
key part.  For example, if DSN C<h=host1> and option C<--port=12345> are
314
314
specified, then the tool automatically adds C<P=12345> to DSN.
315
315
 
 
316
=head2 ESCAPING VALUES
 
317
 
 
318
DSNs are usually specified on the command line, so shell quoting and escaping
 
319
must be taken into account.  Special characters, like asterisk (C<*>), need
 
320
to be quoted and/or escaped properly to be passed as literal characters in
 
321
DSN values.
 
322
 
 
323
Since DSN parts are separated by commas, literal commas in DSN values must
 
324
be escaped with a single backslash (C<\>).  And since a backslash is
 
325
the escape character for most shells, two backslashes are required to pass
 
326
a literal backslash.  For example, if the username is literally C<my,name>,
 
327
it must be specified as C<my\\,name> on most shells.  This applies to DSNs
 
328
and DSN-related options like C<--user>.
 
329
 
316
330
=head2 KEY PARTS
317
331
 
318
332
Many of the tools add more parts to DSNs for special purposes, and sometimes