Bug #44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled
Submitted: 6 May 2009 12:45 Modified: 14 Mar 2010 1:05
Reporter: Kristofer Pettersson Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: CPU Architecture:Any

[6 May 2009 12:45] Kristofer Pettersson
Description:
Mandatory plugins are hard coded in the server: MyISAM, MEMORY

They should in fact not be hard coded but rather be dynamically added at compile time based on the configuration macro MYSQL_PLUGIN_MANDATORY() used in 'plug.in'.

How to repeat:
Create a new storage engine plugin FOO and configure it as MYSQL_PLUGIN_MANDATORY(FOO). Then run "mysqld --foo=OFF"  or "mysqld --disable-foo"

Suggested fix:
Build a list similar using similar technique as builtin.cc.in and check against this list for plugins which can't be disabled.
[14 May 2009 20:23] Sergei Golubchik
That's worth than it looks.
partition and binlog are plugins too.
Disabling binlog plugin for examples cases immediate crash if binary logging is enabled:

  mysqld --skip-plugin-binlog --log-bin

disabling partitioning plugin doesn't crash on startup, but I didn't try to create a partitioned table. Possibly there are more "plugins" that shouldn't be possible to disable.
[14 May 2009 20:26] Sergei Golubchik
see related Bug#44797
[7 Dec 2009 7:21] Kristofer Pettersson
This and related bug are in 'patch pending'; is it possible to have a look at the source code for these patches?
[7 Dec 2009 11:08] Sergei Golubchik
here, I've extracted relevant parts of a bigger changeset

Attachment: bug44691.patch (text/x-patch), 9.00 KiB.

[6 Mar 2010 10:51] Bugs System
Pushed into 5.5.3-m3 (revid:alik@sun.com-20100306103849-hha31z2enhh7jwt3) (version source revid:vvaintroub@fedora12-20091225154921-x25a5pyw1pxiwobv) (merge vers: 5.5.99) (pib:16)
[14 Mar 2010 1:05] Paul DuBois
Noted in 5.5.3 changelog.

Some plugins configured as mandatory could be disabled at server startup.