Skip to content

Commit

Permalink
[CONJ-215] test change
Browse files Browse the repository at this point in the history
  • Loading branch information
rusher committed Nov 13, 2015
1 parent b20309c commit 62fa790
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/mariadb/jdbc/MariaDbStatement.java
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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";

}
4 changes: 3 additions & 1 deletion src/test/java/org/mariadb/jdbc/MultiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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')");
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 62fa790

Please sign in to comment.