~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzledump.cc

  • Committer: Andrew Hutchings
  • Date: 2011-03-03 22:12:08 UTC
  • mto: This revision was merged to the branch mainline in revision 2218.
  • Revision ID: andrew@linuxjedi.co.uk-20110303221208-i45akhew5caojgel
Use current unix username as login by default for our client apps

Show diffs side-by-side

added added

removed removed

Lines of Context:
524
524
  _("Do not make a UTF8 connection to MySQL, use if you have UTF8 data in a non-UTF8 table"))
525
525
  ;
526
526
 
 
527
  const char* unix_user= getlogin();
 
528
 
527
529
  po::options_description client_options(_("Options specific to the client"));
528
530
  client_options.add_options()
529
531
  ("host,h", po::value<string>(&current_host)->default_value("localhost"),
532
534
  _("Password to use when connecting to server. If password is not given it's solicited on the tty."))
533
535
  ("port,p", po::value<uint32_t>(&opt_drizzle_port)->default_value(0),
534
536
  _("Port number to use for connection."))
535
 
  ("user,u", po::value<string>(&current_user)->default_value(""),
 
537
  ("user,u", po::value<string>(&current_user)->default_value((unix_user ? unix_user : "")),
536
538
  _("User for login if not current user."))
537
539
  ("protocol",po::value<string>(&opt_protocol)->default_value("mysql"),
538
540
  _("The protocol of connection (mysql or drizzle)."))