summaryrefslogtreecommitdiff
path: root/sql/sql_udf.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-03-30 12:48:42 +0200
committerSergei Golubchik <serg@mariadb.org>2017-03-30 12:48:42 +0200
commitda4d71d10d23c1ac2d10b72baee14991ccb7a146 (patch)
tree7cdf3a8c8e72ca7c1c8105427c04123f025bd870 /sql/sql_udf.cc
parent9ec85009985d644ce7ae797bc3572d0ad0f69bb0 (diff)
parenta00517ac9707ffd51c092f5af5d198c5ee789bb4 (diff)
downloadmariadb-git-da4d71d10d23c1ac2d10b72baee14991ccb7a146.tar.gz
Merge branch '10.1' into 10.2
Diffstat (limited to 'sql/sql_udf.cc')
-rw-r--r--sql/sql_udf.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc
index 394fa713445..05698ce82cc 100644
--- a/sql/sql_udf.cc
+++ b/sql/sql_udf.cc
@@ -228,14 +228,13 @@ void udf_init()
if (dl == NULL)
{
char dlpath[FN_REFLEN];
- strxnmov(dlpath, sizeof(dlpath) - 1, opt_plugin_dir, "/", tmp->dl,
- NullS);
+ strxnmov(dlpath, sizeof(dlpath) - 1, opt_plugin_dir, "/", tmp->dl, NullS);
(void) unpack_filename(dlpath, dlpath);
if (!(dl= dlopen(dlpath, RTLD_NOW)))
{
/* Print warning to log */
sql_print_error(ER_THD(new_thd, ER_CANT_OPEN_LIBRARY),
- tmp->dl, errno, dlerror());
+ tmp->dl, errno, my_dlerror(dlpath));
/* Keep the udf in the hash so that we can remove it later */
continue;
}
@@ -539,10 +538,10 @@ int mysql_create_function(THD *thd,udf_func *udf)
if (!(dl = dlopen(dlpath, RTLD_NOW)))
{
+ my_error(ER_CANT_OPEN_LIBRARY, MYF(0),
+ udf->dl, errno, my_dlerror(dlpath));
DBUG_PRINT("error",("dlopen of %s failed, error: %d (%s)",
udf->dl, errno, dlerror()));
- my_error(ER_CANT_OPEN_LIBRARY, MYF(0),
- udf->dl, errno, dlerror());
goto err;
}
new_dl=1;