~jaypipes/drizzle/subscriber-plugin

« back to all changes in this revision

Viewing changes to drizzled/sql_plugin.cc

  • Committer: Brian Aker
  • Date: 2008-07-29 07:47:38 UTC
  • mfrom: (212.6.1 bzero-memset)
  • Revision ID: brian@tangent.org-20080729074738-lfzim6htapm42f2o
MergeĀ fromĀ Mats

Show diffs side-by-side

added added

removed removed

Lines of Context:
334
334
    tmp->ref_count++;
335
335
    return(tmp);
336
336
  }
337
 
  bzero(&plugin_dl, sizeof(plugin_dl));
 
337
  memset(&plugin_dl, 0, sizeof(plugin_dl));
338
338
  /* Compile dll path */
339
339
  dlpathlen=
340
340
    strxnmov(dlpath, sizeof(dlpath) - 1, opt_plugin_dir, "/", dl->str, NullS) -
416
416
      if (! --tmp->ref_count)
417
417
      {
418
418
        free_plugin_mem(tmp);
419
 
        bzero(tmp, sizeof(struct st_plugin_dl));
 
419
        memset(tmp, 0, sizeof(struct st_plugin_dl));
420
420
      }
421
421
      break;
422
422
    }
567
567
    return(true);
568
568
  }
569
569
  /* Clear the whole struct to catch future extensions. */
570
 
  bzero((char*) &tmp, sizeof(tmp));
 
570
  memset((char*) &tmp, 0, sizeof(tmp));
571
571
  if (! (tmp.plugin_dl= plugin_dl_add(dl, report)))
572
572
    return(true);
573
573
  /* Find plugin by name */
907
907
  {
908
908
    for (plugin= *builtins; plugin->name; plugin++)
909
909
    {
910
 
      bzero(&tmp, sizeof(tmp));
 
910
      memset(&tmp, 0, sizeof(tmp));
911
911
      tmp.plugin= plugin;
912
912
      tmp.name.str= (char *)plugin->name;
913
913
      tmp.name.length= strlen(plugin->name);
1732
1732
        variables. If their value is non-NULL, it must point to a valid
1733
1733
        string.
1734
1734
      */
1735
 
      bzero(global_system_variables.dynamic_variables_ptr +
1736
 
            global_variables_dynamic_size,
1737
 
            new_size - global_variables_dynamic_size);
1738
 
      bzero(max_system_variables.dynamic_variables_ptr +
1739
 
            global_variables_dynamic_size,
1740
 
            new_size - global_variables_dynamic_size);
 
1735
      memset(global_system_variables.dynamic_variables_ptr +
 
1736
             global_variables_dynamic_size, 0,
 
1737
             new_size - global_variables_dynamic_size);
 
1738
      memset(max_system_variables.dynamic_variables_ptr +
 
1739
             global_variables_dynamic_size, 0, 
 
1740
             new_size - global_variables_dynamic_size);
1741
1741
      global_variables_dynamic_size= new_size;
1742
1742
    }
1743
1743
 
2576
2576
  if (!(opts= (my_option*) alloc_root(mem_root, sizeof(my_option) * count)))
2577
2577
    return(NULL);
2578
2578
 
2579
 
  bzero(opts, sizeof(my_option) * count);
 
2579
  memset(opts, 0, sizeof(my_option) * count);
2580
2580
 
2581
2581
  if ((my_strcasecmp(&my_charset_latin1, p->name.str, "MyISAM") == 0))
2582
2582
    can_disable= false;
2641
2641
      sql_print_error("Out of memory for plugin '%s'.", tmp->name.str);
2642
2642
      return(-1);
2643
2643
    }
2644
 
    bzero(opts, sizeof(my_option) * count);
 
2644
    memset(opts, 0, sizeof(my_option) * count);
2645
2645
 
2646
2646
    if (construct_options(tmp_root, tmp, opts, can_disable))
2647
2647
    {