Loading mysql-test/mysql-test-run.pl +8 −0 Original line number Diff line number Diff line Loading @@ -1104,6 +1104,14 @@ sub environment_setup () { ($ENV{'DYLD_LIBRARY_PATH'} ? ":$ENV{'DYLD_LIBRARY_PATH'}" : ""); } # -------------------------------------------------------------------------- # Add the path where mysqld will find udf_example.so # -------------------------------------------------------------------------- $ENV{'LD_LIBRARY_PATH'}= "$glob_basedir/sql/.libs" . ($ENV{'LD_LIBRARY_PATH'} ? ":$ENV{'LD_LIBRARY_PATH'}" : ""); # -------------------------------------------------------------------------- # Also command lines in .opt files may contain env vars # -------------------------------------------------------------------------- Loading mysql-test/r/udf.result +5 −5 Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ RETURNS STRING SONAME 'udf_example.so'; CREATE AGGREGATE FUNCTION avgcost RETURNS REAL SONAME 'udf_example.so'; select myfunc_double(); ERROR HY000: myfunc_double must have at least on argument ERROR HY000: myfunc_double must have at least one argument select myfunc_double(1); myfunc_double(1) 49.00 Loading mysql-test/t/udf.test +19 −11 Original line number Diff line number Diff line --source include/have_udf.inc # # To run this tests you need to compile "sql/udf_example.cc" into # udf_example.so and setup LD_LIBRARY_PATH to point out where # To run this tests the "sql/udf_example.cc" need to be compiled into # udf_example.so and LD_LIBRARY_PATH should be setup to point out where # the library are. # Loading @@ -19,7 +19,7 @@ CREATE FUNCTION myfunc_double RETURNS REAL SONAME 'udf_example.so'; # myfunc_int does not have a myfunc_int_init function and can # not be loaded unless server is started with --allow-suspicious-udfs --error 1127 --error ER_CANT_FIND_DL_ENTRY CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME 'udf_example.so'; CREATE FUNCTION sequence RETURNS INTEGER SONAME "udf_example.so"; CREATE FUNCTION lookup RETURNS STRING SONAME 'udf_example.so'; Loading @@ -28,19 +28,27 @@ CREATE FUNCTION reverse_lookup CREATE AGGREGATE FUNCTION avgcost RETURNS REAL SONAME 'udf_example.so'; --error 0 select myfunc_double(); select myfunc_double(1); select myfunc_double(78654); --error 1305 select myfunc_int(); --error 0 select lookup(); select lookup("127.0.0.1"); --error 0 select lookup(127,0,0,1); select lookup("localhost"); --error 0 select reverse_lookup(); select reverse_lookup("127.0.0.1"); --error 0 select reverse_lookup(127,0,0,1); select reverse_lookup("localhost"); --error 0 select avgcost(); --error 0 select avgcost(100,23.76); create table t1(sum int, price float(24)); insert into t1 values(100, 50.00), (100, 100.00); Loading Loading @@ -85,7 +93,7 @@ drop procedure xxx2; DROP FUNCTION metaphon; DROP FUNCTION myfunc_double; --error 1305 --error ER_SP_DOES_NOT_EXIST DROP FUNCTION myfunc_int; DROP FUNCTION sequence; DROP FUNCTION lookup; Loading sql/Makefile.am +6 −4 Original line number Diff line number Diff line Loading @@ -153,10 +153,12 @@ sql_yacc.o: sql_yacc.cc sql_yacc.h $(HEADERS) lex_hash.h: gen_lex_hash$(EXEEXT) ./gen_lex_hash$(EXEEXT) > $@ # For testing of udf_example.so; Works on platforms with gcc # (This is not part of our build process but only provided as an example) udf_example.so: udf_example.cc $(CXXCOMPILE) -shared -o $@ $< # For testing of udf_example.so noinst_LTLIBRARIES= udf_example.la udf_example_la_SOURCES= udf_example.cc udf_example_la_CXXFLAGS= -DSTANDARD udf_example_la_LDFLAGS= -module -rpath $(pkglibdir) # Don't update the files from bitkeeper %::SCCS/s.% sql/share/errmsg.txt +38 −38 Original line number Diff line number Diff line Loading @@ -2978,23 +2978,23 @@ ER_UDF_EXISTS swe "Funktionen '%-.64s' finns redan" ukr "æ '%-.64s' դ" ER_CANT_OPEN_LIBRARY cze "Nemohu otev-Bt sdlenou knihovnu '%-.64s' (errno: %d %s)" dan "Kan ikke bne delt bibliotek '%-.64s' (errno: %d %s)" nla "Kan shared library '%-.64s' niet openen (Errcode: %d %s)" eng "Can't open shared library '%-.64s' (errno: %d %-.64s)" jps "shared library '%-.64s' Jł܂ (errno: %d %s)", est "Ei suuda avada jagatud teeki '%-.64s' (veakood: %d %-.64s)" fre "Impossible d'ouvrir la bibliothque partage '%-.64s' (errno: %d %s)" ger "Kann Shared Library '%-.64s' nicht ffnen (Fehler: %d %-.64s)" greek " shared library '%-.64s' ( : %d %s)" hun "A(z) '%-.64s' megosztott konyvtar nem hasznalhato (hibakod: %d %s)" ita "Impossibile aprire la libreria condivisa '%-.64s' (errno: %d %s)" jpn "shared library '%-.64s' Ǥޤ (errno: %d %s)" kor "'%-.64s' ̹ ϴ.(ȣ: %d %s)" nor "Can't open shared library '%-.64s' (errno: %d %s)" norwegian-ny "Can't open shared library '%-.64s' (errno: %d %s)" pol "Can't open shared library '%-.64s' (errno: %d %s)" por "No pode abrir biblioteca compartilhada '%-.64s' (erro no. '%d' - '%-.64s')" cze "Nemohu otev-Bt sdlenou knihovnu '%-.64s' (errno: %d %-.128s)" dan "Kan ikke bne delt bibliotek '%-.64s' (errno: %d %-.128s)" nla "Kan shared library '%-.64s' niet openen (Errcode: %d %-.128s)" eng "Can't open shared library '%-.64s' (errno: %d %-.128s)" jps "shared library '%-.64s' Jł܂ (errno: %d %-.128s)", est "Ei suuda avada jagatud teeki '%-.64s' (veakood: %d %-.128s)" fre "Impossible d'ouvrir la bibliothque partage '%-.64s' (errno: %d %-.128s)" ger "Kann Shared Library '%-.64s' nicht ffnen (Fehler: %d %-.128s)" greek " shared library '%-.64s' ( : %d %-.128s)" hun "A(z) '%-.64s' megosztott konyvtar nem hasznalhato (hibakod: %d %-.128s)" ita "Impossibile aprire la libreria condivisa '%-.64s' (errno: %d %-.128s)" jpn "shared library '%-.64s' Ǥޤ (errno: %d %-.128s)" kor "'%-.64s' ̹ ϴ.(ȣ: %d %-.128s)" nor "Can't open shared library '%-.64s' (errno: %d %-.128s)" norwegian-ny "Can't open shared library '%-.64s' (errno: %d %-.128s)" pol "Can't open shared library '%-.64s' (errno: %d %-.128s)" por "No pode abrir biblioteca compartilhada '%-.64s' (erro no. '%d' - '%-.128s')" rum "Nu pot deschide libraria shared '%-.64s' (Eroare: %d %-.64s)" rus " '%-.64s' (: %d %-.64s)" serbian "Ne mogu da otvorim share-ovanu biblioteku '%-.64s' (errno: %d %-.64s)" Loading @@ -3003,27 +3003,27 @@ ER_CANT_OPEN_LIBRARY swe "Kan inte ppna det dynamiska biblioteket '%-.64s' (Felkod: %d %s)" ukr " צ Ħ ¦̦ '%-.64s' (: %d %-.64s)" ER_CANT_FIND_DL_ENTRY cze "Nemohu naj-Bt funkci '%-.64s' v knihovn" dan "Kan ikke finde funktionen '%-.64s' i bibliotek" nla "Kan functie '%-.64s' niet in library vinden" eng "Can't find function '%-.64s' in library" jps "function '%-.64s' Cu[Ɍt鎖ł܂", est "Ei leia funktsiooni '%-.64s' antud teegis" fre "Impossible de trouver la fonction '%-.64s' dans la bibliothque" ger "Kann Funktion '%-.64s' in der Library nicht finden" greek " '%-.64s' " hun "A(z) '%-.64s' fuggveny nem talalhato a konyvtarban" ita "Impossibile trovare la funzione '%-.64s' nella libreria" jpn "function '%-.64s' 饤֥˸դǤޤ" kor "̹ '%-.64s' Լ ã ϴ." por "No pode encontrar a funo '%-.64s' na biblioteca" rum "Nu pot gasi functia '%-.64s' in libraria" rus " '%-.64s' " serbian "Ne mogu da pronadjem funkciju '%-.64s' u biblioteci" slo "Nemem njs funkciu '%-.64s' v kninici" spa "No puedo encontrar funcin '%-.64s' en libraria" swe "Hittar inte funktionen '%-.64s' in det dynamiska biblioteket" ukr " æ '%-.64s' ¦̦æ" cze "Nemohu naj-Bt funkci '%-.128s' v knihovn" dan "Kan ikke finde funktionen '%-.128s' i bibliotek" nla "Kan functie '%-.128s' niet in library vinden" eng "Can't find function '%-.128s' in library" jps "function '%-.128s' Cu[Ɍt鎖ł܂", est "Ei leia funktsiooni '%-.128s' antud teegis" fre "Impossible de trouver la fonction '%-.128s' dans la bibliothque" ger "Kann Funktion '%-.128s' in der Library nicht finden" greek " '%-.128s' " hun "A(z) '%-.128s' fuggveny nem talalhato a konyvtarban" ita "Impossibile trovare la funzione '%-.128s' nella libreria" jpn "function '%-.128s' 饤֥˸դǤޤ" kor "̹ '%-.128s' Լ ã ϴ." por "No pode encontrar a funo '%-.128s' na biblioteca" rum "Nu pot gasi functia '%-.128s' in libraria" rus " '%-.128s' " serbian "Ne mogu da pronadjem funkciju '%-.128s' u biblioteci" slo "Nemem njs funkciu '%-.128s' v kninici" spa "No puedo encontrar funcin '%-.128s' en libraria" swe "Hittar inte funktionen '%-.128s' in det dynamiska biblioteket" ukr " æ '%-.128s' ¦̦æ" ER_FUNCTION_NOT_DEFINED cze "Funkce '%-.64s' nen-B definovna" dan "Funktionen '%-.64s' er ikke defineret" Loading Loading
mysql-test/mysql-test-run.pl +8 −0 Original line number Diff line number Diff line Loading @@ -1104,6 +1104,14 @@ sub environment_setup () { ($ENV{'DYLD_LIBRARY_PATH'} ? ":$ENV{'DYLD_LIBRARY_PATH'}" : ""); } # -------------------------------------------------------------------------- # Add the path where mysqld will find udf_example.so # -------------------------------------------------------------------------- $ENV{'LD_LIBRARY_PATH'}= "$glob_basedir/sql/.libs" . ($ENV{'LD_LIBRARY_PATH'} ? ":$ENV{'LD_LIBRARY_PATH'}" : ""); # -------------------------------------------------------------------------- # Also command lines in .opt files may contain env vars # -------------------------------------------------------------------------- Loading
mysql-test/r/udf.result +5 −5 Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ RETURNS STRING SONAME 'udf_example.so'; CREATE AGGREGATE FUNCTION avgcost RETURNS REAL SONAME 'udf_example.so'; select myfunc_double(); ERROR HY000: myfunc_double must have at least on argument ERROR HY000: myfunc_double must have at least one argument select myfunc_double(1); myfunc_double(1) 49.00 Loading
mysql-test/t/udf.test +19 −11 Original line number Diff line number Diff line --source include/have_udf.inc # # To run this tests you need to compile "sql/udf_example.cc" into # udf_example.so and setup LD_LIBRARY_PATH to point out where # To run this tests the "sql/udf_example.cc" need to be compiled into # udf_example.so and LD_LIBRARY_PATH should be setup to point out where # the library are. # Loading @@ -19,7 +19,7 @@ CREATE FUNCTION myfunc_double RETURNS REAL SONAME 'udf_example.so'; # myfunc_int does not have a myfunc_int_init function and can # not be loaded unless server is started with --allow-suspicious-udfs --error 1127 --error ER_CANT_FIND_DL_ENTRY CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME 'udf_example.so'; CREATE FUNCTION sequence RETURNS INTEGER SONAME "udf_example.so"; CREATE FUNCTION lookup RETURNS STRING SONAME 'udf_example.so'; Loading @@ -28,19 +28,27 @@ CREATE FUNCTION reverse_lookup CREATE AGGREGATE FUNCTION avgcost RETURNS REAL SONAME 'udf_example.so'; --error 0 select myfunc_double(); select myfunc_double(1); select myfunc_double(78654); --error 1305 select myfunc_int(); --error 0 select lookup(); select lookup("127.0.0.1"); --error 0 select lookup(127,0,0,1); select lookup("localhost"); --error 0 select reverse_lookup(); select reverse_lookup("127.0.0.1"); --error 0 select reverse_lookup(127,0,0,1); select reverse_lookup("localhost"); --error 0 select avgcost(); --error 0 select avgcost(100,23.76); create table t1(sum int, price float(24)); insert into t1 values(100, 50.00), (100, 100.00); Loading Loading @@ -85,7 +93,7 @@ drop procedure xxx2; DROP FUNCTION metaphon; DROP FUNCTION myfunc_double; --error 1305 --error ER_SP_DOES_NOT_EXIST DROP FUNCTION myfunc_int; DROP FUNCTION sequence; DROP FUNCTION lookup; Loading
sql/Makefile.am +6 −4 Original line number Diff line number Diff line Loading @@ -153,10 +153,12 @@ sql_yacc.o: sql_yacc.cc sql_yacc.h $(HEADERS) lex_hash.h: gen_lex_hash$(EXEEXT) ./gen_lex_hash$(EXEEXT) > $@ # For testing of udf_example.so; Works on platforms with gcc # (This is not part of our build process but only provided as an example) udf_example.so: udf_example.cc $(CXXCOMPILE) -shared -o $@ $< # For testing of udf_example.so noinst_LTLIBRARIES= udf_example.la udf_example_la_SOURCES= udf_example.cc udf_example_la_CXXFLAGS= -DSTANDARD udf_example_la_LDFLAGS= -module -rpath $(pkglibdir) # Don't update the files from bitkeeper %::SCCS/s.%
sql/share/errmsg.txt +38 −38 Original line number Diff line number Diff line Loading @@ -2978,23 +2978,23 @@ ER_UDF_EXISTS swe "Funktionen '%-.64s' finns redan" ukr "æ '%-.64s' դ" ER_CANT_OPEN_LIBRARY cze "Nemohu otev-Bt sdlenou knihovnu '%-.64s' (errno: %d %s)" dan "Kan ikke bne delt bibliotek '%-.64s' (errno: %d %s)" nla "Kan shared library '%-.64s' niet openen (Errcode: %d %s)" eng "Can't open shared library '%-.64s' (errno: %d %-.64s)" jps "shared library '%-.64s' Jł܂ (errno: %d %s)", est "Ei suuda avada jagatud teeki '%-.64s' (veakood: %d %-.64s)" fre "Impossible d'ouvrir la bibliothque partage '%-.64s' (errno: %d %s)" ger "Kann Shared Library '%-.64s' nicht ffnen (Fehler: %d %-.64s)" greek " shared library '%-.64s' ( : %d %s)" hun "A(z) '%-.64s' megosztott konyvtar nem hasznalhato (hibakod: %d %s)" ita "Impossibile aprire la libreria condivisa '%-.64s' (errno: %d %s)" jpn "shared library '%-.64s' Ǥޤ (errno: %d %s)" kor "'%-.64s' ̹ ϴ.(ȣ: %d %s)" nor "Can't open shared library '%-.64s' (errno: %d %s)" norwegian-ny "Can't open shared library '%-.64s' (errno: %d %s)" pol "Can't open shared library '%-.64s' (errno: %d %s)" por "No pode abrir biblioteca compartilhada '%-.64s' (erro no. '%d' - '%-.64s')" cze "Nemohu otev-Bt sdlenou knihovnu '%-.64s' (errno: %d %-.128s)" dan "Kan ikke bne delt bibliotek '%-.64s' (errno: %d %-.128s)" nla "Kan shared library '%-.64s' niet openen (Errcode: %d %-.128s)" eng "Can't open shared library '%-.64s' (errno: %d %-.128s)" jps "shared library '%-.64s' Jł܂ (errno: %d %-.128s)", est "Ei suuda avada jagatud teeki '%-.64s' (veakood: %d %-.128s)" fre "Impossible d'ouvrir la bibliothque partage '%-.64s' (errno: %d %-.128s)" ger "Kann Shared Library '%-.64s' nicht ffnen (Fehler: %d %-.128s)" greek " shared library '%-.64s' ( : %d %-.128s)" hun "A(z) '%-.64s' megosztott konyvtar nem hasznalhato (hibakod: %d %-.128s)" ita "Impossibile aprire la libreria condivisa '%-.64s' (errno: %d %-.128s)" jpn "shared library '%-.64s' Ǥޤ (errno: %d %-.128s)" kor "'%-.64s' ̹ ϴ.(ȣ: %d %-.128s)" nor "Can't open shared library '%-.64s' (errno: %d %-.128s)" norwegian-ny "Can't open shared library '%-.64s' (errno: %d %-.128s)" pol "Can't open shared library '%-.64s' (errno: %d %-.128s)" por "No pode abrir biblioteca compartilhada '%-.64s' (erro no. '%d' - '%-.128s')" rum "Nu pot deschide libraria shared '%-.64s' (Eroare: %d %-.64s)" rus " '%-.64s' (: %d %-.64s)" serbian "Ne mogu da otvorim share-ovanu biblioteku '%-.64s' (errno: %d %-.64s)" Loading @@ -3003,27 +3003,27 @@ ER_CANT_OPEN_LIBRARY swe "Kan inte ppna det dynamiska biblioteket '%-.64s' (Felkod: %d %s)" ukr " צ Ħ ¦̦ '%-.64s' (: %d %-.64s)" ER_CANT_FIND_DL_ENTRY cze "Nemohu naj-Bt funkci '%-.64s' v knihovn" dan "Kan ikke finde funktionen '%-.64s' i bibliotek" nla "Kan functie '%-.64s' niet in library vinden" eng "Can't find function '%-.64s' in library" jps "function '%-.64s' Cu[Ɍt鎖ł܂", est "Ei leia funktsiooni '%-.64s' antud teegis" fre "Impossible de trouver la fonction '%-.64s' dans la bibliothque" ger "Kann Funktion '%-.64s' in der Library nicht finden" greek " '%-.64s' " hun "A(z) '%-.64s' fuggveny nem talalhato a konyvtarban" ita "Impossibile trovare la funzione '%-.64s' nella libreria" jpn "function '%-.64s' 饤֥˸դǤޤ" kor "̹ '%-.64s' Լ ã ϴ." por "No pode encontrar a funo '%-.64s' na biblioteca" rum "Nu pot gasi functia '%-.64s' in libraria" rus " '%-.64s' " serbian "Ne mogu da pronadjem funkciju '%-.64s' u biblioteci" slo "Nemem njs funkciu '%-.64s' v kninici" spa "No puedo encontrar funcin '%-.64s' en libraria" swe "Hittar inte funktionen '%-.64s' in det dynamiska biblioteket" ukr " æ '%-.64s' ¦̦æ" cze "Nemohu naj-Bt funkci '%-.128s' v knihovn" dan "Kan ikke finde funktionen '%-.128s' i bibliotek" nla "Kan functie '%-.128s' niet in library vinden" eng "Can't find function '%-.128s' in library" jps "function '%-.128s' Cu[Ɍt鎖ł܂", est "Ei leia funktsiooni '%-.128s' antud teegis" fre "Impossible de trouver la fonction '%-.128s' dans la bibliothque" ger "Kann Funktion '%-.128s' in der Library nicht finden" greek " '%-.128s' " hun "A(z) '%-.128s' fuggveny nem talalhato a konyvtarban" ita "Impossibile trovare la funzione '%-.128s' nella libreria" jpn "function '%-.128s' 饤֥˸դǤޤ" kor "̹ '%-.128s' Լ ã ϴ." por "No pode encontrar a funo '%-.128s' na biblioteca" rum "Nu pot gasi functia '%-.128s' in libraria" rus " '%-.128s' " serbian "Ne mogu da pronadjem funkciju '%-.128s' u biblioteci" slo "Nemem njs funkciu '%-.128s' v kninici" spa "No puedo encontrar funcin '%-.128s' en libraria" swe "Hittar inte funktionen '%-.128s' in det dynamiska biblioteket" ukr " æ '%-.128s' ¦̦æ" ER_FUNCTION_NOT_DEFINED cze "Funkce '%-.64s' nen-B definovna" dan "Funktionen '%-.64s' er ikke defineret" Loading