Skip to content

Commit

Permalink
事务异常场景下无法在commit/rollback事务前将查询模式设为非defer (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
big_cat authored and inhere committed Dec 21, 2018
1 parent 977fbfd commit a9bc710
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Driver/Mysql/MysqlConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,13 @@ public function receive()
{
$result = $this->connection->recv();
$this->recv = true;


$this->connection->setDefer(false);

if ($result === false) {
throw new MysqlException('Mysql recv error,connectError=' . $this->connection->connect_error . ' error=' . $this->connection->error);
}
$this->connection->setDefer(false);


$this->result = $result;

return $result;
Expand Down

0 comments on commit a9bc710

Please sign in to comment.