Add missing ORDER BY to queries fetching the next container/key

I have no idea how I missed this!

Signed-off-by: Graham <gpe@openrs2.org>
bzip2
Graham 4 years ago
parent 995cdbd1b7
commit bb293d3e3f
  1. 2
      archive/src/main/kotlin/org/openrs2/archive/key/KeyBruteForcer.kt

@ -153,6 +153,7 @@ public class KeyBruteForcer @Inject constructor(
SELECT id, data SELECT id, data
FROM containers FROM containers
WHERE (? IS NULL OR id > ?) AND encrypted AND key_id IS NULL WHERE (? IS NULL OR id > ?) AND encrypted AND key_id IS NULL
ORDER BY id ASC
LIMIT 1 LIMIT 1
""".trimIndent() """.trimIndent()
).use { stmt -> ).use { stmt ->
@ -247,6 +248,7 @@ public class KeyBruteForcer @Inject constructor(
SELECT id, (key).k0, (key).k1, (key).k2, (key).k3 SELECT id, (key).k0, (key).k1, (key).k2, (key).k3
FROM keys FROM keys
WHERE ? IS NULL OR id > ? WHERE ? IS NULL OR id > ?
ORDER BY id ASC
LIMIT 1 LIMIT 1
""".trimIndent() """.trimIndent()
).use { stmt -> ).use { stmt ->

Loading…
Cancel
Save