Bug #59755 INSTALL PLUGIN should warn about long too plugin names

Submitted: 26 Jan 2011 18:02 Modified: 24 Mar 2011 20:51
Reporter: Ulf Wendel Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: General Severity:S3 (Non-critical)
Version:5.6.3 OS:Any
Assigned to: CPU Architecture:Any

[26 Jan 2011 18:02] Ulf Wendel
Description:
INSTALL PLUGIN does not check the lenght of a plugins name. 

One can install plugins with a name of more than 64 characters. Immediately after the installation the plugin is reported by SHOW PLUGINS to be active. After a server restart the plugin cannot be loaded again because of the silently truncated plugin name. The latter is what makes the lack of a WARNING a bit nasty: you install a plugin, it works, your server restarts, the plugin is gone.

How to repeat:
mysql> INSTALL PLUGIN plugin_name_longer_than_64_012345678901234567890123456789012345678901234567890123456789 SONAME 'authentication_pam.so';
Query OK, 0 rows affected (0.00 sec)

mysql> SHOW PLUGINS;
+------------------------------------------------------------------+----------+--------------------+-----------------------+-------------+
| Name                                                             | Status   | Type               | Library               | License     |
+------------------------------------------------------------------+----------+--------------------+-----------------------+-------------+
| binlog                                                           | ACTIVE   | STORAGE ENGINE     | NULL                  | GPL         |
| mysql_native_password                                            | ACTIVE   | AUTHENTICATION     | NULL                  | GPL         |
| mysql_old_password                                               | ACTIVE   | AUTHENTICATION     | NULL                  | GPL         |
| MyISAM                                                           | ACTIVE   | STORAGE ENGINE     | NULL                  | GPL         |
| MEMORY                                                           | ACTIVE   | STORAGE ENGINE     | NULL                  | GPL         |
| CSV                                                              | ACTIVE   | STORAGE ENGINE     | NULL                  | GPL         |
| MRG_MYISAM                                                       | ACTIVE   | STORAGE ENGINE     | NULL                  | GPL         |
| ARCHIVE                                                          | ACTIVE   | STORAGE ENGINE     | NULL                  | GPL         |
| FEDERATED                                                        | DISABLED | STORAGE ENGINE     | NULL                  | GPL         |
| BLACKHOLE                                                        | ACTIVE   | STORAGE ENGINE     | NULL                  | GPL         |
| InnoDB                                                           | ACTIVE   | STORAGE ENGINE     | NULL                  | GPL         |
| INNODB_TRX                                                       | ACTIVE   | INFORMATION SCHEMA | NULL                  | GPL         |
| INNODB_LOCKS                                                     | ACTIVE   | INFORMATION SCHEMA | NULL                  | GPL         |
| INNODB_LOCK_WAITS                                                | ACTIVE   | INFORMATION SCHEMA | NULL                  | GPL         |
| INNODB_CMP                                                       | ACTIVE   | INFORMATION SCHEMA | NULL                  | GPL         |
| INNODB_CMP_RESET                                                 | ACTIVE   | INFORMATION SCHEMA | NULL                  | GPL         |
| INNODB_CMPMEM                                                    | ACTIVE   | INFORMATION SCHEMA | NULL                  | GPL         |
| INNODB_CMPMEM_RESET                                              | ACTIVE   | INFORMATION SCHEMA | NULL                  | GPL         |
| PERFORMANCE_SCHEMA                                               | ACTIVE   | STORAGE ENGINE     | NULL                  | GPL         |
| partition                                                        | ACTIVE   | STORAGE ENGINE     | NULL                  | GPL         |
| plugin_name_longer_than_64_0123456789012345678901234567890123456 | ACTIVE   | AUTHENTICATION     | authentication_pam.so | PROPRIETARY |
+------------------------------------------------------------------+----------+--------------------+-----------------------+-------------+
21 rows in set (0.00 sec)

MySQL error log upon MySQL restart:

110126 18:52:45 [ERROR] Can't find symbol 'plugin_name_longer_than_64_0123456789012345678901234567890123456' in library
110126 18:52:45 [Warning] Couldn't load plugin named 'plugin_name_longer_than_64_0123456789012345678901234567890123456' with soname 'authentication_pam.so'.
[24 Mar 2011 20:51] Sveta Smirnova
Thank you for the report.

Verified as described.
[17 Feb 2012 14:28] Claudio Nanni
Sorry for the slightly off topic comment, is this plugin only available in the commercial distributions of MySQL?

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

Page generated in 0.052 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.