Uploaded image for project: 'MariaDB Connector/Python'
  1. MariaDB Connector/Python
  2. CONPY-106

Exceptions and MariaDB Error codes

    XMLWordPrintable

    Details

      Description

      Currently exception types are checked via SQLSTATE which isn't accurate.

      Instead depending on the error number the exception type should be chosen.

      MariaDB.DataError:

      • ER_DATA_TOO_LONG
      • ER_DATETIME_FUNCTION_OVERFLOW
      • ER_DIVISION_BY_ZERO
      • ER_NO_DEFAULT
      • ER_PRIMARY_CANT_HAVE_NULL
      • ER_WARN_DATA_OUT_OF_RANGE
      • WARN_DATA_TRUNCATED

      Mariadb.ProgrammingError:

      • CR_COMMANDS_OUT_OF_SYNC
      • ER_CANT_DO_THIS_DURING_AN_TRANSACTION
      • ER_DB_CREATE_EXISTS
      • ER_FIELD_SPECIFIED_TWICE
      • ER_INVALID_GROUP_FUNC_USE
      • ER_NO_SUCH_INDEX
      • ER_NO_SUCH_KEY_VALUE
      • ER_NO_SUCH_TABLE
      • ER_NO_SUCH_USER
      • ER_PARSE_ERROR
      • ER_SYNTAX_ERROR
      • ER_TABLE_MUST_HAVE_COLUMNS
      • ER_UNSUPPORTED_EXTENSION
      • ER_WRONG_DB_NAME
      • ER_WRONG_TABLE_NAME

      Mariadb.IntegrityError:

      • ER_CANNOT_ADD_FOREIGN
      • ER_DUP_ENTRY
      • ER_DUP_UNIQUE
      • ER_NO_DEFAULT_FOR_FIELD
      • ER_NO_REFERENCED_ROW
      • ER_NO_REFERENCED_ROW_2
      • ER_ROW_IS_REFERENCED
      • ER_ROW_IS_REFERENCED_2

      Mariadb.OperationError:
      For errornumbers >= 1000 which aren't listed above

      Mariadb.InternalError
      For errornumbers < 1000 which aren't listed above

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              georg Georg Richter
              Reporter:
              georg Georg Richter
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: