Fix #1705 : MySQL connection might be lost after long operations

This commit is contained in:
Romain Neutron
2014-02-28 12:35:11 +01:00
parent 170c145e15
commit 035576cefc
22 changed files with 128 additions and 68 deletions

View File

@@ -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();