summaryrefslogtreecommitdiff
path: root/mysql-test/include/have_example_plugin.inc
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/include/have_example_plugin.inc')
-rw-r--r--mysql-test/include/have_example_plugin.inc20
1 files changed, 14 insertions, 6 deletions
diff --git a/mysql-test/include/have_example_plugin.inc b/mysql-test/include/have_example_plugin.inc
index a2fffc17b97..3a667d2e21a 100644
--- a/mysql-test/include/have_example_plugin.inc
+++ b/mysql-test/include/have_example_plugin.inc
@@ -1,13 +1,21 @@
#
-# 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 Example plugin requires dynamic loading
+}
#
# Check if the variable EXAMPLE_PLUGIN is set
#
---require r/have_example_plugin.require
-disable_query_log;
-eval select LENGTH('$EXAMPLE_PLUGIN') > 0 as 'have_example_plugin';
+if (`SELECT LENGTH('$EXAMPLE_PLUGIN') = 0`) {
+ --skip Example plugin requires the environment variable \$EXAMPLE_PLUGIN to be set (normally done by mtr)
+}
+
+#
+# Check if --plugin-dir was setup for exampledb
+#
+if (`SELECT CONCAT('--plugin-dir=', @@plugin_dir) != '$EXAMPLE_PLUGIN_OPT'`) {
+ --skip Example plugin requires that --plugin-dir is set to the example plugin dir (either the .opt file does not contain \$EXAMPLE_PLUGIN_OPT or another plugin is in use)
+}
enable_query_log;