~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/drizzled.cc

  • Committer: Monty Taylor
  • Date: 2009-04-08 07:16:54 UTC
  • mto: (992.1.1 mordred)
  • mto: This revision was merged to the branch mainline in revision 986.
  • Revision ID: mordred@inaugust.com-20090408071654-3bg2ek90us0fioc8
Store StorageEngine in system variables, rather than storage engine plugin.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1617
1617
  {
1618
1618
    LEX_STRING name= { default_storage_engine_str,
1619
1619
                       strlen(default_storage_engine_str) };
1620
 
    st_plugin_int *plugin;
1621
1620
    StorageEngine *engine;
1622
1621
 
1623
 
    if ((plugin= ha_resolve_by_name(0, &name)))
1624
 
    {
1625
 
      engine= static_cast<StorageEngine *>(plugin->data);
1626
 
    }
1627
 
    else
1628
 
    {
1629
 
          errmsg_printf(ERRMSG_LVL_ERROR, _("Unknown/unsupported table type: %s"),
1630
 
                      default_storage_engine_str);
 
1622
    if (!(engine= ha_resolve_by_name(0, &name)))
 
1623
    {
 
1624
      errmsg_printf(ERRMSG_LVL_ERROR, _("Unknown/unsupported table type: %s"),
 
1625
                    default_storage_engine_str);
1631
1626
      unireg_abort(1);
1632
1627
    }
1633
1628
    if (!engine->is_enabled())
1635
1630
      errmsg_printf(ERRMSG_LVL_ERROR, _("Default storage engine (%s) is not available"),
1636
1631
                    default_storage_engine_str);
1637
1632
      unireg_abort(1);
1638
 
      //assert(global_system_variables.table_plugin);
 
1633
      //assert(global_system_variables.storage_engine);
1639
1634
    }
1640
1635
    else
1641
1636
    {
1642
1637
      /*
1643
 
        Need to unlock as global_system_variables.table_plugin
 
1638
        Need to unlock as global_system_variables.storage_engine
1644
1639
        was acquired during plugin_init()
1645
1640
      */
1646
 
      global_system_variables.table_plugin= plugin;
 
1641
      global_system_variables.storage_engine= engine;
1647
1642
    }
1648
1643
  }
1649
1644
 
2776
2771
  lc_time_names_name= (char*) "en_US";
2777
2772
  /* Set default values for some option variables */
2778
2773
  default_storage_engine_str= (char*) "innodb";
2779
 
  global_system_variables.table_plugin= NULL;
 
2774
  global_system_variables.storage_engine= NULL;
2780
2775
  global_system_variables.tx_isolation= ISO_REPEATABLE_READ;
2781
2776
  global_system_variables.select_limit= (uint64_t) HA_POS_ERROR;
2782
2777
  max_system_variables.select_limit=    (uint64_t) HA_POS_ERROR;