Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-7143

CPP: Can not insert zero decimal value with the ODBC driver.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 2.1
    • 2.4
    • odbc
    • None

    Description

      Create the following table:

      CREATE TABLE IF NOT EXISTS TestTable (RecId varchar PRIMARY KEY, RecValue DECIMAL(4,2))
      WITH "template=replicated, cache_name=TestTable_Cache";
      

      Then do an ODBC insert using the OdbcParameter with the OdbcCommand object:

      INSERT INTO TestTable (RecId, RecValue) VALUES ('1', ?)
      

      The Odbc error is "The connection has been disabled." however the JVM is
      throwing this error:

      [SEVERE][client-connector-#47][ClientListenerNioListener] Failed to parse
      client request.
      java.lang.ArrayIndexOutOfBoundsException: 0
       at org.apache.ignite.internal.binary.BinaryUtils.doReadDecimal
      

      Everything works out ok until the actual value set on the parameter is 0.
      Null works fine, values other than 0 work fine. Precision and
      Scale are set appropriately.

      Attachments

        Activity

          People

            isapego Igor Sapego
            isapego Igor Sapego
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: