If readwritesplit.c:routeQuery gets a GWBUF whose type is UNDEFINED, then each MySQL packet is extracted from input buffer and passed to new function, route_single_stmt. Each extracted packet is stored in separate GWBUF and added types GWBUF_TYPE_MYSQL and GWBUG_TYPE_SINGLE_STMT which makes it possible to execute session commands and process reply packets properly.

Code nedes still cleaning but this is for testing atm.
This commit is contained in:
VilhoRaatikka
2014-12-13 01:55:40 +02:00
parent 339f604d73
commit c31f971999
3 changed files with 599 additions and 22 deletions

View File

@ -41,6 +41,7 @@ extern char *modutil_get_SQL(GWBUF *);
extern GWBUF *modutil_replace_SQL(GWBUF *, char *);
extern char *modutil_get_query(GWBUF* buf);
extern int modutil_send_mysql_err_packet(DCB *, int, int, int, const char *, const char *);
GWBUF* modutil_get_next_MySQL_packet(GWBUF** p_readbuf);
GWBUF *modutil_create_mysql_err_msg(
int packet_number,