diff options
Diffstat (limited to 'mysql-test/include/have_udf.inc')
-rw-r--r-- | mysql-test/include/have_udf.inc | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/mysql-test/include/have_udf.inc b/mysql-test/include/have_udf.inc index 7be57bbb7a9..d9ca1450043 100644 --- a/mysql-test/include/have_udf.inc +++ b/mysql-test/include/have_udf.inc @@ -1,13 +1,20 @@ # -# Check if server has support for loading udf's -# i.e it will support dlopen +# Check if server has support for loading plugins # ---source include/have_dynamic_loading.inc +if (`SELECT @@have_dynamic_loading != 'YES'`) { + --skip UDF requires dynamic loading +} # # Check if the variable UDF_EXAMPLE_LIB is set # ---require r/have_udf_example.require -disable_query_log; -eval select LENGTH('$UDF_EXAMPLE_LIB') > 0 as 'have_udf_example_lib'; -enable_query_log; +if (`SELECT LENGTH('$UDF_EXAMPLE_LIB') = 0`) { + --skip UDF requires the environment variable \$UDF_EXAMPLE_LIB to be set (normally done by mtr) +} + +# +# Check if --plugin-dir was setup for udf +# +if (`SELECT CONCAT('--plugin-dir=', @@plugin_dir) != '$UDF_EXAMPLE_LIB_OPT'`) { + --skip UDF requires that --plugin-dir is set to the udf plugin dir (either the .opt file does not contain \$UDF_EXAMPLE_LIB_OPT or another plugin is in use) +} |