Description:
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';
Warnings:
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.