Bug #60113 plugin names are conflicting with system variable names

Submitted: 11 Feb 2011 11:53 Modified: 10 Oct 2025 8:22
Reporter: Sergey Vojtovich Email Updates:
Status: Closed Impact on me:
None 
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
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.
[26 Feb 2011 0:41] Sveta Smirnova
Thank you for the report.

Verified as described.
[10 Oct 2025 8:22] Georgi Kodinov
Posted by developer:
 
Option prefixes are removed since 5.7. See e.g. https://dev.mysql.com/doc/refman/5.7/en/program-variables.html

In older versions of MySQL, program options could be specified in full or as any unambiguous prefix. For example, the --compress option could be given to mysqldump as --compr, but not as --comp because the latter is ambiguous. In MySQL 5.7, option prefixes are no longer supported; only full options are accepted. This is because prefixes can cause problems when new options are implemented for programs and a prefix that is currently unambiguous might become ambiguous in the future.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.