MXS-1507: Fix replaying of empty transactions

If the starting of a transaction was interrupted by a server failure, the
query needs to be retried. This needs to be done as a transaction replay
to keep the routing logic consistent and simple.

When a non-autocommit transaction is interrupted, there will be no query
in progress and no replaying is needed. To handle this case, the replay
initialization logic needed to be altered to treat truly empty
transactions as a success case.
This commit is contained in:
Markus Mäkelä
2018-06-03 19:16:03 +03:00
parent 74cc74ed66
commit 445eece95b
3 changed files with 119 additions and 47 deletions

View File

@ -480,6 +480,7 @@ public:
SHA1Checksum()
{
SHA1_Init(&m_ctx);
m_sum.fill(0); // CentOS 6 doesn't like aggregate initialization...
}
void update(GWBUF* buffer)