Improve error message for ER_CANT_FIND_DL_ENTRY
Added name of the dll/udf that caused the error.
This commit is contained in:
parent
9293d40fa7
commit
9c7e57a41b
@ -2,7 +2,7 @@ drop table if exists t1;
|
||||
CREATE FUNCTION metaphon RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
|
||||
CREATE FUNCTION myfunc_double RETURNS REAL SONAME "UDF_EXAMPLE_LIB";
|
||||
CREATE FUNCTION myfunc_nonexist RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB";
|
||||
ERROR HY000: Can't find symbol 'myfunc_nonexist' in library
|
||||
ERROR HY000: Can't find symbol 'myfunc_nonexist' in library 'UDF_EXAMPLE_LIB'
|
||||
CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB";
|
||||
CREATE FUNCTION udf_sequence RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB";
|
||||
CREATE FUNCTION lookup RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
|
||||
|
@ -8,7 +8,7 @@ affected rows: 0
|
||||
CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB";
|
||||
affected rows: 0
|
||||
CREATE FUNCTION myfunc_nonexist RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB";
|
||||
ERROR HY000: Can't find symbol 'myfunc_nonexist' in library
|
||||
ERROR HY000: Can't find symbol 'myfunc_nonexist' in library 'UDF_EXAMPLE_LIB'
|
||||
SELECT * FROM mysql.func ORDER BY name;
|
||||
name ret dl type
|
||||
myfunc_double 1 UDF_LIB function
|
||||
|
@ -3315,30 +3315,30 @@ ER_CANT_OPEN_LIBRARY
|
||||
swe "Kan inte öppna det dynamiska biblioteket '%-.192s' (Felkod: %d, %-.128s)"
|
||||
ukr "Не можу відкрити розділювану бібліотеку '%-.192s' (помилка: %d, %-.128s)"
|
||||
ER_CANT_FIND_DL_ENTRY
|
||||
chi "在库中找不到符号 '%-.128s'"
|
||||
cze "Nemohu najít funkci '%-.128s' v knihovně"
|
||||
dan "Kan ikke finde funktionen '%-.128s' i bibliotek"
|
||||
eng "Can't find symbol '%-.128s' in library"
|
||||
est "Ei leia funktsiooni '%-.128s' antud teegis"
|
||||
fre "Impossible de trouver la fonction '%-.128s' dans la bibliothèque"
|
||||
ger "Kann Funktion '%-.128s' in der Library nicht finden"
|
||||
geo "ბიბლიოთეკაში სიმბოლო '%-.128s' ვერ ვიპოვე"
|
||||
greek "Δεν είναι δυνατή η ανεύρεση της συνάρτησης '%-.128s' στην βιβλιοθήκη"
|
||||
hun "A(z) '%-.128s' fuggveny nem talalhato a konyvtarban"
|
||||
ita "Impossibile trovare la funzione '%-.128s' nella libreria"
|
||||
jpn "関数 '%-.128s' は共有ライブラリー中にありません。"
|
||||
kor "라이버러리에서 '%-.128s' 함수를 찾을 수 없습니다."
|
||||
nla "Kan functie '%-.128s' niet in library vinden"
|
||||
por "Não pode encontrar a função '%-.128s' na biblioteca"
|
||||
rum "Nu pot gasi functia '%-.128s' in libraria"
|
||||
rus "Невозможно отыскать символ '%-.128s' в библиотеке"
|
||||
serbian "Ne mogu da pronadjem funkciju '%-.128s' u biblioteci"
|
||||
slo "Nemôžem nájsť funkciu '%-.128s' v knižnici"
|
||||
spa "No puedo encontrar el símbolo '%-.128s' en biblioteca"
|
||||
sw "Haiwezi kupata alama ya '% -.128s' kwenye maktaba"
|
||||
swe "Hittar inte funktionen '%-.128s' in det dynamiska biblioteket"
|
||||
ukr "Не можу знайти функцію '%-.128s' у бібліотеці"
|
||||
ER_FUNCTION_NOT_DEFINED
|
||||
chi "在库中找不到符号 '%-.128s' '%-.128s'"
|
||||
cze "Nemohu najít funkci '%-.128s' v knihovně '%-.128s'"
|
||||
dan "Kan ikke finde funktionen '%-.128s' i bibliotek '%-.128s'"
|
||||
eng "Can't find symbol '%-.128s' in library '%-.128s'"
|
||||
est "Ei leia funktsiooni '%-.128s' antud teegis '%-.128s'"
|
||||
fre "Impossible de trouver la fonction '%-.128s' dans la bibliothèque '%-.128s'"
|
||||
ger "Kann Funktion '%-.128s' in der Library '%-.128s' nicht finden"
|
||||
geo "ბიბლიოთეკაში სიმბოლო '%-.128s' '%-.128s' ვერ ვიპოვე"
|
||||
greek "Δεν είναι δυνατή η ανεύρεση της συνάρτησης '%-.128s' στην βιβλιοθήκη '%-.128s'"
|
||||
hun "A(z) '%-.128s' fuggveny nem talalhato a konyvtarban '%-.128s'"
|
||||
ita "Impossibile trovare la funzione '%-.128s' nella libreria '%-.128s'"
|
||||
jpn "関数 '%-.128s' '%-.128s' は共有ライブラリー中にありません。"
|
||||
kor "라이버러리에서 '%-.128s' '%-.128s' 함수를 찾을 수 없습니다."
|
||||
nla "Kan functie '%-.128s' niet in library '%-.128s' vinden"
|
||||
por "Não pode encontrar a função '%-.128s' na biblioteca '%-.128s'"
|
||||
rum "Nu pot gasi functia '%-.128s' in libraria '%-.128s'"
|
||||
rus "Невозможно отыскать символ '%-.128s' в библиотеке '%-.128s'"
|
||||
serbian "Ne mogu da pronadjem funkciju '%-.128s' u biblioteci '%-.128s'"
|
||||
slo "Nemôžem nájsť funkciu '%-.128s' v knižnici '%-.128s'"
|
||||
spa "No puedo encontrar el símbolo '%-.128s' en biblioteca '%-.128s'"
|
||||
sw "Haiwezi kupata alama ya '% -.128s' kwenye maktaba '%-.128s'"
|
||||
swe "Hittar inte funktionen '%-.128s' in det dynamiska biblioteket '%-.128s'"
|
||||
ukr "Не можу знайти функцію '%-.128s' у бібліотеці '%-.128s'"
|
||||
ER_FUNCTION_NOT_DEFINED
|
||||
chi "未定义函数 '%-.192s'"
|
||||
cze "Funkce '%-.192s' není definována"
|
||||
dan "Funktionen '%-.192s' er ikke defineret"
|
||||
|
@ -543,7 +543,7 @@ static my_bool read_mysql_plugin_info(struct st_plugin_dl *plugin_dl,
|
||||
/* Determine interface version */
|
||||
if (!sym)
|
||||
{
|
||||
my_error(ER_CANT_FIND_DL_ENTRY, MyFlags, plugin_interface_version_sym);
|
||||
my_error(ER_CANT_FIND_DL_ENTRY, MyFlags, plugin_interface_version_sym, dlpath);
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
plugin_dl->mariaversion= 0;
|
||||
@ -559,7 +559,7 @@ static my_bool read_mysql_plugin_info(struct st_plugin_dl *plugin_dl,
|
||||
/* Find plugin declarations */
|
||||
if (!(sym= dlsym(plugin_dl->handle, plugin_declarations_sym)))
|
||||
{
|
||||
my_error(ER_CANT_FIND_DL_ENTRY, MyFlags, plugin_declarations_sym);
|
||||
my_error(ER_CANT_FIND_DL_ENTRY, MyFlags, plugin_declarations_sym, dlpath);
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
|
||||
@ -663,7 +663,7 @@ static my_bool read_maria_plugin_info(struct st_plugin_dl *plugin_dl,
|
||||
version we try mysql version.
|
||||
*/
|
||||
my_error(ER_CANT_FIND_DL_ENTRY, MyFlags,
|
||||
maria_plugin_interface_version_sym);
|
||||
maria_plugin_interface_version_sym, dlpath);
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
plugin_dl->mariaversion= *(int *)sym;
|
||||
@ -679,7 +679,7 @@ static my_bool read_maria_plugin_info(struct st_plugin_dl *plugin_dl,
|
||||
/* Find plugin declarations */
|
||||
if (!(sym= dlsym(plugin_dl->handle, maria_plugin_declarations_sym)))
|
||||
{
|
||||
my_error(ER_CANT_FIND_DL_ENTRY, MyFlags, maria_plugin_declarations_sym);
|
||||
my_error(ER_CANT_FIND_DL_ENTRY, MyFlags, maria_plugin_declarations_sym, dlpath);
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
if (plugin_dl->mariaversion != MARIA_PLUGIN_INTERFACE_VERSION)
|
||||
@ -692,7 +692,8 @@ static my_bool read_maria_plugin_info(struct st_plugin_dl *plugin_dl,
|
||||
sizeof_st_plugin= *(int *)sym;
|
||||
else
|
||||
{
|
||||
my_error(ER_CANT_FIND_DL_ENTRY, MyFlags, maria_sizeof_st_plugin_sym);
|
||||
my_error(ER_CANT_FIND_DL_ENTRY, MyFlags, maria_sizeof_st_plugin_sym,
|
||||
dlpath);
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
|
||||
@ -1221,7 +1222,7 @@ err:
|
||||
DBUG_ASSERT(!name->str || !dupes); // dupes is ONLY for name->str == 0
|
||||
|
||||
if (errs == 0 && oks == 0 && !dupes) // no plugin was found
|
||||
my_error(ER_CANT_FIND_DL_ENTRY, MyFlags, name->str);
|
||||
my_error(ER_PLUGIN_IS_NOT_LOADED, MyFlags, name->str);
|
||||
|
||||
plugin_dl_del(tmp.plugin_dl);
|
||||
if (errs > 0 || oks + dupes == 0)
|
||||
|
@ -98,7 +98,7 @@ static const char *init_syms(udf_func *tmp, char *nm)
|
||||
if (!opt_allow_suspicious_udfs)
|
||||
return nm;
|
||||
if (thd->variables.log_warnings)
|
||||
sql_print_warning(ER_THD(thd, ER_CANT_FIND_DL_ENTRY), nm);
|
||||
sql_print_warning(ER_THD(thd, ER_CANT_FIND_DL_ENTRY), nm, tmp->name.str);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -265,7 +265,8 @@ void udf_init()
|
||||
const char *missing;
|
||||
if ((missing= init_syms(tmp, buf)))
|
||||
{
|
||||
sql_print_error(ER_THD(new_thd, ER_CANT_FIND_DL_ENTRY), missing);
|
||||
sql_print_error(ER_THD(new_thd, ER_CANT_FIND_DL_ENTRY), missing,
|
||||
tmp->name.str);
|
||||
del_udf(tmp);
|
||||
if (new_dl)
|
||||
dlclose(dl);
|
||||
@ -605,7 +606,7 @@ int mysql_create_function(THD *thd,udf_func *udf)
|
||||
const char *missing;
|
||||
if ((missing= init_syms(udf, buf)))
|
||||
{
|
||||
my_error(ER_CANT_FIND_DL_ENTRY, MYF(0), missing);
|
||||
my_error(ER_CANT_FIND_DL_ENTRY, MYF(0), missing, udf->dl);
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user