ClickHouse / clickhouse-odbc

ODBC driver for ClickHouse

Home Page:https://clickhouse.tech

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove ODBC {escape '/'} escape sequence

Segate-ekb opened this issue · comments

ODBC driver version Release 1.2.1.20220905
Context: queries are generated from 1C enterprise.

Some {escape '/'} ODBC secape sequences are let as it by ODBC driver, so ClickHouse server issues a SQL error.
Sample:

Error ODBC. SQLSTATE: HY000
Descripion: HTTP status code: 400
Received error:
Code: 62. DB::Exception: Syntax error: failed at position 429 ('{') (line 27, col 37): {escape '/'}) OR (T1.Comment LIKE '%test%' {escape '/'}) OR (T1.Computer LIKE '%test%' {escape '/'}) OR (T1.Data LIKE '%test%' {escape '/'}) OR (T1.DataPresenta. Expected one of: token, DoubleColon, MOD, DIV, NOT, BETWEEN, LIKE, ILIKE, NOT LIKE, NOT ILIKE, IN, NOT IN, GLOBAL IN, GLOBAL NOT IN, IS, AND, OR, QuestionMark, alias, AS, Comma. (SYNTAX_ERROR) (version 22.9.3.18 (official bui

The {escape '/'} should at least be removed by ODBC driver (the targetted function is well known and supported by ClickHouse server).