diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2020-07-28 10:39:05 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2020-07-28 14:06:56 +0200 |
commit | 14affeb70b66552ec83340ff67cbf48492edd96b (patch) | |
tree | 5e06e7834e6ae7589cd5a2cd9e7296ffd79aa52a /mysql-test | |
parent | db87a9cddab2600cefd822e9ecacff5736645c2d (diff) | |
download | mariadb-git-bb-10.2-MDEV-21258.tar.gz |
MDEV-21258: (p1) Can't uninstall plugin if the library file doesn't existbb-10.2-MDEV-21258
Part 1: removing plugin from the mysql.plugin even if the plugin is not loaded
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/plugin.result | 13 | ||||
-rw-r--r-- | mysql-test/suite/plugins/r/audit_null_debug.result | 1 | ||||
-rw-r--r-- | mysql-test/suite/plugins/t/audit_null_debug.test | 3 | ||||
-rw-r--r-- | mysql-test/t/plugin.test | 20 |
4 files changed, 36 insertions, 1 deletions
diff --git a/mysql-test/r/plugin.result b/mysql-test/r/plugin.result index 93a150ae424..04931001901 100644 --- a/mysql-test/r/plugin.result +++ b/mysql-test/r/plugin.result @@ -341,3 +341,16 @@ RENAME TABLE t1 TO t2; ERROR 42S02: Table 'test.t1' doesn't exist DROP TABLE t1; # End of 10.1 test +# +# MDEV-21258: Can't uninstall plugin if the library file doesn't exist +# +insert into mysql.plugin values ("unexisting_plugin", "soname"); +select * from mysql.plugin WHERE name='unexisting_plugin'; +name dl +unexisting_plugin soname +UNINSTALL PLUGIN unexisting_plugin; +select * from mysql.plugin WHERE name='unexisting_plugin'; +name dl +UNINSTALL PLUGIN unexisting_plugin; +ERROR 42000: PLUGIN unexisting_plugin does not exist +# End of 10.2 tests diff --git a/mysql-test/suite/plugins/r/audit_null_debug.result b/mysql-test/suite/plugins/r/audit_null_debug.result index 9d5c7c4a02c..e70de36a2ec 100644 --- a/mysql-test/suite/plugins/r/audit_null_debug.result +++ b/mysql-test/suite/plugins/r/audit_null_debug.result @@ -11,5 +11,6 @@ uninstall plugin audit_null; ERROR HY000: Index for table './mysql/plugin.MYI' is corrupt; try to repair it SET debug_dbug=@old_dbug; uninstall plugin audit_null; +uninstall plugin audit_null; ERROR 42000: PLUGIN audit_null does not exist delete from mysql.plugin where name='audit_null'; diff --git a/mysql-test/suite/plugins/t/audit_null_debug.test b/mysql-test/suite/plugins/t/audit_null_debug.test index 0534108b107..f3c88d24c0c 100644 --- a/mysql-test/suite/plugins/t/audit_null_debug.test +++ b/mysql-test/suite/plugins/t/audit_null_debug.test @@ -26,7 +26,8 @@ SET debug_dbug='+d,myisam_pretend_crashed_table_on_usage'; uninstall plugin audit_null; SET debug_dbug=@old_dbug; ---error 1305 +uninstall plugin audit_null; +--error ER_SP_DOES_NOT_EXIST uninstall plugin audit_null; delete from mysql.plugin where name='audit_null'; diff --git a/mysql-test/t/plugin.test b/mysql-test/t/plugin.test index e1a17d49174..d2e828b2589 100644 --- a/mysql-test/t/plugin.test +++ b/mysql-test/t/plugin.test @@ -276,3 +276,23 @@ RENAME TABLE t1 TO t2; DROP TABLE t1; --echo # End of 10.1 test + +--echo # +--echo # MDEV-21258: Can't uninstall plugin if the library file doesn't exist +--echo # + +insert into mysql.plugin values ("unexisting_plugin", "soname"); + +# check that we have the plugin installed +select * from mysql.plugin WHERE name='unexisting_plugin'; + +# make attempt to uninstall the plugin +UNINSTALL PLUGIN unexisting_plugin; + +# check that we have the plugin uninstalled +select * from mysql.plugin WHERE name='unexisting_plugin'; + +--error ER_SP_DOES_NOT_EXIST +UNINSTALL PLUGIN unexisting_plugin; + +--echo # End of 10.2 tests |