Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-34272

Implement ODBC Connection Keywords (aka parameters) as OPTIONS for CREATE SERVER

    XMLWordPrintable

Details

    Description

      Unfortunately, CREATE SERVER does not yet support ODBC Connection Keywords (aka parameters) in its OPTIONS clause. For example, this statement does not yet work:

      CREATE SERVER mssql_hq_server
         FOREIGN DATA WRAPPER odbc
      OPTIONS (
         DSN 'Legacy-MSSQL-Server',
         UID 'mssql_user',
         PWD 'password',
      );
      

      This currently results in a syntax error:

      ERROR 1064 (42000): 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 'DSN 'Legacy-MSSQL-Server',
         UID 'mssql_user',
         PWD 'password',
      )' at line 4
      

      The standard only defines a handful universal keywords, and the remaining is left to each driver to decide. So instead of defining allowed keywords and validating their values, we should simply accept them and construct the odbc connection string using these key-value pairs.

      Attachments

        Issue Links

          Activity

            People

              ycp Yuchen Pei
              ycp Yuchen Pei
              Votes:
              1 Vote for this issue
              Watchers:
              3 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.