Skip to content
Permalink
Browse files

[CONJ-642] correcting test when not rewritable and option option "use…

…BulkStmts" not set

(cherry picked from commit e7c0940)
  • Loading branch information...
rusher committed Sep 3, 2018
1 parent 8b8f9e1 commit 24a1a5d2456e32089a5cebbacb35b9827fa0055e
Showing with 15 additions and 7 deletions.
  1. +15 −7 src/test/java/org/mariadb/jdbc/PreparedStatementTest.java
@@ -52,15 +52,23 @@

package org.mariadb.jdbc;

import org.junit.Assume;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

import java.io.UnsupportedEncodingException;
import java.math.BigInteger;
import java.sql.*;

import static org.junit.Assert.*;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.SQLSyntaxErrorException;
import java.sql.Statement;
import java.sql.Types;
import org.junit.Assume;
import org.junit.BeforeClass;
import org.junit.Test;

public class PreparedStatementTest extends BaseTest {
private static final int ER_NO_SUCH_TABLE = 1146;
@@ -372,7 +380,7 @@ private void testRewriteMultiPacket(boolean notRewritable) throws SQLException {
int[] results = pstmt.executeBatch();
assertEquals(2, results.length);
for (int result : results) {
if (!notRewritable || (isMariadbServer() && minVersion(10,2))) {
if (!notRewritable || (isMariadbServer() && minVersion(10,2) && sharedOptions().useBulkStmts)) {
assertEquals(Statement.SUCCESS_NO_INFO, result);
} else {
assertEquals(1, result);

0 comments on commit 24a1a5d

Please sign in to comment.
You can’t perform that action at this time.