Details
-
New Feature
-
Status: Open (View Workflow)
-
Critical
-
Resolution: Unresolved
-
None
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
- is blocked by
-
MDEV-28856 Spider: Implement more engine-defined options
- Closed
- relates to
-
MDEV-5271 Support engine-defined attributes per partition
- Closed
-
MDEV-28861 Spider: Deprecate table options by COMMENT
- Closed
-
MDEV-33925 Add TLS-related options for CREATE SERVER
- Open
-
MDEV-27106 Spider: specify connection to data node by engine-defined attributes
- Closed