Router has now capability value which currently tells whether router session expects stream or individual, complete statements. With read con
nection router stream is used and with read/write split router individual statements are passed to router. Added new function to ROUTER_OBJECT : uint8_t (*getCapabilities)(ROUTER *instance, void* router_session); which is implemented in every route r. Added support for multi-statement packets in rwsplit router. In other words, if network packet includes multiple mysql statements, they are separated and passed to router one by one. Multi-packet statements (those which exceeds network packet boundaries) are _not_ supported yet.
This commit is contained in:
@ -856,7 +856,7 @@ static int gw_change_user(DCB *backend, SERVER *server, SESSION *in_session, GWB
|
||||
backend_protocol = backend->protocol;
|
||||
client_protocol = in_session->client->protocol;
|
||||
|
||||
queue->command = ROUTER_CHANGE_SESSION;
|
||||
// queue->command = ROUTER_CHANGE_SESSION;
|
||||
|
||||
// now get the user, after 4 bytes header and 1 byte command
|
||||
client_auth_packet += 5;
|
||||
@ -939,7 +939,7 @@ static int gw_session(DCB *backend_dcb, void *data) {
|
||||
GWBUF *queue = NULL;
|
||||
|
||||
queue = (GWBUF *) data;
|
||||
queue->command = ROUTER_CHANGE_SESSION;
|
||||
// queue->command = ROUTER_CHANGE_SESSION;
|
||||
backend_dcb->func.write(backend_dcb, queue);
|
||||
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user