Track session state only when required

The protocol should not track the session state as the parsing is quite
expensive with the current code. This change is a workaround that enables
the parsing only when required. A proper way to handle this would be to do
all the response processing in one place thus avoiding the duplication of
work.
This commit is contained in:
Markus Mäkelä
2019-03-05 12:24:15 +02:00
parent b97976c4ee
commit 5b43940559
5 changed files with 16 additions and 2 deletions

View File

@ -63,6 +63,7 @@ MySQLProtocol* mysql_protocol_init(DCB* dcb, int fd)
p->changing_user = false;
p->num_eof_packets = 0;
p->large_query = false;
p->track_state = false;
/*< Assign fd with protocol */
p->fd = fd;
p->owner_dcb = dcb;