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

Meaningful error codes and types of exceptions for SQL operations

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0
    • 2.3
    • sql

    Description

      Presently, SQL engine throws a generic type of exception with custom text in case of an operation failure. In result, Ignite ODBC driver returns a similar error code (2000) for different kind of failures.

      For example, error code 2000 is returned for the following

      Duplicate key during INSERT [key=CorpcontactcountKey [idHash=1412656257, hash=2004096461, mdn=919200000000]] 
      
      Failed to parse query: INSERT INTO "DG".Corpcontactcount (mdn,contactcount,lastupdatetime)
      values(?,?,?,?) 
      
      Wrong value has been set [typeName=Pocsubscrinfo, fieldName=vocoderid, fieldType=short, assignedValueType=byte] Error Code: 2000
      

      The following has to be done:

      • Create unique types of exceptions for Java whenever applicable.
      • Add errorCode parameter and method to a generic SQL exception.
      • ODBC and JDBC drivers have to return unique codes based on the exception code or type.
      • All the codes have to be documented on readme.io.

      Attachments

        Issue Links

          Activity

            People

              al.psc Alexander Paschenko
              dmagda Denis A. Magda
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: