~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzle.cc

  • Committer: Lee Bieber
  • Date: 2011-03-04 01:37:48 UTC
  • mfrom: (2216.2.1 trunk-bug-728667)
  • Revision ID: kalebral@gmail.com-20110304013748-7gx0tsihznnsdbtv
Merge Andrew - 728667: drizzle client needs to send unix username

Show diffs side-by-side

added added

removed removed

Lines of Context:
1470
1470
  ("max-join-size", po::value<uint32_t>(&max_join_size)->default_value(1000000L),
1471
1471
  _("Automatic limit for rows in a join when using --safe-updates"))
1472
1472
  ;
1473
 
 
 
1473
#ifndef DRIZZLE_ADMIN_TOOL
 
1474
  const char* unix_user= getlogin();
 
1475
#endif
1474
1476
  po::options_description client_options(_("Options specific to the client"));
1475
1477
  client_options.add_options()
1476
1478
  ("host,h", po::value<string>(&current_host)->default_value("localhost"),
1482
1484
#ifdef DRIZZLE_ADMIN_TOOL
1483
1485
  ("user,u", po::value<string>(&current_user)->default_value("root"),
1484
1486
#else
1485
 
  ("user,u", po::value<string>(&current_user)->default_value(""),
 
1487
  ("user,u", po::value<string>(&current_user)->default_value((unix_user ? unix_user : "")),
1486
1488
#endif
1487
1489
  _("User for login if not current user."))
1488
1490
  ("protocol",po::value<string>(&opt_protocol)->default_value("mysql"),