mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
commit
54c72efb46
2 changed files with 6 additions and 4 deletions
|
@ -208,7 +208,7 @@ class sqlDAL
|
|||
*
|
||||
*/
|
||||
|
||||
_error_log("writeSql [{$stmt->errno}] {$stmt->error} ".' '.json_encode(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS))) . " userAgent=[{$_SERVER['HTTP_USER_AGENT']}]";
|
||||
_error_log(sprintf('writeSql [%s] {%s} %s userAgent=[%s]', $stmt->errno, $stmt->error, json_encode(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS)), $_SERVER['HTTP_USER_AGENT'] ?? '-'));
|
||||
if($stmt->errno == 1205 && preg_match('/CachesInDB/', $preparedStatement)){//Lock wait timeout exceeded; try restarting transaction
|
||||
_error_log("writeSql Recreate CachesInDB ");
|
||||
$sql = 'DROP TABLE IF EXISTS `CachesInDB`';
|
||||
|
|
|
@ -467,11 +467,13 @@ class Cache extends PluginAbstract {
|
|||
|
||||
$rows = Cache_schedule_delete::getAll();
|
||||
Cache_schedule_delete::truncateTable();
|
||||
if (is_iterable($rows)) {
|
||||
foreach ($rows as $row) {
|
||||
CacheDB::deleteCacheStartingWith($row['name'], false);
|
||||
self::deleteCacheDir($row['name']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue