Uploaded image for project: 'MariaDB Connector/node.js'
  1. MariaDB Connector/node.js
  2. CONJS-213

update error code with recent MariaDB server

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • None
    • 3.0.2
    • other
    • None

    Description

      In order to be compatible with mysql/mysql2 connectors, connector error have a property error.code that correspond to server error code .

      example:

      SqlError: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'wrong query' at line 1
      sql: wrong query - parameters:[]
          at Object.module.exports.createError (C:\temp\mariadb-connector-.
          ...  
        sql: 'wrong query - parameters:[]',
        fatal: false,
        errno: 1064,
        sqlState: '42000',
        code: 'ER_PARSE_ERROR'
      }
      

      This code, 'ER_PARSE_ERROR' in example has then be used to compare error in different framework.

      Connector error code list must be update to recent MariaDB 10.9 error code (actually use 10.6 error code list)

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.