MXS-199: Support Causal Read in Read Write Splitting (#164)

* MXS-199: Support Causal Read in Read Write Splitting

* move most causal read logic into rwsplit router and get server type from monitor

* misc fix: remove new line

* refactor, move config to right place, replace ltrim with gwbuf_consume

* refacter a little for previous commit

* fix code style
This commit is contained in:
dapeng
2018-02-05 15:09:18 +08:00
committed by Johan Wikman
parent 0696f3f60a
commit 8a0c8e63f2
9 changed files with 222 additions and 3 deletions

View File

@ -423,4 +423,16 @@ extern void dprintAllBuffers(void *pdcb);
*/
void gwbuf_hexdump(GWBUF* buffer);
/**
* Return pointer of the byte at offset from start of chained buffer
* Warning: It not guaranteed to point to a contiguous segment of memory,
* it is only safe to modify the first byte this pointer point to.
*
* @param buffer one or more chained buffer
* @param offset Offset into the buffer
* @return if total buffer length is bigger than offset then return
* the offset byte pointer, otherwise return null
*/
extern uint8_t *gwbuf_byte_pointer(GWBUF* buffer, size_t offset);
MXS_END_DECLS