]> git.wh0rd.org Git - tt-rss.git/commitdiff
update previous to only affect mysql
authorAndrew Dolgov <noreply@fakecake.org>
Tue, 5 Dec 2017 19:46:18 +0000 (22:46 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Tue, 5 Dec 2017 19:46:18 +0000 (22:46 +0300)
classes/article.php

index 7430fac33cf287a01cd707de1262953749b05d79..edf95b74318659d11f96355df9249ed47b99325b 100644 (file)
@@ -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();