diff options
author | Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> | 2023-07-28 00:03:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-28 00:03:33 +0300 |
commit | 4db4ea4e1bef0c74650835d01487c2b61cc38248 (patch) | |
tree | b725795071f7962755f724822c69c1e360a0a743 /database | |
parent | 10023a0c00e2c2880fc98d2cecb17e15fb9b2455 (diff) |
Fix health query (#15589)
Fix query
Diffstat (limited to 'database')
-rw-r--r-- | database/sqlite/sqlite_health.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/database/sqlite/sqlite_health.c b/database/sqlite/sqlite_health.c index c504cf70a7..ed1a4a6cfc 100644 --- a/database/sqlite/sqlite_health.c +++ b/database/sqlite/sqlite_health.c @@ -692,7 +692,10 @@ failed: error_report("HEALTH [N/A]: Failed to finalize the prepared statement for injecting removed event."); } -#define SQL_SELECT_MAX_UNIQUE_ID "SELECT MAX(hld.unique_id) from health_log_detail hld, health_log hl where hl.host_id = @host_id; and hl.health_log_id = hld.health_log_id" +#define SQL_SELECT_MAX_UNIQUE_ID \ + "SELECT MAX(hld.unique_id) FROM health_log_detail hld, health_log hl " \ + "WHERE hl.host_id = @host_id AND hl.health_log_id = hld.health_log_id" + uint32_t sql_get_max_unique_id (RRDHOST *host) { int rc; |