Merge lp:~miguelaraujo/mysql-proxy/pooled-connection-missing-packet-id-reset into lp:mysql-proxy/0.8

Proposed by Miguel Araújo
Status: Merged
Merged at revision: 1247
Proposed branch: lp:~miguelaraujo/mysql-proxy/pooled-connection-missing-packet-id-reset
Merge into: lp:mysql-proxy/0.8
Diff against target: 26 lines (+8/-1)
1 file modified
plugins/proxy/proxy-plugin.c (+8/-1)
To merge this branch: bzr merge lp:~miguelaraujo/mysql-proxy/pooled-connection-missing-packet-id-reset
Reviewer Review Type Date Requested Status
Jan Kneschke (community) Approve
Review via email: mp+95931@code.launchpad.net

Description of the change

added missing packet-id sequence reset when the auth-phase is over:
    - happens when using pooled connections (the server-side connection is already up and authed).

To post a comment you must log in.
Revision history for this message
Jan Kneschke (jan-kneschke) wrote :

Looks good.

A testcase for this is needed.

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 2012-02-10 13:22:03 +0000
+++ plugins/proxy/proxy-plugin.c 2012-03-05 16:23:24 +0000
@@ -867,6 +867,13 @@
867867
868 network_mysqld_queue_append(recv_sock, recv_sock->send_queue, 868 network_mysqld_queue_append(recv_sock, recv_sock->send_queue,
869 S(auth_resp));869 S(auth_resp));
870
871 /* the server side of connection is already up and authed and we have checked that
872 * the username and client-scramble are the same as in the previous authed connection.
873 * the auth phase is over so we need to reset the packet-id sequence
874 */
875 network_mysqld_queue_reset(send_sock);
876 network_mysqld_queue_reset(recv_sock);
870877
871 g_string_free(auth_resp, TRUE);878 g_string_free(auth_resp, TRUE);
872 }879 }
@@ -1821,7 +1828,7 @@
18211828
1822 g_assert(con->client->challenge == NULL);1829 g_assert(con->client->challenge == NULL);
1823 con->client->challenge = network_mysqld_auth_challenge_copy(con->server->challenge);1830 con->client->challenge = network_mysqld_auth_challenge_copy(con->server->challenge);
1824 1831
1825 con->state = CON_STATE_SEND_HANDSHAKE;1832 con->state = CON_STATE_SEND_HANDSHAKE;
18261833
1827 /**1834 /**

Subscribers

People subscribed via source and target branches