Closed
Description
Description
"Update mirrors" cron does not finish due to a SQL query error as reported in system notices and in logs:
Aug 4 15:36:59 git gitea[980518]: 2022/08/04 15:36:59 ...s/repo/pushmirror.go:103:PushMirrorsIterate() [I] [62ebbd6b] [SQL] SELECT `id`, `repo_id`, `remote_name`, `interval`, `created_unix`, `last_update`, `last_error` FROM `push_mirror` WHERE (last_update + (`interval` / ?) <= ?) AND (`interval` != 0) ORDER BY last_update ASC LIMIT -1 [1s 1659616619] - 1.073849ms
Aug 4 15:36:59 git gitea[980518]: 2022/08/04 15:36:59 ...ces/mirror/mirror.go:135:Update() [E] [62ebbd6b] PushMirrorsIterate: Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1' at line 1
Gitea Version
1.17.0
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
2.25.1
Operating System
Ubuntu 20.04.4
How are you running Gitea?
Running a Gitea binary downloaded from https://gitea.io/ as a systemd service on Ubuntu 20.04.
MySQL version is: 8.0.30
Database
MySQL