Bug #66398 plugins option does not accept comma-separated list

Submitted: 15 Aug 2012 9:58 Modified: 14 Sep 2012 5:33
Reporter: Hailin Hu Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Proxy: Core Severity:S3 (Non-critical)
Version:0.8.2, 0.9.0 OS:MacOS
Assigned to: CPU Architecture:Any
Tags: plugins

[15 Aug 2012 9:58] Hailin Hu
Description:
try to load multiple plugins by --plugins and the option does not work as described in docs.

--plugins=plugin,...
A comma-separated list of plugins to load.

workaround:
use --plugins multiple times seems to work.

How to repeat:
$ /usr/local/mysql-proxy/bin/mysql-proxy --plugins=admin,proxy
2012-08-15 18:54:59: (critical) loading module '/usr/local/mysql-proxy-0.8.2-osx10.6-x86/lib/mysql-proxy/plugins/libadmin,proxy.dylib' failed: dlopen(/usr/local/mysql-proxy-0.8.2-osx10.6-x86/lib/mysql-proxy/plugins/libadmin,proxy.dylib, 2): image not found
2012-08-15 18:54:59: (critical) setting --plugin-dir=<dir> might help
[15 Aug 2012 10:03] Hailin Hu
Also, plugin admin is not loaded by default.
The comment and code are not inconsistent. which is prefer? :)

$ cat scr/mysql-proxy-cli.c
452     /*
453      * the MySQL Proxy should load 'admin' and 'proxy' plugins
454      */
455     if (!frontend->plugin_names) {
456         frontend->plugin_names = g_new(char *, 2);
457 
458         frontend->plugin_names[0] = g_strdup("proxy");
459         frontend->plugin_names[1] = NULL;
460     }
[19 Aug 2012 11:23] Valeriy Kravchuk
Verified with 0.9.0 also:

macbook-pro:proxy openxs$ ./bin/mysql-proxy --plugins=admin,proxy
2012-08-19 14:20:57: [global] (critical) loading module '/Users/openxs/dbs/proxy/lib/mysql-proxy/plugins/libadmin,proxy.dylib' failed: dlopen(/Users/openxs/dbs/proxy/lib/mysql-proxy/plugins/libadmin,proxy.dylib, 2): image not found
2012-08-19 14:20:57: [global] (critical) setting --plugin-dir=<dir> might help
macbook-pro:proxy openxs$ ./bin/mysql-proxy --plugins=admin --plugins=proxy
2012-08-19 14:21:11: [global] (*) mysql-proxy 0.9.0 started
...

I'd say this is almost a feature request...
[14 Sep 2012 5:33] Philip Olson
The documentation has been updated, thank you for the report. 

  INI file: plugins=foo,bar
  CLI: --plugins=foo --plugins=bar

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

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