Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
1.5.0-RC
-
None
Description
Adding rewriteBatchedStatements=true causes a java.sql.PreparedStatement without parameters to fail. It will throw org.mariadb.jdbc.internal.util.dao.QueryException: Query was empty.
Demonstration is included below.
This was tested using mariadb-java-client-1.5.0-RC1.jar
|
public class RewriteBatchedStatementsTest { |
public static void main(String[] args) throws SQLException { |
String failingURL = "jdbc:mariadb://localhost:3306/information_schema?rewriteBatchedStatements=true"; |
String workingURL = "jdbc:mariadb://localhost:3306/information_schema"; |
String url = failingURL;
|
Connection conn = DriverManager.getConnection(url, "root", ""); |
try { |
PreparedStatement statement = conn.prepareStatement("SELECT 1"); |
try { |
statement.executeQuery();
|
} finally { |
statement.close();
|
}
|
} finally { |
conn.close();
|
}
|
}
|
}
|
|
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Fix Version/s | 1.5.1-RC [ 22121 ] |
Component/s | Other [ 12201 ] | |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 76582 ] | MariaDB v4 [ 134891 ] |
correction done in 1.5.1-RC ( release in a few days)