Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f5458f7

Browse files
committed
Merge pull request #10455 from adamwathan/51-fix-nested-transactions
Execute savepoint calls raw instead of preparing
2 parents 2efae94 + b5a6b4e commit f5458f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Illuminate/Database/Connection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ public function beginTransaction()
506506
if ($this->transactions == 1) {
507507
$this->pdo->beginTransaction();
508508
} elseif ($this->transactions > 1 && $this->queryGrammar->supportsSavepoints()) {
509-
$this->statement(
509+
$this->pdo->exec(
510510
$this->queryGrammar->compileSavepoint('trans'.$this->transactions)
511511
);
512512
}
@@ -540,7 +540,7 @@ public function rollBack()
540540
if ($this->transactions == 1) {
541541
$this->pdo->rollBack();
542542
} elseif ($this->transactions > 1 && $this->queryGrammar->supportsSavepoints()) {
543-
$this->statement(
543+
$this->pdo->exec(
544544
$this->queryGrammar->compileSavepointRollBack('trans'.$this->transactions)
545545
);
546546
}

0 commit comments

Comments
 (0)