~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to server/sql_plugin.cc

  • Committer: Brian Aker
  • Date: 2008-07-12 14:15:55 UTC
  • Revision ID: brian@tangent.org-20080712141555-n3xn56jc1io3b01v
Random cleanup. Dead partition tests, pass operator in sql_plugin, mtr based
NDB. Removed dead system thread kill tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
188
188
static bool plugin_load_list(MEM_ROOT *tmp_root, int *argc, char **argv,
189
189
                             const char *list);
190
190
static int test_plugin_options(MEM_ROOT *, struct st_plugin_int *,
191
 
                               int *, char **, my_bool);
 
191
                               int *, char **);
192
192
static bool register_builtin(struct st_mysql_plugin *, struct st_plugin_int *,
193
193
                             struct st_plugin_int **);
194
194
static void unlock_variables(THD *thd, struct system_variables *vars);
707
707
      tmp.name.length= name_len;
708
708
      tmp.ref_count= 0;
709
709
      tmp.state= PLUGIN_IS_UNINITIALIZED;
710
 
      if (!test_plugin_options(tmp_root, &tmp, argc, argv, true))
 
710
      if (!test_plugin_options(tmp_root, &tmp, argc, argv))
711
711
      {
712
712
        if ((tmp_plugin_ptr= plugin_insert_or_reuse(&tmp)))
713
713
        {
1003
1003
int plugin_init(int *argc, char **argv, int flags)
1004
1004
{
1005
1005
  uint i;
1006
 
  bool def_enabled, is_myisam;
 
1006
  bool is_myisam;
1007
1007
  struct st_mysql_plugin **builtins;
1008
1008
  struct st_mysql_plugin *plugin;
1009
1009
  struct st_plugin_int tmp, *plugin_ptr, **reap;
1043
1043
    for (plugin= *builtins; plugin->info; plugin++)
1044
1044
    {
1045
1045
      /* by default, only ndbcluster is disabled */
1046
 
      def_enabled=
1047
 
        my_strcasecmp(&my_charset_latin1, plugin->name, "NDBCLUSTER") != 0;
1048
1046
      bzero(&tmp, sizeof(tmp));
1049
1047
      tmp.plugin= plugin;
1050
1048
      tmp.name.str= (char *)plugin->name;
1051
1049
      tmp.name.length= strlen(plugin->name);
1052
1050
 
1053
1051
      free_root(&tmp_root, MYF(MY_MARK_BLOCKS_FREE));
1054
 
      if (test_plugin_options(&tmp_root, &tmp, argc, argv, def_enabled))
 
1052
      if (test_plugin_options(&tmp_root, &tmp, argc, argv))
1055
1053
        continue;
1056
1054
 
1057
1055
      if (register_builtin(plugin, &tmp, &plugin_ptr))
1186
1184
 
1187
1185
  rw_wrlock(&LOCK_system_variables_hash);
1188
1186
 
1189
 
  if (test_plugin_options(thd->mem_root, &tmp, &dummy_argc, NULL, true))
 
1187
  if (test_plugin_options(thd->mem_root, &tmp, &dummy_argc, NULL))
1190
1188
    goto end;
1191
1189
 
1192
1190
  if ((result= register_builtin(plugin, &tmp, &ptr)))
2774
2772
    Requires that a write-lock is held on LOCK_system_variables_hash
2775
2773
*/
2776
2774
static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
2777
 
                               int *argc, char **argv, my_bool default_enabled)
 
2775
                               int *argc, char **argv)
2778
2776
{
2779
2777
  struct sys_var_chain chain= { NULL, NULL };
 
2778
  my_bool default_enabled= true;
2780
2779
  my_bool enabled_saved= default_enabled, can_disable;
2781
2780
  my_bool *enabled= &default_enabled;
2782
2781
  MEM_ROOT *mem_root= alloc_root_inited(&tmp->mem_root) ?