Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-568

PreparedStatement.getParameterMetadata Not Reporting Query Statement Types Correctly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.2.1
    • Fix Version/s: N/A
    • Component/s: Other
    • Labels:
    • Environment:
      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

            Activity

              People

              Assignee:
              diego dupin Diego Dupin
              Reporter:
              smulcahy Stephen Mulcahy
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration