From bb293d3e3fb15312821d74554515b94f104939d7 Mon Sep 17 00:00:00 2001 From: Graham Date: Sun, 7 Mar 2021 13:58:57 +0000 Subject: [PATCH] Add missing ORDER BY to queries fetching the next container/key I have no idea how I missed this! Signed-off-by: Graham --- .../src/main/kotlin/org/openrs2/archive/key/KeyBruteForcer.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/archive/src/main/kotlin/org/openrs2/archive/key/KeyBruteForcer.kt b/archive/src/main/kotlin/org/openrs2/archive/key/KeyBruteForcer.kt index 7d97f6e0cb..47dae9cd16 100644 --- a/archive/src/main/kotlin/org/openrs2/archive/key/KeyBruteForcer.kt +++ b/archive/src/main/kotlin/org/openrs2/archive/key/KeyBruteForcer.kt @@ -153,6 +153,7 @@ public class KeyBruteForcer @Inject constructor( SELECT id, data FROM containers WHERE (? IS NULL OR id > ?) AND encrypted AND key_id IS NULL + ORDER BY id ASC LIMIT 1 """.trimIndent() ).use { stmt -> @@ -247,6 +248,7 @@ public class KeyBruteForcer @Inject constructor( SELECT id, (key).k0, (key).k1, (key).k2, (key).k3 FROM keys WHERE ? IS NULL OR id > ? + ORDER BY id ASC LIMIT 1 """.trimIndent() ).use { stmt ->