|
public class RewriteBatchedStatementsTest2 {
|
public static void main(String[] args) throws SQLException {
|
String url = "jdbc:mariadb://localhost:3306/information_schema?rewriteBatchedStatements=true";
|
Connection conn = DriverManager.getConnection(url, "root", "");
|
try {
|
String failingQuery1 = "SELECT (1=? AND 2=2)";
|
String failingQuery2 = "SELECT (1=?) AND 2=2";
|
String workingQuery = "SELECT 1=? AND (2=2)";
|
PreparedStatement statement = conn.prepareStatement(failingQuery1);
|
try {
|
statement.setInt(1, 1);
|
statement.executeQuery();
|
} finally {
|
statement.close();
|
}
|
} finally {
|
conn.close();
|
}
|
}
|
}
|
|