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 247888dcf..c57432fde 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 42f67a563..7bff3f911 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 f3f543ff8..964d12afc 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);