~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_plugin.cc

  • Committer: Padraig O'Sullivan
  • Date: 2009-04-09 23:30:44 UTC
  • mfrom: (988 drizzle)
  • mto: (971.1.63 mordred)
  • mto: This revision was merged to the branch mainline in revision 990.
  • Revision ID: osullivan.padraig@gmail.com-20090409233044-ktwjqhe1qowzv63v
Added a new helper function for testing and setting a bit in a bitset. Also,
merged from trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
718
718
      */
719
719
      if (my_strcasecmp(&my_charset_utf8_general_ci, plugin->name, "MyISAM") == 0)
720
720
      {
721
 
        assert(!global_system_variables.table_plugin);
722
 
        global_system_variables.table_plugin= plugin_ptr;
 
721
        assert(!global_system_variables.storage_engine);
 
722
        global_system_variables.storage_engine= static_cast<StorageEngine *>(plugin_ptr->data);
723
723
      }
724
724
    }
725
725
  }
726
726
 
727
727
  /* should now be set to MyISAM storage engine */
728
 
  assert(global_system_variables.table_plugin);
 
728
  assert(global_system_variables.storage_engine);
729
729
 
730
730
  /* Register all dynamic plugins */
731
731
  if (!(flags & PLUGIN_INIT_SKIP_DYNAMIC_LOADING))
1569
1569
 
1570
1570
void plugin_sessionvar_init(Session *session)
1571
1571
{
1572
 
  session->variables.table_plugin= NULL;
 
1572
  session->variables.storage_engine= NULL;
1573
1573
  cleanup_variables(session, &session->variables);
1574
1574
 
1575
1575
  session->variables= global_system_variables;
1576
 
  session->variables.table_plugin= NULL;
 
1576
  session->variables.storage_engine= NULL;
1577
1577
 
1578
1578
  /* we are going to allocate these lazily */
1579
1579
  session->variables.dynamic_variables_version= 0;
1580
1580
  session->variables.dynamic_variables_size= 0;
1581
1581
  session->variables.dynamic_variables_ptr= 0;
1582
1582
 
1583
 
  session->variables.table_plugin= global_system_variables.table_plugin;
 
1583
  session->variables.storage_engine= global_system_variables.storage_engine;
1584
1584
}
1585
1585
 
1586
1586
 
1589
1589
*/
1590
1590
static void unlock_variables(Session *, struct system_variables *vars)
1591
1591
{
1592
 
  vars->table_plugin= NULL;
 
1592
  vars->storage_engine= NULL;
1593
1593
}
1594
1594
 
1595
1595
 
1629
1629
  }
1630
1630
  pthread_rwlock_unlock(&LOCK_system_variables_hash);
1631
1631
 
1632
 
  assert(vars->table_plugin == NULL);
 
1632
  assert(vars->storage_engine == NULL);
1633
1633
 
1634
1634
  free(vars->dynamic_variables_ptr);
1635
1635
  vars->dynamic_variables_ptr= NULL;