mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 13:33:14 +00:00
Fix #1705 : MySQL connection might be lost after long operations
This commit is contained in:
@@ -1055,6 +1055,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
':record_id' => $this->record_id
|
||||
)
|
||||
);
|
||||
$stmt->closeCursor();
|
||||
|
||||
$this->reindex();
|
||||
|
||||
@@ -1181,6 +1182,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
$sql = 'UPDATE record SET jeton=(jeton | ' . JETON_MAKE_SUBDEF . ') WHERE record_id = :record_id';
|
||||
$stmt = $connbas->prepare($sql);
|
||||
$stmt->execute(array(':record_id' => $this->get_record_id()));
|
||||
$stmt->closeCursor();
|
||||
|
||||
return $this;
|
||||
}
|
||||
@@ -1197,6 +1199,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
WHERE record_id= :record_id';
|
||||
$stmt = $connbas->prepare($sql);
|
||||
$stmt->execute(array(':record_id' => $this->record_id));
|
||||
$stmt->closeCursor();
|
||||
|
||||
return $this;
|
||||
}
|
||||
@@ -1264,6 +1267,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
':originalname' => null,
|
||||
':mime' => null,
|
||||
));
|
||||
$stmt->closeCursor();
|
||||
|
||||
$story_id = $databox->get_connection()->lastInsertId();
|
||||
|
||||
@@ -1319,6 +1323,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
':originalname' => $file->getOriginalName(),
|
||||
':mime' => $file->getFile()->getMimeType(),
|
||||
));
|
||||
$stmt->closeCursor();
|
||||
|
||||
$record_id = $databox->get_connection()->lastInsertId();
|
||||
|
||||
|
Reference in New Issue
Block a user