~posulliv/drizzle/memcached_applier

« back to all changes in this revision

Viewing changes to drizzled/drizzled.cc

  • Committer: Jay Pipes
  • Date: 2009-08-03 14:23:22 UTC
  • mfrom: (1039.2.68 staging)
  • mto: This revision was merged to the branch mainline in revision 1078.
  • Revision ID: jpipes@serialcoder-20090803142322-1g67h7su9mocg9ig
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
215
215
 
216
216
/* static variables */
217
217
 
218
 
extern TYPELIB optimizer_use_mrr_typelib;
219
 
 
220
218
static bool volatile select_thread_in_use;
221
219
static bool volatile ready_to_exit;
222
220
static bool opt_debugging= 0;
1179
1177
  {"show_fields",          (char*) offsetof(STATUS_VAR, com_stat[(uint32_t) SQLCOM_SHOW_FIELDS]), SHOW_LONG_STATUS},
1180
1178
  {"show_keys",            (char*) offsetof(STATUS_VAR, com_stat[(uint32_t) SQLCOM_SHOW_KEYS]), SHOW_LONG_STATUS},
1181
1179
  {"show_open_tables",     (char*) offsetof(STATUS_VAR, com_stat[(uint32_t) SQLCOM_SHOW_OPEN_TABLES]), SHOW_LONG_STATUS},
1182
 
  {"show_plugins",         (char*) offsetof(STATUS_VAR, com_stat[(uint32_t) SQLCOM_SHOW_PLUGINS]), SHOW_LONG_STATUS},
1183
1180
  {"show_processlist",     (char*) offsetof(STATUS_VAR, com_stat[(uint32_t) SQLCOM_SHOW_PROCESSLIST]), SHOW_LONG_STATUS},
1184
1181
  {"show_status",          (char*) offsetof(STATUS_VAR, com_stat[(uint32_t) SQLCOM_SHOW_STATUS]), SHOW_LONG_STATUS},
1185
1182
  {"show_table_status",    (char*) offsetof(STATUS_VAR, com_stat[(uint32_t) SQLCOM_SHOW_TABLE_STATUS]), SHOW_LONG_STATUS},
1291
1288
  /* Set collactions that depends on the default collation */
1292
1289
  global_system_variables.collation_server=      default_charset_info;
1293
1290
 
1294
 
  global_system_variables.optimizer_use_mrr= 1;
1295
1291
  global_system_variables.optimizer_switch= 0;
1296
1292
 
1297
1293
  if (!(character_set_filesystem=
1436
1432
    "memory" engine which will be configurable longterm. We should be able to
1437
1433
    remove partition and myisammrg.
1438
1434
  */
1439
 
  const LEX_STRING myisam_engine_name= { C_STRING_WITH_LEN("MyISAM") };
1440
 
  const LEX_STRING heap_engine_name= { C_STRING_WITH_LEN("MEMORY") };
1441
 
  myisam_engine= ha_resolve_by_name(NULL, &myisam_engine_name);
1442
 
  heap_engine= ha_resolve_by_name(NULL, &heap_engine_name);
 
1435
  const std::string myisam_engine_name("MyISAM");
 
1436
  const std::string heap_engine_name("MEMORY");
 
1437
  myisam_engine= ha_resolve_by_name(NULL, myisam_engine_name);
 
1438
  heap_engine= ha_resolve_by_name(NULL, heap_engine_name);
1443
1439
 
1444
1440
  /*
1445
1441
    Check that the default storage engine is actually available.
1446
1442
  */
1447
1443
  if (default_storage_engine_str)
1448
1444
  {
1449
 
    LEX_STRING name= { default_storage_engine_str,
1450
 
                       strlen(default_storage_engine_str) };
 
1445
    const std::string name(default_storage_engine_str);
1451
1446
    StorageEngine *engine;
1452
1447
 
1453
 
    if (!(engine= ha_resolve_by_name(0, &name)))
 
1448
    engine= ha_resolve_by_name(0, name);
 
1449
    if (engine == NULL)
1454
1450
    {
1455
1451
      errmsg_printf(ERRMSG_LVL_ERROR, _("Unknown/unsupported table type: %s"),
1456
1452
                    default_storage_engine_str);
1750
1746
  OPT_PLUGIN_DIR,
1751
1747
  OPT_PORT_OPEN_TIMEOUT,
1752
1748
  OPT_SECURE_FILE_PRIV,
1753
 
  OPT_MIN_EXAMINED_ROW_LIMIT,
1754
 
  OPT_OPTIMIZER_USE_MRR
 
1749
  OPT_MIN_EXAMINED_ROW_LIMIT
1755
1750
};
1756
1751
 
1757
1752
 
2080
2075
   (char**) &global_system_variables.optimizer_search_depth,
2081
2076
   (char**) &max_system_variables.optimizer_search_depth,
2082
2077
   0, GET_UINT, OPT_ARG, MAX_TABLES+1, 0, MAX_TABLES+2, 0, 1, 0},
2083
 
  {"optimizer_use_mrr", OPT_OPTIMIZER_USE_MRR,
2084
 
   N_("Should the Optmizer use MRR or not. "
2085
 
      "Valid values are auto, force and disable"),
2086
 
   0, 0, 0, GET_STR, REQUIRED_ARG, 0,
2087
 
   0, 0, 0, 0, 0},
2088
2078
  {"plugin_dir", OPT_PLUGIN_DIR,
2089
2079
   N_("Directory for plugins."),
2090
2080
   (char**) &opt_plugin_dir_ptr, (char**) &opt_plugin_dir_ptr, 0,
2552
2542
      global_system_variables.tx_isolation= (type-1);
2553
2543
      break;
2554
2544
    }
2555
 
  case OPT_OPTIMIZER_USE_MRR:
2556
 
    {
2557
 
      int type;
2558
 
      type= find_type_or_exit(argument, &optimizer_use_mrr_typelib, opt->name);
2559
 
      global_system_variables.optimizer_use_mrr= (type-1);
2560
 
      break;
2561
 
    }
2562
2545
  case OPT_TC_HEURISTIC_RECOVER:
2563
2546
    tc_heuristic_recover= find_type_or_exit(argument,
2564
2547
                                            &tc_heuristic_recover_typelib,