Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-579

Keywords missing from DatabaseMetaData.getSQLKeywords()

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 2.2.0, 2.2.1
    • 2.2.2, 1.7.2
    • metadata
    • None
    • Windows 10

    Description

      The DatabaseMetaData that is returned when calling getMetaData() on a Connection has a getSQLKeywords method.

      According to it's documentation, it should return:

      the list of this database's keywords that are not also SQL:2003 keywords

      In my concrete example, I wanted to call a column index, but I got an exception because it is a reserved keyword. However, the keyword list returned by aforementioned method does not contain index.

      I then took the list of keywords from here and the sql 2003 list from here and found over 100 missing keywords.

      Am I missing something? Shouldn't these keywords be returned?

      Here is the line in code, that should return the keywords: Link to MariaDB source

      I have a repository recreating the issue on github

      Attachments

        Activity

          avolkmann Andreas Volkmann created issue -
          avolkmann Andreas Volkmann made changes -
          Field Original Value New Value
          Description The DatabaseMetaData that is returned when calling getMetaData() on a Connection has a getSQLKeywords method.

          According to it's documentation, it should return:
          {quote}
          the list of this database's keywords that are not also SQL:2003 keywords
          {quote}

          In my concrete example, I wanted to call a column _index_, but I got an exception because it is a reserved keyword. However, the keyword list returned by aforementioned method does not contain _index_.

          I then took the list of keywords from [here|https://mariadb.com/kb/en/library/reserved-words/#reserved-words] and the sql 2003 list from [here|http://developer.mimer.com/validator/sql-reserved-words.tml] and found over 100 missing keywords.

          Am I missing something? Shouldn't these keywords be returned?

          I have a repository recreating the issue [on github|https://github.com/goreRatzete/exposed-keywords]
          The DatabaseMetaData that is returned when calling getMetaData() on a Connection has a getSQLKeywords method.

          According to it's documentation, it should return:
          {quote}
          the list of this database's keywords that are not also SQL:2003 keywords
          {quote}

          In my concrete example, I wanted to call a column _index_, but I got an exception because it is a reserved keyword. However, the keyword list returned by aforementioned method does not contain _index_.

          I then took the list of keywords from [here|https://mariadb.com/kb/en/library/reserved-words/#reserved-words] and the sql 2003 list from [here|http://developer.mimer.com/validator/sql-reserved-words.tml] and found over 100 missing keywords.

          Am I missing something? Shouldn't these keywords be returned?

          Here is the line in code, that should return the keywords: [Link to MariaDB source|https://github.com/MariaDB/mariadb-connector-j/blob/386819936ffad08d0ac213413c7a15c7b9a18dad/src/main/java/org/mariadb/jdbc/MariaDbDatabaseMetaData.java#L1064]

          I have a repository recreating the issue [on github|https://github.com/goreRatzete/exposed-keywords]
          diego dupin Diego Dupin made changes -
          Fix Version/s 2.2.2 [ 22920 ]
          Fix Version/s 1.7.2 [ 22921 ]
          diego dupin Diego Dupin added a comment -

          merge https://github.com/MariaDB/mariadb-connector-j/pull/122 (without the SQL:2003 keywords)

          diego dupin Diego Dupin added a comment - merge https://github.com/MariaDB/mariadb-connector-j/pull/122 (without the SQL:2003 keywords)
          diego dupin Diego Dupin made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 85500 ] MariaDB v4 [ 135051 ]

          People

            diego dupin Diego Dupin
            avolkmann Andreas Volkmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.