~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/console/console.cc

  • Committer: Lee Bieber
  • Date: 2011-04-13 23:47:18 UTC
  • mfrom: (2276.1.2 build)
  • Revision ID: kalebral@gmail.com-20110413234718-uc6emsr6ms1szt4c
Merge Olaf - Refactor Program Options usage
Merge Andrew - 748064: Xtrabackup breaks trunk in GCC 4.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
367
367
static int init(drizzled::module::Context &context)
368
368
{
369
369
  const module::option_map &vm= context.getOptions();
370
 
  const string username(vm.count("username") ? vm["username"].as<string>() : "");
371
 
  const string password(vm.count("password") ? vm["password"].as<string>() : "");
372
 
  const string schema(vm.count("schema") ? vm["schema"].as<string>() : "");
373
 
 
374
 
  const std::string catalog(vm.count("catalog") ? vm["catalog"].as<string>() : "LOCAL");
375
 
 
376
 
  context.add(new ListenConsole("console", username, password, schema, catalog));
377
 
 
 
370
  context.add(new ListenConsole("console", vm["username"].as<string>(), 
 
371
    vm["password"].as<string>(), vm["schema"].as<string>(), vm["catalog"].as<string>()));
378
372
  return 0;
379
373
}
380
374
 
387
381
          po::value<bool>(&debug_enabled)->default_value(false)->zero_tokens(),
388
382
          N_("Turn on extra debugging."));
389
383
  context("username",
390
 
          po::value<string>(),
 
384
          po::value<string>()->default_value(""),
391
385
          N_("User to use for auth."));
392
386
  context("password",
393
 
          po::value<string>(),
 
387
          po::value<string>()->default_value(""),
394
388
          N_("Password to use for auth."));
395
389
  context("catalog",
396
 
          po::value<string>(),
 
390
          po::value<string>()->default_value("LOCAL"),
397
391
          N_("Default catalog to use."));
398
392
  context("schema",
399
 
          po::value<string>(),
 
393
          po::value<string>()->default_value(""),
400
394
          N_("Default schema to use."));
401
395
}
402
396