Bug #60113 plugin names are conflicting with system variable names
Submitted: 11 Feb 2011 11:53 Modified: 26 Feb 2011 0:41
Reporter: Sergey Vojtovich Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Options Severity:S3 (Non-critical)
Version:5.6.2 OS:Any
Assigned to: CPU Architecture:Any

[11 Feb 2011 11:53] Sergey Vojtovich
This is split from BUG#59017.

It is impossible to install a plugin, if system variable, given at command line, (e.g. "socket") is a prefix of plugin name (e.g. "socket_peercred").

Server is started with --socket=whatever.
When plugin is being installed it exports "socket_peercred" variable with expected values ON|OFF|FORCE|FORCE_PLUS_PERMANENT.
As there is no "socket" variable exported during plugin initialization, getopt expansion does the trick and "socket" is accepted as "socket_peercred", which gets invalid value "whatever".

How to repeat:
Basically the same way as for BUG#59017, but rename plugin back from "auth_socket" to "socket_peercred".

Make sure server is started with --socket.
INSTALL PLUGIN socket_peercred SONAME 'auth_socket.so';
Warning	1123	Can't initialize function 'socket_peercred'; Plugin is disabled
101217 15:16:00 [ERROR] /data/mysql/sandbox/5.5.8/bin/mysqld: Error while setting value
'/tmp/mysql55.sock' to 'socket-peercred'
101217 15:16:00 [ERROR] Parsing options for plugin 'socket_peercred' failed.

Suggested fix:
Make plugin names not conflicting with system variable names.

One of possible solutions would be to clean-up arguments that were consumed by the server from arguments array.
[26 Feb 2011 0:41] Sveta Smirnova
Thank you for the report.

Verified as described.