Skip to content

Commit a9bc710

Browse files
big_catinhere
big_cat
authored andcommitted
事务异常场景下无法在commit/rollback事务前将查询模式设为非defer (#266)
1 parent 977fbfd commit a9bc710

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Driver/Mysql/MysqlConnection.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,13 @@ public function receive()
120120
{
121121
$result = $this->connection->recv();
122122
$this->recv = true;
123-
123+
124+
$this->connection->setDefer(false);
125+
124126
if ($result === false) {
125127
throw new MysqlException('Mysql recv error,connectError=' . $this->connection->connect_error . ' error=' . $this->connection->error);
126128
}
127-
$this->connection->setDefer(false);
128-
129+
129130
$this->result = $result;
130131

131132
return $result;

0 commit comments

Comments
 (0)