~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/drizzled.cc

  • Committer: Brian Aker
  • Date: 2009-04-09 15:03:26 UTC
  • mfrom: (971.1.44 mordred)
  • Revision ID: brian@gaz-20090409150326-cu50yn12esijpy1c
Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
1597
1597
  }
1598
1598
 
1599
1599
  /*
 
1600
    This is entirely for legacy. We will create a new "disk based" engine and a
 
1601
    "memory" engine which will be configurable longterm. We should be able to
 
1602
    remove partition and myisammrg.
 
1603
  */
 
1604
  const LEX_STRING myisam_engine_name= { C_STRING_WITH_LEN("MyISAM") };
 
1605
  const LEX_STRING heap_engine_name= { C_STRING_WITH_LEN("MEMORY") };
 
1606
  myisam_engine= ha_resolve_by_name(NULL, &myisam_engine_name);
 
1607
  heap_engine= ha_resolve_by_name(NULL, &heap_engine_name);
 
1608
 
 
1609
  /*
1600
1610
    Check that the default storage engine is actually available.
1601
1611
  */
1602
1612
  if (default_storage_engine_str)
1603
1613
  {
1604
1614
    LEX_STRING name= { default_storage_engine_str,
1605
1615
                       strlen(default_storage_engine_str) };
1606
 
    st_plugin_int *plugin;
1607
1616
    StorageEngine *engine;
1608
1617
 
1609
 
    if ((plugin= ha_resolve_by_name(0, &name)))
1610
 
    {
1611
 
      engine= static_cast<StorageEngine *>(plugin->data);
1612
 
    }
1613
 
    else
1614
 
    {
1615
 
          errmsg_printf(ERRMSG_LVL_ERROR, _("Unknown/unsupported table type: %s"),
1616
 
                      default_storage_engine_str);
 
1618
    if (!(engine= ha_resolve_by_name(0, &name)))
 
1619
    {
 
1620
      errmsg_printf(ERRMSG_LVL_ERROR, _("Unknown/unsupported table type: %s"),
 
1621
                    default_storage_engine_str);
1617
1622
      unireg_abort(1);
1618
1623
    }
1619
1624
    if (!engine->is_enabled())
1621
1626
      errmsg_printf(ERRMSG_LVL_ERROR, _("Default storage engine (%s) is not available"),
1622
1627
                    default_storage_engine_str);
1623
1628
      unireg_abort(1);
1624
 
      //assert(global_system_variables.table_plugin);
 
1629
      //assert(global_system_variables.storage_engine);
1625
1630
    }
1626
1631
    else
1627
1632
    {
1628
1633
      /*
1629
 
        Need to unlock as global_system_variables.table_plugin
 
1634
        Need to unlock as global_system_variables.storage_engine
1630
1635
        was acquired during plugin_init()
1631
1636
      */
1632
 
      global_system_variables.table_plugin= plugin;
 
1637
      global_system_variables.storage_engine= engine;
1633
1638
    }
1634
1639
  }
1635
1640
 
2765
2770
  lc_time_names_name= (char*) "en_US";
2766
2771
  /* Set default values for some option variables */
2767
2772
  default_storage_engine_str= (char*) "innodb";
2768
 
  global_system_variables.table_plugin= NULL;
 
2773
  global_system_variables.storage_engine= NULL;
2769
2774
  global_system_variables.tx_isolation= ISO_REPEATABLE_READ;
2770
2775
  global_system_variables.select_limit= (uint64_t) HA_POS_ERROR;
2771
2776
  max_system_variables.select_limit=    (uint64_t) HA_POS_ERROR;