Fix LIMIT OFFSET order sensitivity (MySQL is kind of dumb...)
This commit is contained in:
parent
bb0c7a8ada
commit
b42951fcb5
1 changed files with 1 additions and 1 deletions
|
|
@ -798,7 +798,7 @@ public class MySQLMapStorage extends MapStorage {
|
||||||
while (!done) {
|
while (!done) {
|
||||||
// Query tiles for given mapkey
|
// Query tiles for given mapkey
|
||||||
Statement stmt = c.createStatement();
|
Statement stmt = c.createStatement();
|
||||||
ResultSet rs = stmt.executeQuery(String.format("SELECT x,y,zoom,Format FROM %s WHERE MapID=%d OFFSET %d LIMIT %d;", tableTiles, mapkey, offset, limit));
|
ResultSet rs = stmt.executeQuery(String.format("SELECT x,y,zoom,Format FROM %s WHERE MapID=%d LIMIT %d OFFSET %d;", tableTiles, mapkey, limit, offset));
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
StorageTile st = new StorageTile(world, map, rs.getInt("x"), rs.getInt("y"), rs.getInt("zoom"), var);
|
StorageTile st = new StorageTile(world, map, rs.getInt("x"), rs.getInt("y"), rs.getInt("zoom"), var);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue