Setting proxy.connection.backend_ndx?
I want to share 1 backend connection between 2 application connections. Meaning, there is only one connection between the proxy and the backend, but there are 2 connections between the application and the proxy.
1. The first connection connects to the backend, and I don't do anything.
2. When the second connection connects to the proxy, I intercept with connect_server() and send it this:
proxy.response = {
type = proxy.MYSQLD_PACKET_RAW,
packets = {
proto.to_challenge_packet({
server_status = 2,
server_version = 50132,
thread_id = 12345678922222
})
}
}
3. When a query comes for the second connection, I try to give it the address of the backend: proxy.connection.backend_ndx = 1, so that it can use the established connection. However I get this error:
2009-07-13 13:36:00: (critical) proxy-plugin.c.1129: I have no server backend, closing connection
2009-07-13 13:36:00: (critical) network-mysqld.c.1188: plugin_call(CON_STATE_READ_QUERY) failed
Does anyone know what I'm doing wrong?
EDIT: I'm using 0.7.2, for reference.
Edited 1 time(s). Last edit at 07/13/2009 03:12PM by Adrienne Felto.
Subject
Views
Written By
Posted
Setting proxy.connection.backend_ndx?
4897
July 13, 2009 03:12PM
2395
July 17, 2009 08:19PM
Sorry, you can't reply to this topic. It has been closed.
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.