Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Won't Fix
-
2.2.1
-
Windows 10, MariaDb 10.2.11
Description
PreparedStatement.getParameterMetadata is not reporting metadata information correctly. Once returned, Parametermeta only correctly reports the number of parameters a statement contains. It does not report type information correctly - all types are returned as String.
Is there a suggested way to get ParameterMetadata in the absence of the API returning it using PreparedStatement.getParametermetadata.
Example program attached which exhibits the outlined behaviour above. Executed against MariaDb 10.2.1 on Windows 10 using client driver 2.2.1.
Sample output from execution of test program
Connecting to a selected database...
JDBC Version = 4, version = 2.2.1
Connected database successfully...
ps = sql : 'INSERT INTO test (id, dateField, timeField, stringField) VALUES (?, ?, ?, ?)', parameters : [666333425,'2018-01-02',15:35:13,'s']
Name: java.lang.String
TYPE: VARSTRING
MODE: IN
Name: java.lang.String
TYPE: VARSTRING
MODE: IN
Name: java.lang.String
TYPE: VARSTRING
MODE: IN
Name: java.lang.String
TYPE: VARSTRING
MODE: IN
Goodbye!
Attachments
Issue Links
- relates to
-
MDEV-15031 Parameter metadata
- Open