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

MariaDbParameterMetaData.getParameterCount() function does not return correct result

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.3.0
    • 1.3.2
    • Other
    • None

    Description

      MariaDBParameterMetaData.getParameterCount() function returns* columnInformations.length* instead parameterCount

      P.S.
      Very basic info about the parameterized query, only reliable method is getParameterCount().

      Currently is the only function the wrong result supplies

      Attachments

        Activity

          haiko04 Hayk Varderesyan created issue -
          haiko04 Hayk Varderesyan made changes -
          Field Original Value New Value
          Description *MariaDBParameterMetaData.getParameterCount()* function returns* columnInformations.length* instead *parameterCount*

          P.S.
          _/**
           * Very basic info about the parameterized query, only reliable method is getParameterCount().
           */_

          Currently is the only function the wrong result supplies :)
          *MariaDBParameterMetaData.getParameterCount()* function returns* columnInformations.length* instead *parameterCount*

          P.S.
          _Very basic info about the parameterized query, only reliable method is getParameterCount()._

          Currently is the only function the wrong result supplies :)
          haiko04 Hayk Varderesyan made changes -
          Attachment mariadb-connector-j.patch [ 40507 ]

          A possible fix I've also created and attached on the task.
          See: mariadb-connector-j.patch

          haiko04 Hayk Varderesyan added a comment - A possible fix I've also created and attached on the task. See: mariadb-connector-j.patch
          diego dupin Diego Dupin added a comment -

          Very basic info about the parameterized query, only reliable method is getParameterCount().
          twist of fate

          The problem was as you point in your patch : columnInformations were used instead of parameterInformations.
          (columnInformation that was used in parameter correspond to result field - nothing related to parameter).

          Correction link :
          https://github.com/MariaDB/mariadb-connector-j/commit/76cfdfe2007a282010736f2608baea12506fd313

          Travis result :
          https://travis-ci.org/MariaDB/mariadb-connector-j/builds/92595386

          diego dupin Diego Dupin added a comment - Very basic info about the parameterized query, only reliable method is getParameterCount(). twist of fate The problem was as you point in your patch : columnInformations were used instead of parameterInformations. (columnInformation that was used in parameter correspond to result field - nothing related to parameter). Correction link : https://github.com/MariaDB/mariadb-connector-j/commit/76cfdfe2007a282010736f2608baea12506fd313 Travis result : https://travis-ci.org/MariaDB/mariadb-connector-j/builds/92595386
          diego dupin Diego Dupin made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          diego dupin Diego Dupin made changes -
          Component/s Other [ 12201 ]
          Fix Version/s 1.3.2 [ 20602 ]
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 72655 ] MariaDB v4 [ 134816 ]

          People

            diego dupin Diego Dupin
            haiko04 Hayk Varderesyan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.