From ce07bbbae5819dcc99bb196da0acbfa6d8739b02 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Fri, 16 Jan 2026 15:03:49 +0000 Subject: [PATCH] Clean up mysqli transactions --- system/Database/MySQLi/Connection.php | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/system/Database/MySQLi/Connection.php b/system/Database/MySQLi/Connection.php index a1c0dcce8479..36980279bcc3 100644 --- a/system/Database/MySQLi/Connection.php +++ b/system/Database/MySQLi/Connection.php @@ -625,8 +625,6 @@ public function insertID(): int */ protected function _transBegin(): bool { - $this->connID->autocommit(false); - return $this->connID->begin_transaction(); } @@ -635,13 +633,7 @@ protected function _transBegin(): bool */ protected function _transCommit(): bool { - if ($this->connID->commit()) { - $this->connID->autocommit(true); - - return true; - } - - return false; + return $this->connID->commit(); } /** @@ -649,12 +641,6 @@ protected function _transCommit(): bool */ protected function _transRollback(): bool { - if ($this->connID->rollback()) { - $this->connID->autocommit(true); - - return true; - } - - return false; + return $this->connID->rollback(); } }