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
- blocks
-
IGNITE-6396 SQL: Support SQLSTATE error code for "NOT NULL" constraint
- Resolved
-
IGNITE-6294 ODBC: Propagate SQLSTATE error codes
- Resolved
-
IGNITE-6317 JDBC thick driver: SQLSTATE error codes
- Resolved
- incorporates
-
IGNITE-6146 JDBC thin: improve error handling, supports vendorCode and SQLState
- Resolved
- links to