summaryrefslogtreecommitdiff
path: root/sql/sql_plugin.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-03-05 15:50:32 +0100
committerSergei Golubchik <serg@mariadb.org>2017-03-10 18:21:26 +0100
commit6cddd12ad6eeea82b1087574e5dd5cb9accd7641 (patch)
tree5b3ac96d47d06c4345b19383c12e0c54bcdd2fc6 /sql/sql_plugin.cc
parent2b1bbac5fa881b8e135dbad3e0ff6b9e2763e24d (diff)
downloadmariadb-git-6cddd12ad6eeea82b1087574e5dd5cb9accd7641.tar.gz
make sql_udf.cc to shorten dlerror() messages
just as sql_plugin.cc does
Diffstat (limited to 'sql/sql_plugin.cc')
-rw-r--r--sql/sql_plugin.cc12
1 files changed, 2 insertions, 10 deletions
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc
index 4ba9b82cf47..14c9071a283 100644
--- a/sql/sql_plugin.cc
+++ b/sql/sql_plugin.cc
@@ -723,7 +723,7 @@ static st_plugin_dl *plugin_dl_add(const LEX_STRING *dl, int report)
{
#ifdef HAVE_DLOPEN
char dlpath[FN_REFLEN];
- uint plugin_dir_len, dummy_errors, dlpathlen, i;
+ uint plugin_dir_len, dummy_errors, i;
struct st_plugin_dl *tmp= 0, plugin_dl;
void *sym;
st_ptr_backup tmp_backup[array_elements(list_of_services)];
@@ -759,15 +759,7 @@ static st_plugin_dl *plugin_dl_add(const LEX_STRING *dl, int report)
/* Open new dll handle */
if (!(plugin_dl.handle= dlopen(dlpath, RTLD_NOW)))
{
- const char *errmsg=dlerror();
- dlpathlen= strlen(dlpath);
- if (!strncmp(dlpath, errmsg, dlpathlen))
- { // if errmsg starts from dlpath, trim this prefix.
- errmsg+=dlpathlen;
- if (*errmsg == ':') errmsg++;
- if (*errmsg == ' ') errmsg++;
- }
- report_error(report, ER_CANT_OPEN_LIBRARY, dlpath, errno, errmsg);
+ report_error(report, ER_CANT_OPEN_LIBRARY, dlpath, errno, my_dlerror(dlpath));
goto ret;
}
dlopen_count++;