diff --git a/common/src/main/java/me/lucko/luckperms/storage/methods/H2Datastore.java b/common/src/main/java/me/lucko/luckperms/storage/methods/H2Datastore.java index 247888dc..c57432fd 100644 --- a/common/src/main/java/me/lucko/luckperms/storage/methods/H2Datastore.java +++ b/common/src/main/java/me/lucko/luckperms/storage/methods/H2Datastore.java @@ -66,6 +66,7 @@ public class H2Datastore extends SQLDatastore { @Cleanup PreparedStatement preparedStatement = connection.prepareStatement(queryPS.getQuery()); queryPS.onRun(preparedStatement); preparedStatement.execute(); + success = true; } catch (SQLException e) { e.printStackTrace(); @@ -84,7 +85,6 @@ public class H2Datastore extends SQLDatastore { @Cleanup PreparedStatement preparedStatement = connection.prepareStatement(queryRS.getQuery()); queryRS.onRun(preparedStatement); - preparedStatement.execute(); @Cleanup ResultSet resultSet = preparedStatement.executeQuery(); success = queryRS.onResult(resultSet); diff --git a/common/src/main/java/me/lucko/luckperms/storage/methods/MySQLDatastore.java b/common/src/main/java/me/lucko/luckperms/storage/methods/MySQLDatastore.java index 42f67a56..7bff3f91 100644 --- a/common/src/main/java/me/lucko/luckperms/storage/methods/MySQLDatastore.java +++ b/common/src/main/java/me/lucko/luckperms/storage/methods/MySQLDatastore.java @@ -85,6 +85,7 @@ public class MySQLDatastore extends SQLDatastore { @Cleanup PreparedStatement preparedStatement = connection.prepareStatement(queryPS.getQuery()); queryPS.onRun(preparedStatement); preparedStatement.execute(); + success = true; } catch (SQLException e) { e.printStackTrace(); @@ -103,7 +104,6 @@ public class MySQLDatastore extends SQLDatastore { @Cleanup PreparedStatement preparedStatement = connection.prepareStatement(queryRS.getQuery()); queryRS.onRun(preparedStatement); - preparedStatement.execute(); @Cleanup ResultSet resultSet = preparedStatement.executeQuery(); success = queryRS.onResult(resultSet); diff --git a/common/src/main/java/me/lucko/luckperms/storage/methods/SQLiteDatastore.java b/common/src/main/java/me/lucko/luckperms/storage/methods/SQLiteDatastore.java index f3f543ff..964d12af 100644 --- a/common/src/main/java/me/lucko/luckperms/storage/methods/SQLiteDatastore.java +++ b/common/src/main/java/me/lucko/luckperms/storage/methods/SQLiteDatastore.java @@ -66,6 +66,7 @@ public class SQLiteDatastore extends SQLDatastore { @Cleanup PreparedStatement preparedStatement = connection.prepareStatement(queryPS.getQuery()); queryPS.onRun(preparedStatement); preparedStatement.execute(); + success = true; } catch (SQLException e) { e.printStackTrace(); @@ -84,7 +85,6 @@ public class SQLiteDatastore extends SQLDatastore { @Cleanup PreparedStatement preparedStatement = connection.prepareStatement(queryRS.getQuery()); queryRS.onRun(preparedStatement); - preparedStatement.execute(); @Cleanup ResultSet resultSet = preparedStatement.executeQuery(); success = queryRS.onResult(resultSet);