Bug #33868 | MySQL Proxy aborts when return proxy.PROXY_SEND_RESULT is sent during handshake | ||
---|---|---|---|
Submitted: | 14 Jan 2008 17:12 | Modified: | 11 May 2008 5:39 |
Reporter: | Alex Chittock | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Proxy: Core | Severity: | S3 (Non-critical) |
Version: | 0.6.0, 0.6.1, r 369, 0.7.1 | OS: | Linux (Ubuntu Server 7.10) |
Assigned to: | Assigned Account | CPU Architecture: | Any |
Tags: | handshake network-mysqld-proxy.c.2356 |
[14 Jan 2008 17:12]
Alex Chittock
[11 May 2008 5:39]
Sveta Smirnova
Thank you for the report. Verified as described.
[11 May 2008 5:41]
Sveta Smirnova
Bug #36640 was marked as duplicate of this one. Bug #36640 contains patch and more detailed descriptiona bout cause of the problem.
[25 May 2008 10:59]
David Mobe
Suggested fix: I recommended to fix the code of mysql-proxy-0.6.1\src\network-mysqld-proxy.c from line 2439 to 2453 like this: switch (proxy_lua_read_handshake(con)) { case PROXY_NO_DECISION: break; case PROXY_SEND_RESULT: /* the client overwrote and wants to send its own packet * it is already in the queue */ recv_sock->packet_len = PACKET_LEN_UNSET; g_queue_delete_link(recv_sock->recv_queue->chunks, chunk); return RET_ERROR; default: g_error("proxy_lua_read_handshake return value invalid in %s.%d", __FILE__, __LINE__); recv_sock->packet_len = PACKET_LEN_UNSET; g_queue_delete_link(recv_sock->recv_queue->chunks, chunk); return RET_ERROR; }
[3 Jun 2009 14:27]
Kay Roepke
In the current trunk and release version, the read_handshake and read_auth callbacks no longer receive an argument. The data is only available through the proxy.connection table. Regarding the patch included, I haven't checked whether it would still apply yet.