clickhouse-odbc icon indicating copy to clipboard operation
clickhouse-odbc copied to clipboard

Remove ODBC {escape '/'} escape sequence

Open Segate-ekb opened this issue 2 years ago • 0 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).

Segate-ekb avatar Nov 09 '22 11:11 Segate-ekb