maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #06439
Re: Opened_plugin_libraries status variable
Hi, Ian!
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:
> http://lists.askmonty.org/pipermail/commits/2013-April/004595.html
> 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:
http://bazaar.launchpad.net/~maria-captains/maria/10.0/revision/sergii@xxxxxxxxx-20130409212729-dvig2b1eyl2x766t
The changeset comment says "... and a new status variable to cound
successful dlopen's".
So, Opened_plugin_libraries is incremented every time a shared library
is opened.
> 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';
or
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
output.
Otherwise, MariaDB will have to open all .so files in the plugin_dir,
and apparently you happen to have 19 of them.
Regards,
Sergei
References