~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_plugin.cc

  • Committer: Nathan Williams
  • Date: 2009-06-13 21:21:13 UTC
  • mfrom: (1062 staging)
  • mto: This revision was merged to the branch mainline in revision 1063.
  • Revision ID: nathanlws@gmail.com-20090613212113-liz01ojh1wxutgqx
Merged trunk and resolved conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
285
285
static st_plugin_dl *plugin_dl_add(const LEX_STRING *dl, int report)
286
286
{
287
287
  string dlpath;
288
 
  uint32_t plugin_dir_len, dummy_errors;
 
288
  uint32_t plugin_dir_len;
289
289
  struct st_plugin_dl *tmp, plugin_dl;
290
290
  void *sym;
291
291
  plugin_dir_len= strlen(opt_plugin_dir);
349
349
 
350
350
  /* Duplicate and convert dll name */
351
351
  plugin_dl.dl.length= dl->length * files_charset_info->mbmaxlen + 1;
352
 
  if (! (plugin_dl.dl.str= (char*) malloc(plugin_dl.dl.length)))
 
352
  if (! (plugin_dl.dl.str= (char*) calloc(plugin_dl.dl.length, sizeof(char))))
353
353
  {
354
354
    free_plugin_mem(&plugin_dl);
355
355
    if (report & REPORT_TO_USER)
358
358
      errmsg_printf(ERRMSG_LVL_ERROR, ER(ER_OUTOFMEMORY), plugin_dl.dl.length);
359
359
    return(0);
360
360
  }
361
 
  plugin_dl.dl.length= copy_and_convert(plugin_dl.dl.str, plugin_dl.dl.length,
362
 
    files_charset_info, dl->str, dl->length, system_charset_info,
363
 
    &dummy_errors);
364
 
  plugin_dl.dl.str[plugin_dl.dl.length]= 0;
 
361
  strcpy(plugin_dl.dl.str, dl->str);
365
362
  /* Add this dll to array */
366
363
  if (! (tmp= plugin_dl_insert_or_reuse(&plugin_dl)))
367
364
  {
554
551
    for (;;)
555
552
    {
556
553
      var->plugin= plugin;
557
 
      if (!var->next)
 
554
      if (! var->getNext())
558
555
        break;
559
 
      var= var->next->cast_pluginvar();
 
556
      var= var->getNext()->cast_pluginvar();
560
557
    }
561
558
  }
562
559
 
1520
1517
static void plugin_vars_free_values(sys_var *vars)
1521
1518
{
1522
1519
 
1523
 
  for (sys_var *var= vars; var; var= var->next)
 
1520
  for (sys_var *var= vars; var; var= var->getNext())
1524
1521
  {
1525
1522
    sys_var_pluginvar *piv= var->cast_pluginvar();
1526
1523
    if (piv &&
2215
2212
    }
2216
2213
    if (chain.first)
2217
2214
    {
2218
 
      chain.last->next = NULL;
 
2215
      chain.last->setNext(NULL);
2219
2216
      if (mysql_add_sys_var_chain(chain.first, NULL))
2220
2217
      {
2221
2218
        errmsg_printf(ERRMSG_LVL_ERROR, _("Plugin '%s' has conflicting system variables"),