even after update.php --force-updates
? strange.
e: you’re right, it doesn’t seem to work properly with your imported dump. it seems to work if i seed the database with default tt-rss schema.
here’s the query in question:
SELECT DISTINCT ttrss_feeds.feed_url, ttrss_feeds.last_updated
FROM
ttrss_feeds, ttrss_users, ttrss_user_prefs
WHERE
ttrss_feeds.owner_uid = ttrss_users.id
AND ttrss_user_prefs.profile IS NULL
AND ttrss_users.id = ttrss_user_prefs.owner_uid
AND ttrss_user_prefs.pref_name = 'DEFAULT_UPDATE_INTERVAL'
AND ttrss_users.last_login >= DATE_SUB(NOW(), INTERVAL 120 DAY) AND ((
ttrss_feeds.update_interval = 0
AND ttrss_user_prefs.value != '-1'
AND ttrss_feeds.last_updated < DATE_SUB(NOW(), INTERVAL CONVERT(ttrss_user_prefs.value, SIGNED INTEGER) MINUTE)
) OR (
ttrss_feeds.update_interval > 0
AND ttrss_feeds.last_updated < DATE_SUB(NOW(), INTERVAL ttrss_feeds.update_interval MINUTE)
) OR (ttrss_feeds.last_updated IS NULL
AND ttrss_user_prefs.value != '-1')
OR (last_updated = '1970-01-01 00:00:00'
AND ttrss_user_prefs.value != '-1'))
AND (ttrss_feeds.last_update_started IS NULL OR ttrss_feeds.last_update_started < DATE_SUB(NOW(), INTERVAL 10 MINUTE))
ORDER BY last_updated LIMIT 500
yeah i’m thinking it’s not just metadata, even after restoring the dump to a blank data directory things are screwed up.
select distinct ttrss_feeds.feed_url from ttrss_feeds, ttrss_users, ttrss_user_prefs where ttrss_feeds.owner_uid = ttrss_users.id AND ttrss_user_prefs.profile IS NULL AND ttrss_users.id = ttrss_user_prefs.owner_uid
AND ttrss_user_prefs.pref_name = 'DEFAULT_UPDATE_INTERVAL';
there’s no way this would not produce results on a healthy database, the data is there.
we can even reduce it to the following and it still returns zero:
select distinct feed_url, f.owner_uid, value from ttrss_feeds f, ttrss_users u, ttrss_user_prefs p where f.owner_uid = u.id and pref_name = 'DEFAULT_UPDATE_INTERVAL' and p.owner_uid = u.id;
even though the individual parts of this query work.
MariaDB [ttrss]> select * from ttrss_user_prefs p where p.pref_name = 'DEFAULT_UPDATE_INTERVAL';
+-----------+-------------------------+-------+---------+
| owner_uid | pref_name | value | profile |
+-----------+-------------------------+-------+---------+
| 1 | DEFAULT_UPDATE_INTERVAL | 30 | NULL |
| 2 | DEFAULT_UPDATE_INTERVAL | 30 | NULL |
| 3 | DEFAULT_UPDATE_INTERVAL | 30 | NULL |
+-----------+-------------------------+-------+---------+
3 rows in set (0.01 sec)
MariaDB [ttrss]> select u.id, p.value from ttrss_users u, ttrss_user_prefs p where p.owner_uid = u.id and p.pref_name = 'DEFAULT_UPDATE_INTERVAL';
Empty set (0.00 sec)
blank database works as expected:
MariaDB [fox_test]> select u.id, p.value from ttrss_users u, ttrss_user_prefs p where p.owner_uid = u.id and p.pref_name = 'DEFAULT_UPDATE_INTERVAL';
+----+-------+
| id | value |
+----+-------+
| 1 | 30 |
+----+-------+
1 row in set (0.01 sec)
again i must suggest reporting this to mariadb developers, with the dumps and everything.