mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-10 17:28:40 +00:00
bump
This commit is contained in:
parent
006a611a07
commit
2a41801b77
|
|
@ -163,9 +163,25 @@ final class UpdateMapper extends DataMapperAbstract
|
|||
}
|
||||
|
||||
$sth = $this->db->con->prepare($query->toSql());
|
||||
if ($sth !== false) {
|
||||
$sth->execute();
|
||||
if ($sth === false) {
|
||||
throw new \Exception();
|
||||
}
|
||||
|
||||
$deadlock = 0;
|
||||
do {
|
||||
$repeat = false;
|
||||
try {
|
||||
++$deadlock;
|
||||
$sth->execute();
|
||||
} catch (\Throwable $t) {
|
||||
if ($deadlock > 3 || $t->errorInfo[1] !== 1213) {
|
||||
throw $t;
|
||||
}
|
||||
|
||||
\usleep(10000);
|
||||
$repeat = true;
|
||||
}
|
||||
} while($repeat);
|
||||
} catch (\Throwable $t) {
|
||||
// @codeCoverageIgnoreStart
|
||||
\phpOMS\Log\FileLogger::getInstance()->error(
|
||||
|
|
|
|||
|
|
@ -159,7 +159,25 @@ final class WriteMapper extends DataMapperAbstract
|
|||
}
|
||||
|
||||
$sth = $this->db->con->prepare($query->toSql());
|
||||
$sth->execute();
|
||||
if ($sth === false) {
|
||||
throw new \Exception();
|
||||
}
|
||||
|
||||
$deadlock = 0;
|
||||
do {
|
||||
$repeat = false;
|
||||
try {
|
||||
++$deadlock;
|
||||
$sth->execute();
|
||||
} catch (\Throwable $t) {
|
||||
if ($deadlock > 3 || $t->errorInfo[1] !== 1213) {
|
||||
throw $t;
|
||||
}
|
||||
|
||||
\usleep(10000);
|
||||
$repeat = true;
|
||||
}
|
||||
} while($repeat);
|
||||
|
||||
$objId = empty($id = $this->mapper::getObjectId($obj)) ? $this->db->con->lastInsertId() : $id;
|
||||
\settype($objId, $this->mapper::COLUMNS[$this->mapper::PRIMARYFIELD]['type']);
|
||||
|
|
@ -399,9 +417,25 @@ final class WriteMapper extends DataMapperAbstract
|
|||
}
|
||||
|
||||
$sth = $this->db->con->prepare($relQuery->toSql());
|
||||
if ($sth !== false) {
|
||||
$sth->execute();
|
||||
if ($sth === false) {
|
||||
throw new \Exception();
|
||||
}
|
||||
|
||||
$deadlock = 0;
|
||||
do {
|
||||
$repeat = false;
|
||||
try {
|
||||
++$deadlock;
|
||||
$sth->execute();
|
||||
} catch (\Throwable $t) {
|
||||
if ($deadlock > 3 || $t->errorInfo[1] !== 1213) {
|
||||
throw $t;
|
||||
}
|
||||
|
||||
\usleep(10000);
|
||||
$repeat = true;
|
||||
}
|
||||
} while($repeat);
|
||||
} catch (\Throwable $t) {
|
||||
// @codeCoverageIgnoreStart
|
||||
\phpOMS\Log\FileLogger::getInstance()->error(
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user