From 80dda3f2dcd80f48b64ec27d680b9ff05ed2289a Mon Sep 17 00:00:00 2001 From: Graham Date: Thu, 21 Apr 2022 14:24:10 +0100 Subject: [PATCH] Add missing JOIN condition Signed-off-by: Graham --- .../src/main/kotlin/org/openrs2/archive/cache/CacheExporter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archive/src/main/kotlin/org/openrs2/archive/cache/CacheExporter.kt b/archive/src/main/kotlin/org/openrs2/archive/cache/CacheExporter.kt index e7b119cb..c1e161e2 100644 --- a/archive/src/main/kotlin/org/openrs2/archive/cache/CacheExporter.kt +++ b/archive/src/main/kotlin/org/openrs2/archive/cache/CacheExporter.kt @@ -181,7 +181,7 @@ public class CacheExporter @Inject constructor( JOIN scopes sc ON sc.id = g.scope_id JOIN environments e ON e.id = v.environment_id JOIN languages l ON l.id = v.language_id - LEFT JOIN cache_stats cs ON cs.cache_id = c.id + LEFT JOIN cache_stats cs ON cs.scope_id = sc.id AND cs.cache_id = c.id GROUP BY sc.name, c.id, g.name, e.name, l.iso_code, cs.valid_indexes, cs.indexes, cs.valid_groups, cs.groups, cs.valid_keys, cs.keys, cs.size, cs.blocks ) t