From: Andrew Dolgov Date: Tue, 5 Dec 2017 19:46:18 +0000 (+0300) Subject: update previous to only affect mysql X-Git-Tag: 18.8~127 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=8e1450aa1533b59547dfd451e9c979d37eef3486;p=tt-rss.git update previous to only affect mysql --- diff --git a/classes/article.php b/classes/article.php index 7430fac3..edf95b74 100644 --- a/classes/article.php +++ b/classes/article.php @@ -903,9 +903,14 @@ class Article extends Handler_Protected { // purge orphaned posts in main content table + if (DB_TYPE == "mysql") + $limit_qpart = "LIMIT 5000"; + else + $limit_qpart = ""; + $pdo = Db::pdo(); $res = $pdo->query("DELETE FROM ttrss_entries WHERE - NOT EXISTS (SELECT ref_id FROM ttrss_user_entries WHERE ref_id = id) LIMIT 5000"); + NOT EXISTS (SELECT ref_id FROM ttrss_user_entries WHERE ref_id = id) $limit_qpart"); if ($do_output) { $rows = $res->rowCount();