mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-09 09:42:15 +08:00
Fix: [MariaDB] Unable to clean up heartbeat data (#5425)
Co-authored-by: GJS <homelab.api@gmail.com> Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
@@ -892,11 +892,13 @@ class Database {
|
||||
AND important = 0
|
||||
AND time < ${sqlHourOffset}
|
||||
AND id NOT IN (
|
||||
SELECT id
|
||||
FROM heartbeat
|
||||
WHERE monitor_id = ?
|
||||
ORDER BY time DESC
|
||||
LIMIT ?
|
||||
SELECT id FROM ( -- written this way for Maria's support
|
||||
SELECT id
|
||||
FROM heartbeat
|
||||
WHERE monitor_id = ?
|
||||
ORDER BY time DESC
|
||||
LIMIT ?
|
||||
) AS limited_ids
|
||||
)
|
||||
`, [
|
||||
monitor.id,
|
||||
|
Reference in New Issue
Block a user