Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
1.1.7
-
None
-
None
Description
We use stored procedures with DECIMAL(10,2) as parameter type definition - we receive an exception with the following cause:
...
Caused by: java.sql.SQLException: cannot parse parameter definition :
IN bar DECIMAL(10
at org.mariadb.jdbc.CallableParameterMetaData.readMetadata(MySQLCallableStatement.java:193)
at org.mariadb.jdbc.CallableParameterMetaData.readMetadataFromDBIfRequired(MySQLCallableStatement.java:63)
at org.mariadb.jdbc.CallableParameterMetaData.getParam(MySQLCallableStatement.java:237)
at org.mariadb.jdbc.CallableParameterMetaData.getName(MySQLCallableStatement.java:278)
at org.mariadb.jdbc.MySQLCallableStatement.nameToIndex(MySQLCallableStatement.java:493)
at org.mariadb.jdbc.MySQLCallableStatement.setObject(MySQLCallableStatement.java:879)
It seems, that the parameters are splitted the wrong way:
StringTokenizer tokenizer = new StringTokenizer(paramList,",", false);
We worked around this issue by using a double without specific definition, cause of default settings of DECIMAL.
Example Procedure:
{{
delimiter //
CREATE PROCEDURE test_proc
(
IN foo VARCHAR(255),
IN bar DECIMAL(10,2),
OUT result int(11)
)
SQL SECURITY INVOKER
BEGIN
select "test";
END //
}}
Attachments
Issue Links
- relates to
-
CONJ-165 Updates to DECIMAL field through Java Connector return "Method Not Yet Implemented" in LibreOffice Base
- Closed