diff --git a/src/main/java/org/mariadb/jdbc/MariaDbClientPreparedStatement.java b/src/main/java/org/mariadb/jdbc/MariaDbClientPreparedStatement.java index 2ef70d7fe..ee2213c70 100644 --- a/src/main/java/org/mariadb/jdbc/MariaDbClientPreparedStatement.java +++ b/src/main/java/org/mariadb/jdbc/MariaDbClientPreparedStatement.java @@ -86,7 +86,7 @@ public MariaDbClientPreparedStatement(MariaDbConnection connection, log.debug("Creating prepared statement for " + sql); }*/ query = new MariaDbClientParameterizeQuery(Utils.nativeSql(sqlQuery, connection.noBackslashEscapes), - connection.noBackslashEscapes, (isRewriteable && firstRewrite != null)? firstRewrite.length() : -1); + connection.noBackslashEscapes, (isRewriteable && firstRewrite != null) ? firstRewrite.length() : -1); parametersCleared = true; } diff --git a/src/main/java/org/mariadb/jdbc/MariaDbServerPreparedStatement.java b/src/main/java/org/mariadb/jdbc/MariaDbServerPreparedStatement.java index 670e25fd9..aeea65f45 100644 --- a/src/main/java/org/mariadb/jdbc/MariaDbServerPreparedStatement.java +++ b/src/main/java/org/mariadb/jdbc/MariaDbServerPreparedStatement.java @@ -83,7 +83,7 @@ public class MariaDbServerPreparedStatement extends AbstractMariaDbPrepareStatem public MariaDbServerPreparedStatement(MariaDbConnection connection, String sql, final int autoGeneratedKeys) throws SQLException { super(connection, autoGeneratedKeys); useFractionalSeconds = connection.getProtocol().getOptions().useFractionalSeconds; - this.sql = deleteEndSemicolonPattern.matcher(sql).replaceAll(""); + this.sql = sql; prepare(sql); } diff --git a/src/main/java/org/mariadb/jdbc/MariaDbStatement.java b/src/main/java/org/mariadb/jdbc/MariaDbStatement.java index 047d266f5..b5dc6fe4a 100644 --- a/src/main/java/org/mariadb/jdbc/MariaDbStatement.java +++ b/src/main/java/org/mariadb/jdbc/MariaDbStatement.java @@ -1227,7 +1227,7 @@ public int[] executeBatch() throws SQLException { int size = batchQueries.size(); batchResultSet = null; boolean rewrittenBatch = isRewriteable && getProtocol().getOptions().rewriteBatchedStatements; - execute(batchQueries, rewrittenBatch, (rewrittenBatch && firstRewrite != null)? firstRewrite.length() : 0); + execute(batchQueries, rewrittenBatch, (rewrittenBatch && firstRewrite != null) ? firstRewrite.length() : 0); return rewrittenBatch ? getUpdateCountsForReWrittenBatch(size) : getUpdateRewrittenCounts(); } else { for (; batchQueriesCount < batchQueries.size(); batchQueriesCount++) { diff --git a/src/main/java/org/mariadb/jdbc/internal/util/constant/Version.java b/src/main/java/org/mariadb/jdbc/internal/util/constant/Version.java index 77d238947..db0c526ae 100644 --- a/src/main/java/org/mariadb/jdbc/internal/util/constant/Version.java +++ b/src/main/java/org/mariadb/jdbc/internal/util/constant/Version.java @@ -1,10 +1,10 @@ package org.mariadb.jdbc.internal.util.constant; public final class Version { - public static final String version = "1.3.0-beta-3"; + public static final String version = "1.3.0-SNAPSHOT"; public static final int majorVersion = 1; public static final int minorVersion = 3; public static final int patchVersion = 0; - public static final String qualifier = "beta-3"; + public static final String qualifier = "SNAPSHOT"; } \ No newline at end of file diff --git a/src/test/java/org/mariadb/jdbc/MultiTest.java b/src/test/java/org/mariadb/jdbc/MultiTest.java index 52e04e096..a8161ef49 100644 --- a/src/test/java/org/mariadb/jdbc/MultiTest.java +++ b/src/test/java/org/mariadb/jdbc/MultiTest.java @@ -37,6 +37,8 @@ public static void initClass() throws SQLException { createTable("MultiTesttest_table2", "col1 VARCHAR(32), col2 VARCHAR(32), col3 VARCHAR(32), col4 VARCHAR(32), " + "col5 VARCHAR(32)"); createTable("MultiTestValues", "col1 VARCHAR(32), col2 VARCHAR(32)"); + + createTable("MultiTestprepsemi", "id int not null primary key auto_increment, text text"); Statement st = sharedConnection.createStatement(); st.execute("insert into MultiTestt1 values(1,'a'),(2,'a')"); st.execute("insert into MultiTestt2 values(1,'a'),(2,'a')"); @@ -430,7 +432,7 @@ public void semicolonTest() throws SQLException { tmpConnection = openNewConnection(connUri, props); Statement sqlInsert = tmpConnection.createStatement(); for (int i = 0; i < 100; i++) { - sqlInsert.addBatch("insert into prepsemi (text) values ('This is a test" + i + "');"); + sqlInsert.addBatch("insert into MultiTestprepsemi (text) values ('This is a test" + i + "');"); } sqlInsert.executeBatch(); } finally {