maria-developers team mailing list archive
Mailing list archive
Re: Opened_plugin_libraries status variable
On Nov 05, Ian Gilfillan wrote:
> I would like to document the Opened_plugin_libraries status variable,
> introduced in MariaDB 10.0, but can't understand what it's all about.
> I have looked at:
> but it's not really making sense what it's testing.
This is a merge changeset, it's not very helpful.
Here's the one, that introduced the variable:
The changeset comment says "... and a new status variable to cound
So, Opened_plugin_libraries is incremented every time a shared library
> In my own setup, each time I query the INFORMATION_SCHEMA.ALL_PLUGINS
> table, Opened_plugin_libraries increments by 19 (no matter what
> conditions I apply).
Try to query INFORMATION_SCHEMA.ALL_PLUGINS for a specific library, like
in the show_all_plugins.test from the changeset above:
select * from information_schema.all_plugins where plugin_library='ha_example.so';
show plugins soname 'ha_example.so';
In both these queries, MariaDB knows exactly that you're interested in
ha_example.so, so it only opens that specific shared library. And
Opened_plugin_libraries is incremented by 1.
If you try (again, from the test file):
show plugins soname like '%example%';
it will open all .so files that have "example" in their names, in the
test suite it'll be dialog_examples.so, libdaemon_example.so,
ha_example.so, udf_example.so. So, Opened_plugin_libraries will be
incremented by 4. Note, that udf_example.so has no plugins inside, but
MariaDB can only know that after opening the file. So it'll count in
Opened_plugin_libraries, but it won't show up in the SHOW PLUGINS
Otherwise, MariaDB will have to open all .so files in the plugin_dir,
and apparently you happen to have 19 of them.