Fix handling of transactions with large results

If transaction replaying was enabled and a result was returned in more
than one call to clientReply, a NULL value would be added to the statement
which in turn would trigger a debug assertion.

Similarly any following statements in the transaction would be executed
regardless of whether the result was complete.

Renamed the statement execution function to better describe what it does.

Extended the basic functional test case to cover this.
This commit is contained in:
Markus Mäkelä
2018-07-07 01:42:11 +03:00
parent 77a1417479
commit 0614ff4c9d
3 changed files with 32 additions and 4 deletions

View File

@ -60,6 +60,19 @@ int main(int argc, char** argv)
{
}
},
{
"Large result",
{
bind(ok, "BEGIN"),
bind(ok, "SELECT REPEAT('a', 100000)"),
},
{
bind(ok, "SELECT REPEAT('a', 100000)"),
bind(ok, "COMMIT"),
},
{
}
},
{
"Transaction with a write",
{