diff options
author | unknown <msvensson@shellback.(none)> | 2006-04-27 16:32:40 +0200 |
---|---|---|
committer | unknown <msvensson@shellback.(none)> | 2006-04-27 16:32:40 +0200 |
commit | 1bdc15e10023f4d46c45517c61138fa721ee9ded (patch) | |
tree | 82ce0e2ddc929afcb7f738cf15f1720d5aad8250 /mysql-test/t/udf.test | |
parent | 2f4f68be5318117f468644c612c022ceb657d9d3 (diff) | |
download | mariadb-git-1bdc15e10023f4d46c45517c61138fa721ee9ded.tar.gz |
Add test to mysql-test-run.pl to see if the udf_example.so is availble. Set envioronment variable UDF_EXAMPLE_LIB if it is.
Then check in have_udf if that variable is set. Finally use tahe variable when loading the shared library.
mysql-test/include/have_udf.inc:
Add check if udf_example.so(or similar) is available
mysql-test/lib/mtr_misc.pl:
Add funcion "mtr_file_exist" to search for files
mysql-test/mysql-test-run.pl:
Add checks to find the udf_example.so library
mysql-test/r/udf.result:
Update result
mysql-test/t/disabled.def:
Remove udf.test from disabled tests
mysql-test/t/udf.test:
Use variable UDF_EXAMPLE_LIB when looking for shared library to load
mysql-test/r/have_udf_example.require:
New BitKeeper file ``mysql-test/r/have_udf_example.require''
Diffstat (limited to 'mysql-test/t/udf.test')
-rw-r--r-- | mysql-test/t/udf.test | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/mysql-test/t/udf.test b/mysql-test/t/udf.test index c9f22cf410b..e2556692612 100644 --- a/mysql-test/t/udf.test +++ b/mysql-test/t/udf.test @@ -14,18 +14,26 @@ drop table if exists t1; # Create the example functions from udf_example # -CREATE FUNCTION metaphon RETURNS STRING SONAME 'udf_example.so'; -CREATE FUNCTION myfunc_double RETURNS REAL SONAME 'udf_example.so'; +--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB +eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_LIB"; +--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB +eval CREATE FUNCTION myfunc_double RETURNS REAL SONAME "$UDF_EXAMPLE_LIB"; +--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB --error ER_CANT_FIND_DL_ENTRY -CREATE FUNCTION myfunc_nonexist RETURNS INTEGER SONAME 'udf_example.so'; -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'; -CREATE FUNCTION reverse_lookup - RETURNS STRING SONAME 'udf_example.so'; -CREATE AGGREGATE FUNCTION avgcost - RETURNS REAL SONAME 'udf_example.so'; +eval CREATE FUNCTION myfunc_nonexist RETURNS INTEGER SONAME "$UDF_EXAMPLE_LIB"; +--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB +eval CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "$UDF_EXAMPLE_LIB"; +--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB +eval CREATE FUNCTION sequence RETURNS INTEGER SONAME "$UDF_EXAMPLE_LIB"; +--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB +eval CREATE FUNCTION lookup RETURNS STRING SONAME "$UDF_EXAMPLE_LIB"; +--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB +eval CREATE FUNCTION reverse_lookup + RETURNS STRING SONAME "$UDF_EXAMPLE_LIB"; +--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB +eval CREATE AGGREGATE FUNCTION avgcost + RETURNS REAL SONAME "$UDF_EXAMPLE_LIB"; --error 0 select myfunc_double(); |