[MDEV-19852] Change plugin API to allow plugins to run a script when installed Created: 2019-06-24 Updated: 2019-06-28 Resolved: 2019-06-28 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Plugins |
| Fix Version/s: | N/A |
| Type: | Task | Priority: | Major |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Sergei Golubchik |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
In PostgreSQL, plugins can include a SQL script that creates any database objects that the plugin depends on. If you install the plugin with CREATE EXTENSION, then PostgreSQL will automatically execute the plugin's SQL script:
https://www.postgresql.org/docs/11/sql-createextension.html It would be useful if we could build similar functionality on top of INSTALL PLUGIN/INSTALL SONAME, and maybe even --plugin-load/--plugin-load-add. https://mariadb.com/kb/en/library/install-plugin/ https://mariadb.com/kb/en/library/install-soname/ https://mariadb.com/kb/en/library/mysqld-options/#-plugin-load https://mariadb.com/kb/en/library/mysqld-options/#-plugin-load-add One case where it would be extremely useful is with Spider. Spider users currently have to manually run install_spider.sql to install the plugin and create all dependent objects. https://mariadb.com/kb/en/library/spider-installation/#configuring-spider-nodes |