[MDEV-20300] Log warning at startup if plugin-load option is detected and plugin load list is non-empty Created: 2019-08-08  Updated: 2023-04-24

Status: Open
Project: MariaDB Server
Component/s: Plugins
Fix Version/s: None

Type: Task Priority: Major
Reporter: Geoff Montee (Inactive) Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: warning


 Description   

The plugin-load option can be somewhat dangerous to use. The documentation says the following:

Special care must be taken when specifying the --plugin-load option multiple times, or when specifying both the --plugin-load option and the --plugin-load-add option together. The --plugin-load option resets the plugin load list, and this can cause unexpected problems if you are not aware. The --plugin-load-add option does not reset the plugin load list, so it is much safer to use.

https://mariadb.com/kb/en/library/plugin-overview/#specifying-multiple-plugin-load-options

This behavior can lead to confusing issues, especially when a user has multiple configuration files, and they aren't aware of the load order.

Currently, when MariaDB encounters the plugin-load option, it just frees the list without logging anything:

https://github.com/MariaDB/server/blob/mariadb-10.4.7/sql/mysqld.cc#L8550

If log_warnings is set to some value (maybe 2?), and if the plugin-load list is non-empty, then I think it should log a warning like this:

[Warning] The plugin-load option was read, and the plugin load list is non-empty. Previously loaded plugins will be removed from the plugin load list. If this is unintentional, consider using the plugin-load-add option instead.



 Comments   
Comment by Sergei Golubchik [ 2020-04-30 ]

This behavior of --plugin-load is intentional and consistent with how almost all other options behave. But we can still do a warning, I suppose.

Generated at Thu Feb 08 08:58:24 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.