Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Won't Fix
-
2.2.5, 2.4.2
-
None
-
MySQL 5.6 database
Description
We observed an inconsistent behaviour from MySQL Connector/J to MariaDB Connector/J.
Steps to reproduce:
1) Create a SP that always returns 0 (false)
create procedure FalseFunc (OUT o_duplicate BIT(1)) begin set o_duplicate = 0; end |
2) Create a Test case that calls the stored procedure
@Test
|
public void test_sp() throws SQLException { |
Connection con = DriverManager.getConnection("jdbc:mysql://localhost/mydb", "root", null); |
CallableStatement cs = con.prepareCall("{call FalseFunc(?) }"); |
cs.registerOutParameter(1, Types.BOOLEAN); |
cs.executeQuery();
|
|
boolean value = cs.getBoolean(1); |
|
assertFalse(value);
|
|
con.close();
|
}
|
3) Calls the test case with the mariadb-java-client-2.2.5 and mysql-connector-java-5.1.47
4) The test case works with the MySQL JDBC Driver but fails with MariaDB JDBC Driver. It always returns true, even though it should return false.
Attachments
Issue Links
- relates to
-
MDEV-20212 Wrong stored procedure output BIT result format when using binary protocol
- Stalled