The error is now detected and a meaningful error message is returned.
If the plugin is loaded upon startup, it's written in the log as
bb-10.9-MDEV-19281-v5 a47e08aa2b
|
2022-05-06 19:46:37 0 [ERROR] mysqld: hashicorp: Key-value storage must be version number 2 or later
|
2022-05-06 19:46:37 0 [ERROR] Plugin 'hashicorp_key_management' init function returned error.
|
2022-05-06 19:46:37 0 [ERROR] Plugin 'hashicorp_key_management' registration as a ENCRYPTION failed.
|
If the plugin is installed at runtime, the first error is returned to the client, while the second and third line from above are still written to the log.
ERROR 1105 (HY000): hashicorp: Key-value storage must be version number 2 or later
|
MariaDB [test]> show warnings;
|
+-------+------+----------------------------------------------------------------------------------------------+
|
| Level | Code | Message |
|
+-------+------+----------------------------------------------------------------------------------------------+
|
| Error | 1105 | hashicorp: Key-value storage must be version number 2 or later |
|
| Error | 1123 | Can't initialize function 'hashicorp_key_management'; Plugin initialization function failed. |
|
+-------+------+----------------------------------------------------------------------------------------------+
|
2 rows in set (0.000 sec)
|
I'm keeping this JIRA entry open for documentation purposes.
There is an effect which may in theory be unexpected if somebody bothers to pay attention to it.
Usually when a plugin fails to load on startup, and the startup options include options specific to this plugin, the whole server fails to start complaining about unknown options. It doesn't happen in this case though. While the plugin itself fails to load on startup, the server still starts, no complaints about hashicorp-X options.
However, I don't see it as a problem, in fact it allows to fix configuration and then install the plugin at runtime. Nor am I sure this particular point deserves a special mention in documentation, I'll leave it to documentation experts to decide.
The error is now detected and a meaningful error message is returned.
If the plugin is loaded upon startup, it's written in the log as
bb-10.9-MDEV-19281-v5 a47e08aa2b
2022-05-06 19:46:37 0 [ERROR] mysqld: hashicorp: Key-value storage must be version number 2 or later
2022-05-06 19:46:37 0 [ERROR] Plugin 'hashicorp_key_management' init function returned error.
2022-05-06 19:46:37 0 [ERROR] Plugin 'hashicorp_key_management' registration as a ENCRYPTION failed.
If the plugin is installed at runtime, the first error is returned to the client, while the second and third line from above are still written to the log.
MariaDB [test]> show warnings;
I'm keeping this JIRA entry open for documentation purposes.
There is an effect which may in theory be unexpected if somebody bothers to pay attention to it.
Usually when a plugin fails to load on startup, and the startup options include options specific to this plugin, the whole server fails to start complaining about unknown options. It doesn't happen in this case though. While the plugin itself fails to load on startup, the server still starts, no complaints about hashicorp-X options.
However, I don't see it as a problem, in fact it allows to fix configuration and then install the plugin at runtime. Nor am I sure this particular point deserves a special mention in documentation, I'll leave it to documentation experts to decide.