Upgrade to MySQL 8

Workaround for exception thrown by ResultSet#beforeFirst():
"Operation not allowed for a result set of type ResultSet.TYPE_FORWARD_ONLY"
This commit is contained in:
P0nk
2021-04-02 14:08:41 +02:00
parent 2873d0d031
commit 05bd668cc2
3 changed files with 7 additions and 6 deletions

View File

@@ -1620,7 +1620,9 @@ public class Server {
private static void applyAllWorldTransfers() {
try (Connection con = DatabaseConnection.getConnection();
PreparedStatement ps = con.prepareStatement("SELECT * FROM worldtransfers WHERE completionTime IS NULL")) {
PreparedStatement ps = con.prepareStatement("SELECT * FROM worldtransfers WHERE completionTime IS NULL",
ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_READ_ONLY)) {
ResultSet rs = ps.executeQuery();
List<Integer> removedTransfers = new LinkedList<Integer>();
while(rs.next()) {