Details
-
Task
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
None
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
- relates to
-
MDEV-33925 Add TLS-related options for CREATE SERVER
-
- Open
-
- split to
-
MDEV-34716 Allow arbitrary options in CREATE SERVER
-
- Closed
-
Hi holyfoot, ptal thanks (in the branch 11.4-enterprise-ment-796):
# the CS spider part of the main implementation of MENT-796
beacfcbeac9 MDEV-34272 create server with odbc results in connection string
# the sql layer implementation of MENT-796
e318fc9c45d MDEV-34272 Allow arbitrary options in CREATE SERVER
# fixes an independent SERVER bug
f7218cafe1c MDEV-34272 Fix mysql.servers socket max length too short
# just some independent cleanups, should be backported to the earliest possible version
ea1249e5abe MDEV-34272 spider: some trivial cleanups and documentation
also applied to CS (in bb-11.4-mdev-34272) as
d2eb785f3e9 upstream/bb-11.4-mdev-34272 MDEV-34272 create server with odbc results in connection string
cef6d3e0d12 MDEV-34272 Allow arbitrary options in CREATE SERVER
3e87ba578bd MDEV-34272 Fix mysql.servers socket max length too short
e6234e3eec9 MDEV-34272 spider: some trivial cleanups and documentation