diff options
| author | 2023-09-12 10:43:14 +0200 | |
|---|---|---|
| committer | 2023-09-12 10:43:14 +0200 | |
| commit | f050a94b48499286abfb4b69f3bcb3dee5f9ea2d (patch) | |
| tree | 1614483dd53294500825d036a52d4d4a5170bb23 /app/Models/EntryDAO.php | |
| parent | f5aba79d147532990cbf321e311e06e3f7bea0d1 (diff) | |
SQL: clean old auto-updates (#5649)
Should help with some DB lock issues.
Complete https://github.com/FreshRSS/FreshRSS/pull/3558 after https://github.com/FreshRSS/FreshRSS/pull/5625 already cherry-picked from it.
* Removed auto-update of MySQL GUID case sensitivity
https://github.com/FreshRSS/FreshRSS/pull/2078
* Contributed to a DB lock in https://github.com/FreshRSS/FreshRSS/issues/5008
Also removed the following non-problematic auto-updates, simply because they were older than the above ones
* Auto-create custom labels (1.12.0) https://github.com/FreshRSS/FreshRSS/pull/2027
* Auto-add JSON column for feeds (1.11.0) https://github.com/FreshRSS/FreshRSS/pull/1838
* Auto-create temporary tables (1.7.0) https://github.com/FreshRSS/FreshRSS/pull/1470
Diffstat (limited to 'app/Models/EntryDAO.php')
| -rw-r--r-- | app/Models/EntryDAO.php | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php index 8306320a0..8a006f802 100644 --- a/app/Models/EntryDAO.php +++ b/app/Models/EntryDAO.php @@ -26,26 +26,6 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo { return str_replace('INSERT INTO ', 'INSERT IGNORE INTO ', $sql); } - //TODO: Move the database auto-updates to DatabaseDAO - protected function createEntryTempTable(): bool { - $ok = false; - $hadTransaction = $this->pdo->inTransaction(); - if ($hadTransaction) { - $this->pdo->commit(); - } - try { - require(APP_PATH . '/SQL/install.sql.' . $this->pdo->dbType() . '.php'); - Minz_Log::warning('SQL CREATE TABLE entrytmp...'); - $ok = $this->pdo->exec($GLOBALS['SQL_CREATE_TABLE_ENTRYTMP'] . $GLOBALS['SQL_CREATE_INDEX_ENTRY_1']) !== false; - } catch (Exception $ex) { - Minz_Log::error(__method__ . ' error: ' . $ex->getMessage()); - } - if ($hadTransaction) { - $this->pdo->beginTransaction(); - } - return $ok; - } - private function updateToMediumBlob(): bool { if ($this->pdo->dbType() !== 'mysql') { return false; @@ -96,14 +76,6 @@ SQL; } } } - if ($errorInfo[0] === FreshRSS_DatabaseDAO::ER_BAD_TABLE_ERROR) { - if (stripos($errorInfo[2], 'tag') !== false) { - $tagDAO = FreshRSS_Factory::createTagDao(); - return $tagDAO->createTagTable(); //v1.12.0 - } elseif (stripos($errorInfo[2], 'entrytmp') !== false) { - return $this->createEntryTempTable(); //v1.7.0 - } - } } if (isset($errorInfo[1])) { if ($errorInfo[1] == FreshRSS_DatabaseDAO::ER_DATA_TOO_LONG) { |
