eee
This commit is contained in:
+5
-8
@@ -193,11 +193,8 @@ class Connection extends Component
|
|||||||
*/
|
*/
|
||||||
public function beginTransaction(): static
|
public function beginTransaction(): static
|
||||||
{
|
{
|
||||||
if ($this->storey == 0) {
|
if ($this->storey < 0 ) {
|
||||||
$pdo = $this->getTransactionClient();
|
$this->storey = 0;
|
||||||
if (!$pdo->inTransaction()) {
|
|
||||||
$pdo->beginTransaction();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
$this->storey++;
|
$this->storey++;
|
||||||
return $this;
|
return $this;
|
||||||
@@ -214,9 +211,9 @@ class Connection extends Component
|
|||||||
if ($pdo === null) {
|
if ($pdo === null) {
|
||||||
/** @var PDO $pdo */
|
/** @var PDO $pdo */
|
||||||
$pdo = Context::set($this->cds, $this->getNormalClientHealth());
|
$pdo = Context::set($this->cds, $this->getNormalClientHealth());
|
||||||
if ($this->storey > 0 && !$pdo->inTransaction()) {
|
}
|
||||||
$pdo->beginTransaction();
|
if ($this->storey > 0 && !$pdo->inTransaction()) {
|
||||||
}
|
$pdo->beginTransaction();
|
||||||
}
|
}
|
||||||
return $pdo;
|
return $pdo;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user