Merge lp:~eric-rnd/mysql-proxy/mysql-proxy-fixes into lp:mysql-proxy

Proposed by Eric Herman
Status: Merged
Approved by: Kay Roepke
Approved revision: 820
Merge reported by: Kay Roepke
Merged at revision: not available
Proposed branch: lp:~eric-rnd/mysql-proxy/mysql-proxy-fixes
Merge into: lp:mysql-proxy
Diff against target: None lines
To merge this branch: bzr merge lp:~eric-rnd/mysql-proxy/mysql-proxy-fixes
Reviewer Review Type Date Requested Status
Kay Roepke (community) Approve
Review via email: mp+11873@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Eric Herman (eric-rnd) wrote :

Simple fix for: http://bugs.mysql.com/bug.php?id=47370

produces the following:

halle:mysql-proxy eric$ ./sbin/mysql-proxy --log-file=mysql-proxy.log --plugins=proxy --proxy-backend-addresses=127.0.0.1:13306 --log-level=message &
[1] 10475
halle:mysql-proxy eric$ cat mysql-proxy.log
2009-09-16 13:55:13: (message) mysql-proxy 0.8.0 started
2009-09-16 13:55:13: (message) proxy listening on port :4040
2009-09-16 13:55:13: (message) added read/write backend: 127.0.0.1:13306

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

+1

review: Approve

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-08-25 16:17:38 +0000
+++ plugins/proxy/proxy-plugin.c 2009-09-16 12:20:47 +0000
@@ -1935,6 +1935,7 @@
1935 if (0 != network_socket_bind(listen_sock)) {1935 if (0 != network_socket_bind(listen_sock)) {
1936 return -1;1936 return -1;
1937 }1937 }
1938 g_message("proxy listening on port %s", config->address);
19381939
1939 for (i = 0; config->backend_addresses && config->backend_addresses[i]; i++) {1940 for (i = 0; config->backend_addresses && config->backend_addresses[i]; i++) {
1940 network_backends_add(g->backends, config->backend_addresses[i], BACKEND_TYPE_RW);1941 network_backends_add(g->backends, config->backend_addresses[i], BACKEND_TYPE_RW);
19411942
=== modified file 'src/network-backend.c'
--- src/network-backend.c 2009-05-27 17:43:59 +0000
+++ src/network-backend.c 2009-09-16 12:20:47 +0000
@@ -125,6 +125,8 @@
125 if (!is_known) g_ptr_array_add(bs->backends, new_backend);125 if (!is_known) g_ptr_array_add(bs->backends, new_backend);
126 g_mutex_unlock(bs->backends_mutex);126 g_mutex_unlock(bs->backends_mutex);
127127
128 if (!is_known) g_message("added %s backend: %s", (type == BACKEND_TYPE_RW) ? "read/write" : "read-only", address);
129
128 return is_known ? -1 : 0;130 return is_known ? -1 : 0;
129}131}
130132

Subscribers

People subscribed via source and target branches