~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzle.cc

  • Committer: Andrew Hutchings
  • Date: 2011-06-07 21:19:19 UTC
  • mto: This revision was merged to the branch mainline in revision 2327.
  • Revision ID: andrew@linuxjedi.co.uk-20110607211919-7ef8spt1qkefxoyx
Remove all drizzleadmin code (hopefully)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1471
1471
  ("max-join-size", po::value<uint32_t>(&max_join_size)->default_value(1000000L),
1472
1472
  _("Automatic limit for rows in a join when using --safe-updates"))
1473
1473
  ;
1474
 
#ifndef DRIZZLE_ADMIN_TOOL
1475
1474
  const char* unix_user= getlogin();
1476
 
#endif
1477
1475
  po::options_description client_options(_("Options specific to the client"));
1478
1476
  client_options.add_options()
1479
1477
  ("host,h", po::value<string>(&current_host)->default_value("localhost"),
1482
1480
  _("Password to use when connecting to server. If password is not given it's asked from the tty."))
1483
1481
  ("port,p", po::value<uint32_t>()->default_value(0),
1484
1482
  _("Port number to use for connection or 0 for default to, in order of preference, drizzle.cnf, $DRIZZLE_TCP_PORT, built-in default"))
1485
 
#ifdef DRIZZLE_ADMIN_TOOL
1486
 
  ("user,u", po::value<string>(&current_user)->default_value("root"),
1487
 
#else
1488
1483
  ("user,u", po::value<string>(&current_user)->default_value((unix_user ? unix_user : "")),
1489
 
#endif
1490
1484
  _("User for login if not current user."))
1491
1485
  ("protocol",po::value<string>(&opt_protocol)->default_value("mysql"),
1492
1486
  _("The protocol of connection (mysql, mysql-plugin-auth, or drizzle)."))
1546
1540
 
1547
1541
  po::notify(vm);
1548
1542
 
1549
 
#ifdef DRIZZLE_ADMIN_TOOL
1550
 
  default_prompt= strdup(getenv("DRIZZLE_PS1") ?
1551
 
                         getenv("DRIZZLE_PS1") :
1552
 
                         "drizzleadmin> ");
1553
 
#else
1554
1543
  default_prompt= strdup(getenv("DRIZZLE_PS1") ?
1555
1544
                         getenv("DRIZZLE_PS1") :
1556
1545
                         "drizzle> ");
1557
 
#endif
1558
1546
  if (default_prompt == NULL)
1559
1547
  {
1560
1548
    fprintf(stderr, _("Memory allocation error while constructing initial "
4215
4203
  }
4216
4204
  drizzle_create(&drizzle);
4217
4205
 
4218
 
#ifdef DRIZZLE_ADMIN_TOOL
4219
 
  global_con_options= (drizzle_con_options_t) (DRIZZLE_CON_ADMIN | global_con_options);
4220
 
#endif
4221
 
 
4222
4206
  if (drizzle_con_add_tcp(&drizzle, &con, (char *)host.c_str(),
4223
4207
                          opt_drizzle_port, (char *)user.c_str(),
4224
4208
                          (char *)password.c_str(), (char *)database.c_str(),