MXS-1113 Add support for prepared statements in schemarouter

Add support for binary protocol prepared statements for schemarouter.
This implementation doesn't yet attempt to handle all the edge cases.

Prepared statements are routed to the server that contains the affected
tables, the internal id from the server is then mapped to the session
command id that is inceremented for each prepared statement. This unique
session command id is returned to the client because internal id given
by server might be same around different servers and this way it is
possible to keep track of them and route them to the right servers when
executed.
This commit is contained in:
Marko
2018-07-29 14:48:30 +03:00
parent adbc3a6749
commit 11d57a264c
4 changed files with 160 additions and 10 deletions

View File

@ -147,6 +147,7 @@ private:
void route_queued_query();
void synchronize_shards();
void handle_mapping_reply(SSRBackend& bref, GWBUF** pPacket);
bool handle_statement(GWBUF* querybuf, SSRBackend& bref, uint8_t command, uint32_t type);
/** Member variables */
bool m_closed; /**< True if session closed */