From 34ae502806f8e8f52880a8d47f56563d27caa61c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Fri, 25 Feb 2022 18:54:26 +0800 Subject: [PATCH] modify plugin name --- Mysql/PDO.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Mysql/PDO.php b/Mysql/PDO.php index caa92df..c200be1 100644 --- a/Mysql/PDO.php +++ b/Mysql/PDO.php @@ -74,6 +74,8 @@ class PDO implements StopHeartbeatCheck */ public function inTransaction(): bool { + echo $this->_transaction, ' ', __FUNCTION__, PHP_EOL; + return $this->_transaction > 0; } @@ -140,6 +142,8 @@ class PDO implements StopHeartbeatCheck $this->_pdo()->beginTransaction(); } $this->_transaction++; + + echo $this->_transaction, ' ', __FUNCTION__, PHP_EOL; } @@ -148,6 +152,8 @@ class PDO implements StopHeartbeatCheck */ public function commit() { + echo $this->_transaction, ' ', __FUNCTION__, PHP_EOL; + $this->_transaction--; if ($this->_transaction == 0) { $this->_pdo()->commit(); @@ -160,6 +166,8 @@ class PDO implements StopHeartbeatCheck */ public function rollback() { + echo $this->_transaction, ' ', __FUNCTION__, PHP_EOL; + $this->_transaction--; if ($this->_transaction == 0) { $this->_pdo()->rollBack();