Enable trx boundary detection using regexes

Transaction boundaries can now be detected using regexes.
All else being equal, it gives a 10% performance improvement
compared to qc-based detection.

In a subsequent change, mysql_client.c will be modified to use
qc_get_trx_type_mask() instead of qc_get_type_mask().

Currently the use of regex matching is turned on using an
environment variable. That will change.
This commit is contained in:
Johan Wikman
2017-03-10 15:34:57 +02:00
parent 0985a18a7e
commit 8e81941058
6 changed files with 672 additions and 13 deletions

View File

@ -1523,7 +1523,7 @@ static int route_by_statement(MXS_SESSION* session, uint64_t capabilities, GWBUF
if (MYSQL_GET_COMMAND(data) == MYSQL_COM_QUERY)
{
uint32_t type = qc_get_type_mask(packetbuf);
uint32_t type = qc_get_trx_type_mask(packetbuf);
if (type & QUERY_TYPE_BEGIN_TRX)
{