~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/module/library.cc

  • Committer: Lee Bieber
  • Date: 2010-11-07 19:34:48 UTC
  • mfrom: (1910.1.2 build)
  • Revision ID: kalebral@gmail.com-20101107193448-64kdu912qej354sh
Merge Stewart - including adapting and expanding the "differences from mysql" page from the wiki.
Merge Stewart - fix bug 668143: drizzleslap with --commit runs second iteration data load in a transaction

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2009 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2009 Sun Microsystems
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
78
78
  size_t found= plugin_name.find(FN_LIBCHAR);
79
79
  if (found != string::npos)
80
80
  {
81
 
    errmsg_printf(error::ERROR, "%s",ER(ER_PLUGIN_NO_PATHS));
 
81
    errmsg_printf(ERRMSG_LVL_ERROR, "%s",ER(ER_PLUGIN_NO_PATHS));
82
82
    return NULL;
83
83
  }
84
84
 
92
92
    if (dl_handle == NULL)
93
93
    {
94
94
      const char *errmsg= dlerror();
95
 
      errmsg_printf(error::ERROR, ER(ER_CANT_OPEN_LIBRARY),
 
95
      errmsg_printf(ERRMSG_LVL_ERROR, ER(ER_CANT_OPEN_LIBRARY),
96
96
                    dlpath.c_str(), errno, errmsg);
97
97
      (void)dlerror();
98
98
 
114
114
        if (*errmsg == ':') errmsg++;
115
115
        if (*errmsg == ' ') errmsg++;
116
116
      }
117
 
      errmsg_printf(error::ERROR, ER(ER_CANT_OPEN_LIBRARY),
 
117
      errmsg_printf(ERRMSG_LVL_ERROR, ER(ER_CANT_OPEN_LIBRARY),
118
118
                    dlpath.c_str(), errno, errmsg);
119
119
 
120
120
      // This, in theory, should cause dlerror() to deallocate the error
134
134
  if (sym == NULL)
135
135
  {
136
136
    const char* errmsg= dlerror();
137
 
    errmsg_printf(error::ERROR, errmsg);
138
 
    errmsg_printf(error::ERROR, ER(ER_CANT_FIND_DL_ENTRY),
 
137
    errmsg_printf(ERRMSG_LVL_ERROR, errmsg);
 
138
    errmsg_printf(ERRMSG_LVL_ERROR, ER(ER_CANT_FIND_DL_ENTRY),
139
139
                  plugin_decl_sym.c_str(), dlpath.c_str());
140
140
    (void)dlerror();
141
141
    dlclose(dl_handle);
145
145
  const Manifest *module_manifest= static_cast<module::Manifest *>(sym); 
146
146
  if (module_manifest->drizzle_version != DRIZZLE_VERSION_ID)
147
147
  {
148
 
    errmsg_printf(error::ERROR,
 
148
    errmsg_printf(ERRMSG_LVL_ERROR,
149
149
                  _("Plugin module %s was compiled for version %" PRIu64 ", "
150
150
                    "which does not match the current running version of "
151
151
                    "Drizzle: %" PRIu64"."),
152
152
                 dlpath.c_str(), module_manifest->drizzle_version,
153
 
                 static_cast<uint64_t>(DRIZZLE_VERSION_ID));
 
153
                 DRIZZLE_VERSION_ID);
154
154
    return NULL;
155
155
  }
156
156