[MDEV-29687] ODBC tables do not quote identifier names correctly Created: 2022-10-03 Updated: 2022-11-08 Resolved: 2022-11-08 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Connect |
| Affects Version/s: | 10.3 |
| Fix Version/s: | 10.3.37 |
| Type: | Bug | Priority: | Critical |
| Reporter: | markus makela | Assignee: | Anel Husakovic |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
In Postgres:
In MariaDB:
Looking at the network capture, we can see that the identifiers aren't quoted correctly.
A workaround is to use SrcDef to define the SQL statement:
|
| Comments |
| Comment by Anel Husakovic [ 2022-10-09 ] |
|
markus makela |
| Comment by markus makela [ 2022-10-09 ] |
|
The same as MariaDB in ANSI mode: SELECT "my space column" FROM "schema1"."space_in_column_name" I believe this is standard ANSI SQL: single quotes are for strings, double quotes are for identifiers. Backticks are a MySQL/MariaDB extension. |
| Comment by Anel Husakovic [ 2022-10-10 ] |
|
Connect SE has a table option quoted for ODBC type (see table options) that you should give to create statement, problem here is that it fails even with that. THere is also qchar option but as tested I noted that psqlodbca.so will update it for default double quotes. |
| Comment by Anel Husakovic [ 2022-10-20 ] |
|
TheLinuxJedi please review PR 2295 |
| Comment by Andrew Hutchings [ 2022-11-03 ] |
|
Reopening this one as I get this mtr failure now in 10.3. It is a blocker to getting anything else fixed. |
| Comment by Andrew Hutchings [ 2022-11-07 ] |
|
Test case failure was due to ASAN using scrambled memory to find an off-by-one bug and also an off-by-one malloc bug. These are fixed in https://github.com/MariaDB/server/pull/2325 |
| Comment by Anel Husakovic [ 2022-11-08 ] |
|
PR 2325 is fixing ASAN bug caused by |