[MDEV-9934] Easier loading of plugins Created: 2016-04-17 Updated: 2017-05-30 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Plugins |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor |
| Reporter: | Daniël van Eeden | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Use a JSON file to load all plugins (multiple functions, multiple .so or .dll files, etc) and run a .sql file if required. INSTALL SOFILE 'foo.so' is nice, but platform specific and this won't run a .sql file (as used by Oracle MySQL rewrite plugin and memcached plugins) See also: https://bugs.mysql.com/bug.php?id=73802 |
| Comments |
| Comment by Elena Stepanova [ 2016-04-17 ] | ||||||||||||||
|
I don't know anything about INSTALL SOFILE, but we do have INSTALL SONAME 'foo'. It does not solve the problem with sql file, but it is platform-independent. | ||||||||||||||
| Comment by Daniël van Eeden [ 2016-04-18 ] | ||||||||||||||
|
Sorry INTALL SOFILE is what I was referring to. Forgot the .so/.dll part is optional. | ||||||||||||||
| Comment by Sergei Golubchik [ 2017-05-29 ] | ||||||||||||||
|
In Bug#73802 you specify to issues that a json file should solve:
INSTALL SONAME fixes them both. As for the "run sql file", I think it's the plugin job to install itself properly. I agree, that it's an open issue now. Ideally, I'd like a user to do INSTALL PLUGIN or INSTALL SONAME and the server would run necessary sql commands automatically. One of the issues to consider, if the plugin is loaded with --plugin-load command-line option, it'll be initialized before the server is ready to accept connections, that is, before the server is able to run plugin initialization sql script. | ||||||||||||||
| Comment by Daniël van Eeden [ 2017-05-29 ] | ||||||||||||||
|
The json-file also serves another purpose: List not-yet-installed plugins, but that could also be rolled into INSTALL SONAME.
(installs whatever .sql file(s) are appropriate) Later update the RPM package and the json file gets updated and this triggers MariaDB to update the installed package/function/procedures/etc | ||||||||||||||
| Comment by Sergei Golubchik [ 2017-05-30 ] | ||||||||||||||
|
I see. For not installed plugins you can use SHOW PLUGINS SONAME statement: https://mariadb.com/kb/en/mariadb/show-plugins-soname/ For packages, you're right, we don't have anything at the moment. There is |