summaryrefslogtreecommitdiff
path: root/mysql-test/main/plugin.test
diff options
context:
space:
mode:
authorDaniel Black <daniel@linux.ibm.com>2018-07-04 19:27:20 +1000
committerSergei Golubchik <serg@mariadb.org>2018-10-31 16:06:15 +0100
commit6513b838d3673100b5c470023427ff4ae778d8f1 (patch)
tree5f0ff84e8b3c22931aad087022de0e949b1223c3 /mysql-test/main/plugin.test
parentbb85d92d6f7e15731570917e2ea14b31aa872a56 (diff)
downloadmariadb-git-6513b838d3673100b5c470023427ff4ae778d8f1.tar.gz
MDEV-16294: postfix - INSTALL PLUGIN IF NOT EXISTS
Fix also UNINSTALL SONAME IF EXISTS Complete test case to INSTALL/UNINSTALL errors are generated
Diffstat (limited to 'mysql-test/main/plugin.test')
-rw-r--r--mysql-test/main/plugin.test37
1 files changed, 30 insertions, 7 deletions
diff --git a/mysql-test/main/plugin.test b/mysql-test/main/plugin.test
index 3dad1ab2f73..ca33516fc85 100644
--- a/mysql-test/main/plugin.test
+++ b/mysql-test/main/plugin.test
@@ -272,15 +272,38 @@ DROP TABLE t1;
--echo #
--echo #
-select plugin_name from information_schema.plugins where plugin_library like 'ha_example%';
+select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%';
+INSTALL PLUGIN IF NOT EXISTS example SONAME 'ha_example';
+select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%';
+
+--replace_regex /\.dll/.so/
+--error ER_PLUGIN_INSTALLED
+INSTALL PLUGIN example SONAME 'ha_example';
+
INSTALL PLUGIN IF NOT EXISTS example SONAME 'ha_example';
-select plugin_name from information_schema.plugins where plugin_library like 'ha_example%';
-INSTALL PLUGIN IF NOT EXISTS EXAMPLE SONAME 'ha_example';
-SHOW WARNINGS;
-INSTALL SONAME IF NOT EXISTS 'ha_example';
SHOW WARNINGS;
+
UNINSTALL PLUGIN IF EXISTS example;
-select plugin_name from information_schema.plugins where plugin_library like 'ha_example%';
+select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%';
+
+UNINSTALL PLUGIN IF EXISTS example;
+SHOW WARNINGS;
+
+--error 1305
+UNINSTALL PLUGIN example;
+
+INSTALL SONAME IF NOT EXISTS 'ha_example';
+
+select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%';
+
+# note: installing soname multiple times doesn't cause errors or warnings
+INSTALL SONAME IF NOT EXISTS 'ha_example';
+
+UNINSTALL SONAME IF EXISTS 'ha_example';
+
UNINSTALL SONAME IF EXISTS 'ha_example';
SHOW WARNINGS;
-select plugin_name from information_schema.plugins where plugin_library like 'ha_example%';
+select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%';
+
+--error 1305
+UNINSTALL SONAME 'ha_example';