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

long binary parsing improvement

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 2.7.3
    • performance
    • None

    Description

      report from https://github.com/mariadb-corporation/mariadb-connector-j/pull/168:

      Now while getting long value from unsigned BIGINT column, method getInternalLong, unnecessary objects will be created: two BigInteger and one String. Also, redundant conversion from byte array to long and back from long to byte array will be performed. The same can be partly applied to getInternalFloat, getInternalDouble, and getInternalBigDecimal.

      There is a more straightforward way to check that a value is in Long range that doesn't require additional objects creation.
      Also, if a column is unsigned, there is no need to convert an array of bytes to long just to convert that value back to bytes to create BigInteger.
      BigDecimal can be created directly from BigInteger - no need to convert BigInteger to a string.

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            diego dupin Diego Dupin
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.