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

long binary parsing improvement

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7.3
    • Component/s: performance
    • Labels:
      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

            Assignee:
            diego dupin Diego Dupin
            Reporter:
            diego dupin Diego Dupin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration