~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/blitzdb/ha_blitz.cc

  • Committer: Brian Aker
  • Date: 2010-11-11 04:18:45 UTC
  • mfrom: (1897.4.20 rip-plugin-sysvar)
  • Revision ID: brian@tangent.org-20101111041845-b7td4vnx4wu01ga1
Merge in changes from Monty for sys var.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
using namespace std;
24
24
using namespace drizzled;
 
25
namespace po= boost::program_options;
25
26
 
26
27
static pthread_mutex_t blitz_utility_mutex;
27
28
 
1478
1479
 
1479
1480
  pthread_mutex_init(&blitz_utility_mutex, NULL);
1480
1481
  context.add(blitz_engine);
 
1482
  context.registerVariable(new sys_var_uint64_t_ptr("estimated-rows",
 
1483
                                                    &blitz_estimated_rows));
1481
1484
  return 0;
1482
1485
}
1483
1486
 
1497
1500
  return true;
1498
1501
}
1499
1502
 
1500
 
static DRIZZLE_SYSVAR_ULONGLONG (
1501
 
  estimated_rows,
1502
 
  blitz_estimated_rows,
1503
 
  PLUGIN_VAR_RQCMDARG,
1504
 
  "Estimated number of rows that a BlitzDB table will store.",
1505
 
  NULL,
1506
 
  NULL,
1507
 
  0,
1508
 
  0,
1509
 
  UINT64_MAX,
1510
 
  0
1511
 
);
1512
 
 
1513
 
static drizzle_sys_var *blitz_system_variables[] = {
1514
 
  DRIZZLE_SYSVAR(estimated_rows),
1515
 
  NULL
1516
 
};
1517
 
 
1518
 
DRIZZLE_PLUGIN(blitz_init, blitz_system_variables, NULL);
 
1503
static void blitz_init_options(drizzled::module::option_context &context)
 
1504
{
 
1505
  context("estimated-rows",
 
1506
          po::value<uint64_t>(&blitz_estimated_rows)->default_value(0),
 
1507
          N_("Estimated number of rows that a BlitzDB table will store."));
 
1508
}
 
1509
 
 
1510
DRIZZLE_PLUGIN(blitz_init, NULL, blitz_init_options);