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 Maxime Rainville
parent d8430f549d
commit df257686c1

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;
}