Merge lp:~diego-fmpwizard/mysql-proxy/short-options into lp:mysql-proxy

Proposed by fmpwizard
Status: Approved
Approved by: Kay Roepke
Approved revision: not available
Proposed branch: lp:~diego-fmpwizard/mysql-proxy/short-options
Merge into: lp:mysql-proxy
Diff against target: None lines
To merge this branch: bzr merge lp:~diego-fmpwizard/mysql-proxy/short-options
Reviewer Review Type Date Requested Status
Kay Roepke (community) Approve
Review via email: mp+6781@code.launchpad.net
To post a comment you must log in.
Revision history for this message
fmpwizard (diego-fmpwizard) wrote :

Ready for merging.

Revision history for this message
Kay Roepke (kay-roepke) wrote :

> Ready for merging.

One thing I'd like to be sure of is the effect of multiple plugins registering the same short option name:
For example, it is possible that a different plugin author tries to use "s" meaning script.

Does the order of loading the plugins affect this, i.e. will the last one win (resulting in the prior plugins to not receive their option)?
If that's the case we need to guard the combining of options with at least a warning (it shouldn't be an error, because the end-user cannot do anything about it).
Until we know the answer, we shouldn't merge this in.

Revision history for this message
fmpwizard (diego-fmpwizard) wrote :

Hi,

I know that for the same plugin, the second time you specify an
option, that one will win. But I'm not sure if it makes a difference
if a "different plugin" tries to use the same option.

I can try that and let you know.

Diego

On Sun, May 31, 2009 at 1:44 AM, Kay Roepke <email address hidden> wrote:
>> Ready for merging.
>
> One thing I'd like to be sure of is the effect of multiple plugins registering the same short option name:
> For example, it is possible that a different plugin author tries to use "s" meaning script.
>
> Does the order of loading the plugins affect this, i.e. will the last one win (resulting in the prior plugins to not receive their option)?
> If that's the case we need to guard the combining of options with at least a warning (it shouldn't be an error, because the end-user cannot do anything about it).
> Until we know the answer, we shouldn't merge this in.
> --
> https://code.launchpad.net/~diego-fmpwizard/mysql-proxy/short-options/+merge/6781
> You are the owner of lp:~diego-fmpwizard/mysql-proxy/short-options.
>

--
Diego Medina
Web Developer
http://www.fmpwizard.com

Revision history for this message
Kay Roepke (kay-roepke) wrote :

Since the proxy plugin is the only place we have short options yet, I'll approve and merge this.

review: Approve

Unmerged revisions

666. By Diego Medina <email address hidden>

Merged the latest code form trunk (multi-th)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/proxy/proxy-plugin.c'
--- plugins/proxy/proxy-plugin.c 2009-03-31 17:16:15 +0000
+++ plugins/proxy/proxy-plugin.c 2009-05-25 16:06:52 +0000
@@ -1861,15 +1861,15 @@
1861 /* make sure it isn't collected */1861 /* make sure it isn't collected */
1862 static GOptionEntry config_entries[] = 1862 static GOptionEntry config_entries[] =
1863 {1863 {
1864 { "proxy-address", 0, 0, G_OPTION_ARG_STRING, NULL, "listening address:port of the proxy-server (default: :4040)", "<host:port>" },1864 { "proxy-address", 'P', 0, G_OPTION_ARG_STRING, NULL, "listening address:port of the proxy-server (default: :4040)", "<host:port>" },
1865 { "proxy-read-only-backend-addresses", 1865 { "proxy-read-only-backend-addresses",
1866 0, 0, G_OPTION_ARG_STRING_ARRAY, NULL, "address:port of the remote slave-server (default: not set)", "<host:port>" },1866 'r', 0, G_OPTION_ARG_STRING_ARRAY, NULL, "address:port of the remote slave-server (default: not set)", "<host:port>" },
1867 { "proxy-backend-addresses", 0, 0, G_OPTION_ARG_STRING_ARRAY, NULL, "address:port of the remote backend-servers (default: 127.0.0.1:3306)", "<host:port>" },1867 { "proxy-backend-addresses", 'b', 0, G_OPTION_ARG_STRING_ARRAY, NULL, "address:port of the remote backend-servers (default: 127.0.0.1:3306)", "<host:port>" },
1868 1868
1869 { "proxy-skip-profiling", 0, G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE, NULL, "disables profiling of queries (default: enabled)", NULL },1869 { "proxy-skip-profiling", 0, G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE, NULL, "disables profiling of queries (default: enabled)", NULL },
18701870
1871 { "proxy-fix-bug-25371", 0, 0, G_OPTION_ARG_NONE, NULL, "fix bug #25371 (mysqld > 5.1.12) for older libmysql versions", NULL },1871 { "proxy-fix-bug-25371", 0, 0, G_OPTION_ARG_NONE, NULL, "fix bug #25371 (mysqld > 5.1.12) for older libmysql versions", NULL },
1872 { "proxy-lua-script", 0, 0, G_OPTION_ARG_FILENAME, NULL, "filename of the lua script (default: not set)", "<file>" },1872 { "proxy-lua-script", 's', 0, G_OPTION_ARG_FILENAME, NULL, "filename of the lua script (default: not set)", "<file>" },
1873 1873
1874 { "no-proxy", 0, G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE, NULL, "don't start the proxy-module (default: enabled)", NULL },1874 { "no-proxy", 0, G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE, NULL, "don't start the proxy-module (default: enabled)", NULL },
1875 1875

Subscribers

People subscribed via source and target branches