Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.3(EOL), 10.4(EOL), 10.5, 10.6
-
None
Description
This only concerns 10.3+ version. Bug is not present in 10.2.
On second execution of COM_STMT_EXECUTE that have a COM_STMT_SEND_LONG_DATA value, when first execution didn't and type differ, data inserted isn't correct.
example to reproduced :
try (Connection con = DriverManager.getConnection( |
"jdbc:mariadb://localhost:3304/testj?useServerPrepStmts&log", |
"root", |
"")) { |
Statement stmt = con.createStatement();
|
stmt.execute("DROP TABLE IF EXISTS myTable"); |
stmt.execute("CREATE TABLE myTable (a LONGTEXT)"); |
|
try (PreparedStatement ps = con.prepareStatement("INSERT INTO myTable (a) VALUES (?)")) { |
ps.setInt(1, 1); |
ps.execute();
|
|
Reader reader2 = new StringReader("2"); |
ps.setCharacterStream(1, reader2); |
ps.execute();
|
}
|
|
ResultSet rs = stmt.executeQuery("SELECT * FROM myTable"); |
rs.next();
|
assertEquals("1", rs.getString(1)); |
rs.next();
|
assertEquals("2", rs.getString(1)); // return unexpected value '94448646608768' |
|
}
|