Restore check for zero or negative transaction nesting

This commit is contained in:
Robbie Averill 2018-06-20 10:41:36 +12:00 committed by Daniel Hensby
parent cbdf547c1b
commit 1048520fbe
No known key found for this signature in database
GPG Key ID: D8DEBC4C8E7BC8B9

View File

@ -360,7 +360,10 @@ class MySQLDatabase extends Database
return false;
}
--$this->transactionNesting;
$this->query('COMMIT AND ' . ($chain ? '' : 'NO ') . 'CHAIN');
if ($this->transactionNesting <= 0) {
$this->transactionNesting = 0;
$this->query('COMMIT AND ' . ($chain ? '' : 'NO ') . 'CHAIN');
}
return true;
}