mysqlk_client.c now assumes that mysql packets may arrive in separate pieces.
gw_read_client_event reads client data, and if packet is incomplete it is added to new dcb->dcb_readqueue. When next packet is combined with data in readqueue.

mysql_common.c:gw_MySQL_get_next_packet can now return mysql packet from read buffer although it would span multiple gwbuf buffers.
This commit is contained in:
VilhoRaatikka
2014-05-16 17:01:10 +02:00
parent b341ba317e
commit bb364f531b
6 changed files with 180 additions and 112 deletions

View File

@ -176,6 +176,8 @@ typedef struct dcb {
GWBUF *writeq; /**< Write Data Queue */
SPINLOCK delayqlock; /**< Delay Backend Write Queue spinlock */
GWBUF *delayq; /**< Delay Backend Write Data Queue */
GWBUF *dcb_readqueue; /**< read queue for storing incomplete reads */
SPINLOCK dcb_readqlock; /**< read/write access protection to read queue */
SPINLOCK authlock; /**< Generic Authorization spinlock */
DCBSTATS stats; /**< DCB related statistics */