Add result set buffering to MySQLBackend

The backend MySQL protocol module now supports a new routing capability
which allows result sets to be gathered into one buffer before they are
routed onward. This should not be used by modules that expect large
result sets as the result set is buffered in memory.

Adding a limit on how large of a result set could be buffered would allow
relatively safe use of this routing capability without compromising the
stability of the system.
This commit is contained in:
Markus Makela
2016-12-11 12:24:25 +02:00
parent d543ecb483
commit 106f482f45
5 changed files with 52 additions and 3 deletions

View File

@ -40,6 +40,8 @@ typedef enum routing_capability
RCAP_TYPE_STMT_OUTPUT = 0x0010, /* 0b0000000000010000 */
/**< Each delivered buffer is contiguous; implies RCAP_TYPE_STMT_OUTPUT. */
RCAP_TYPE_CONTIGUOUS_OUTPUT = 0x0030, /* 0b0000000000110000 */
/** Result sets are delivered in one buffer; implies RCAP_TYPE_STMT_OUTPUT. */
RCAP_TYPE_RESULTSET_OUTPUT = 0x0050, /* 0b0000000001110000 */
} routing_capability_t;