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

Dedicated table options for Spider+ODBC

    XMLWordPrintable

Details

    Description

      It would be nice to change the way how Spider ODBC tables are defined, from:

      CREATE TABLE t1 (
        a INT NOT NULL
      ) ENGINE=SPIDER COMMENT='dsn "dsn", user "usr", password "pwd", table "t1", wrapper "odbc"';

      to:

      CREATE TABLE t1 (
       a INT NOT NULL
      ) ENGINE=SPIDER WRAPPER=ODBC TABNANE='t1' CONNECTION='DSN=dsn;UID=usr;PWD=pwd';

      i.e. move the connection information from COMMENT to separate table options:

      • WRAPPER - with TABLE_TYPE as an alias, for ConnectSE compatibility
      • TABNAME - the remote table name. In case of remote databases that support schemas (e.g. PostgreSQL, Oracle), in addition to non-qualified names, e.g.: TABNAME='t1', it should also support qualified names, e.g. TABNAME='public.t1'.
      • CONNECTION - in the format of ODBC's SQLDriverConnect. This format will allow to pass any kind of attributes (not only DSN, UID and PWD). For example, in case of SQLite, it can be:

        CONNECTION='Driver=SQLite3 ODBC Driver;Database=/tmp/test.sqlite3;NoWCHAR=yes'

      Reasoning:

      • Easier to migrate from ConnectSE. User will need just to fix ENGINE=Connect to ENGINE=Spider.
      • Users might want to have "real" comments on their tables, e.g.:

        CREATE TABLE t1 (
         a INT NOT NULL
        ) ....
        COMMENT='This is my favourite ODBC table';

      • More flexible about database-specific parameters (like Database in case of SQLite).
      • This is the standard way to pass parameters to engines in MariaDB.

      Attachments

        Issue Links

          Activity

            People

              ycp Yuchen Pei
              bar Alexander Barkov
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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