~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/loader.cc

  • Committer: brian
  • Date: 2009-11-11 19:42:27 UTC
  • mfrom: (1211 staging)
  • mto: (1211.1.4 staging)
  • mto: This revision was merged to the branch mainline in revision 1212.
  • Revision ID: brian@orisndriz04-20091111194227-mky4am3ym0dlosaa
Update for Cursor renaming.

Show diffs side-by-side

added added

removed removed

Lines of Context:
325
325
  /* Open new dll handle */
326
326
  if (!(plugin_dl.handle= dlopen(dlpath.c_str(), RTLD_LAZY|RTLD_GLOBAL)))
327
327
  {
328
 
    const char *errmsg=dlerror();
 
328
    const char *errmsg= dlerror();
329
329
    uint32_t dlpathlen= dlpath.length();
330
330
    if (!dlpath.compare(0, dlpathlen, errmsg))
331
331
    { // if errmsg starts from dlpath, trim this prefix.
337
337
      my_error(ER_CANT_OPEN_LIBRARY, MYF(0), dlpath.c_str(), errno, errmsg);
338
338
    if (report & REPORT_TO_LOG)
339
339
      errmsg_printf(ERRMSG_LVL_ERROR, ER(ER_CANT_OPEN_LIBRARY), dlpath.c_str(), errno, errmsg);
 
340
 
 
341
    // This is, in theory, should cause dlerror() to deallocate the error
 
342
    // message. Found this via Google'ing :)
 
343
    (void)dlerror();
 
344
 
340
345
    return(0);
341
346
  }
342
347