Skip to content

Commit

Permalink
[misc] test small correction
Browse files Browse the repository at this point in the history
  • Loading branch information
rusher committed Nov 16, 2020
1 parent 884e7b9 commit bb602eb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/test/java/org/mariadb/jdbc/BufferTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,11 @@ private void sendByteBufferData(boolean compression, char[] arr) throws SQLExcep
try (Connection connection = setConnection("&useCompression=" + compression)) {
Statement stmt = connection.createStatement();
stmt.execute("TRUNCATE BufferTest");
PreparedStatement preparedStatement =
connection.prepareStatement("INSERT INTO BufferTest VALUES (?)");
preparedStatement.setString(1, new String(arr));
preparedStatement.execute();
try (PreparedStatement preparedStatement =
connection.prepareStatement("INSERT INTO BufferTest VALUES (?)")) {
preparedStatement.setString(1, new String(arr));
preparedStatement.execute();
}
checkResult(arr);
}
}
Expand Down

0 comments on commit bb602eb

Please sign in to comment.