diff options
author | Sergei Golubchik <serg@mariadb.org> | 2021-10-09 11:07:47 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2021-10-27 15:55:14 +0200 |
commit | a010959a5673203b0c3c91f0764b19c2ba8c45c8 (patch) | |
tree | 4f8fc207046ac0c3b0a54cd4ffef6a9cbcab1e5c | |
parent | 867f05ded3634650f441e174becba23709913a95 (diff) | |
download | mariadb-git-a010959a5673203b0c3c91f0764b19c2ba8c45c8.tar.gz |
MDEV-26774 Compression provider unloading at runtime has no effect but doesn't produce a warning
-rw-r--r-- | mysql-test/suite/plugins/r/compression_load.result | 2 | ||||
-rw-r--r-- | sql/sql_plugin.cc | 8 | ||||
-rw-r--r-- | storage/rocksdb/mysql-test/rocksdb/r/mariadb_plugin.result | 13 |
3 files changed, 22 insertions, 1 deletions
diff --git a/mysql-test/suite/plugins/r/compression_load.result b/mysql-test/suite/plugins/r/compression_load.result index f6c8a6e2a56..a23037edc17 100644 --- a/mysql-test/suite/plugins/r/compression_load.result +++ b/mysql-test/suite/plugins/r/compression_load.result @@ -17,6 +17,8 @@ a left(b, 9) length(b) 1 defdefdef 3000 2 ghighighi 30000 uninstall plugin provider_lz4; +Warnings: +Warning 1620 Plugin is busy and will be uninstalled on shutdown select plugin_name, plugin_status from information_schema.plugins where plugin_name='provider_lz4'; plugin_name plugin_status provider_lz4 INACTIVE diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index d493c69e38a..e3ddd14fe6a 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -1267,7 +1267,13 @@ static void plugin_deinitialize(struct st_plugin_int *plugin, bool ref_check) if (!deinit) deinit= (plugin_type_init)(plugin->plugin->deinit); - if (!deinit || !deinit(plugin)) + if (deinit && deinit(plugin)) + { + if (THD *thd= current_thd) + push_warning(thd, Sql_condition::WARN_LEVEL_WARN, + WARN_PLUGIN_BUSY, ER_THD(thd, WARN_PLUGIN_BUSY)); + } + else plugin->state= PLUGIN_IS_UNINITIALIZED; // free to unload if (ref_check && plugin->ref_count) diff --git a/storage/rocksdb/mysql-test/rocksdb/r/mariadb_plugin.result b/storage/rocksdb/mysql-test/rocksdb/r/mariadb_plugin.result index ab13976b742..a8e42a4e2b2 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/mariadb_plugin.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/mariadb_plugin.result @@ -10,6 +10,19 @@ connection default; UNINSTALL SONAME 'ha_rocksdb'; Warnings: Warning 1620 Plugin is busy and will be uninstalled on shutdown +Warning 1620 Plugin is busy and will be uninstalled on shutdown +Warning 1620 Plugin is busy and will be uninstalled on shutdown +Warning 1620 Plugin is busy and will be uninstalled on shutdown +Warning 1620 Plugin is busy and will be uninstalled on shutdown +Warning 1620 Plugin is busy and will be uninstalled on shutdown +Warning 1620 Plugin is busy and will be uninstalled on shutdown +Warning 1620 Plugin is busy and will be uninstalled on shutdown +Warning 1620 Plugin is busy and will be uninstalled on shutdown +Warning 1620 Plugin is busy and will be uninstalled on shutdown +Warning 1620 Plugin is busy and will be uninstalled on shutdown +Warning 1620 Plugin is busy and will be uninstalled on shutdown +Warning 1620 Plugin is busy and will be uninstalled on shutdown +Warning 1620 Plugin is busy and will be uninstalled on shutdown SELECT ENGINE, SUPPORT FROM INFORMATION_SCHEMA.ENGINES WHERE ENGINE='ROCKSDB'; ENGINE SUPPORT ROCKSDB NO |