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

Signed byte value wrong serialization for text protocol

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 2.4.4
    • 2.5.2
    • protocol
    • None
    • mariadb connectorj 2.4.4, mariadb 10.2.19, java 8

    Description

      I have a client prepared statement for query "select timestampadd(HOUR, ?, '2019-10-10')"
      and set parameter as java Byte value '-6'.
      In result, a mariadb 10.2.19 executes next query "select timestampadd(HOUR, 0xFA, '2019-10-10')"
      Result of query is wrong because it has set wrong value for the parameter.

      I've debugged it a bit and see that org.mariadb.jdbc.internal.com.send.parameters.ByteParameter.java uses hex for text protocol. It seems that code is wrong and should rather be similar to IntParameter.java class code.

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            odemkovych Ostap Demkovych
            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.