ClickHouse/programs/odbc-bridge
Azat Khuzhin a72647690d Change error code in case of columns definitions was empty in ODBC
CI reports [1]:

    2023.03.14 00:29:07.031349 [ 166170 ] {110f8654-7d7d-4b47-b6b0-3ce83414a80f} <Error> ReadWriteBufferFromHTTP: HTTP request to `http://127.0.0.1:9018/columns_info?use_connection_pooling=1&version=1&connection_string=DSN%3D%7BClickHouse%20DSN%20%28ANSI%29%7D&schema=test_15&table=t&external_table_functions_use_nulls=1` failed at try 1/1 with bytes read: 0/unknown. Error: DB::HTTPException: Received error from remote server /columns_info?use_connection_pooling=1&version=1&connection_string=DSN%3D%7BClickHouse%20DSN%20%28ANSI%29%7D&schema=test_15&table=t&external_table_functions_use_nulls=1. HTTP status code: 500 Internal Server Error, body: Error getting columns from ODBC 'Code: 49. DB::Exception: Columns definition was not returned. (LOGICAL_ERROR) (version 23.2.4.12 (official build))'

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/47541/3d247b8635da44bccfdeb5fcd53be7130b8d0a32/upgrade_check__msan_.html

Here the problem is that system.columns has cached value for number of
total table to iterate, and so it can skip something.

But anyway, this should be LOGICAL_ERROR, since ODBC bridge does two
queries:
- to system.tables and
- to system.columns

And if between this two queries the table will be removed, them there
will be no columns

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-03-14 14:24:11 +01:00
..
tests Prefix overridden add_executable() command with "clickhouse_" 2022-07-11 19:36:18 +02:00
CMakeLists.txt Prepare library-bridge for catboost integration 2022-08-04 19:26:51 +00:00
ColumnInfoHandler.cpp Change error code in case of columns definitions was empty in ODBC 2023-03-14 14:24:11 +01:00
ColumnInfoHandler.h Generate config.h into ${CONFIG_INCLUDE_PATH} 2022-09-28 12:48:26 +00:00
getIdentifierQuote.cpp Better formatting for exception messages (#45449) 2023-01-24 00:13:58 +03:00
getIdentifierQuote.h Generate config.h into ${CONFIG_INCLUDE_PATH} 2022-09-28 12:48:26 +00:00
IdentifierQuoteHandler.cpp fixes to odbc connection pooling 2023-01-18 16:38:56 -08:00
IdentifierQuoteHandler.h Generate config.h into ${CONFIG_INCLUDE_PATH} 2022-09-28 12:48:26 +00:00
MainHandler.cpp fixes to odbc connection pooling 2023-01-18 16:38:56 -08:00
MainHandler.h
odbc-bridge.cpp
ODBCBlockInputStream.cpp Better formatting for exception messages (#45449) 2023-01-24 00:13:58 +03:00
ODBCBlockInputStream.h Renamed ODBCConnectionFactory to ODBCPooledConntionFactory 2022-06-01 09:00:39 +00:00
ODBCBlockOutputStream.cpp base should not depend on Common 2022-04-29 10:26:35 +08:00
ODBCBlockOutputStream.h Renamed ODBCConnectionFactory to ODBCPooledConntionFactory 2022-06-01 09:00:39 +00:00
ODBCBridge.cpp Prepare library-bridge for catboost integration 2022-08-04 19:26:51 +00:00
ODBCBridge.h Prepare library-bridge for catboost integration 2022-08-04 19:26:51 +00:00
ODBCHandlerFactory.cpp Generate config.h into ${CONFIG_INCLUDE_PATH} 2022-09-28 12:48:26 +00:00
ODBCHandlerFactory.h Prepare library-bridge for catboost integration 2022-08-04 19:26:51 +00:00
ODBCPooledConnectionFactory.h Better formatting for exception messages (#45449) 2023-01-24 00:13:58 +03:00
PingHandler.cpp
PingHandler.h
SchemaAllowedHandler.cpp fixes to odbc connection pooling 2023-01-18 16:38:56 -08:00
SchemaAllowedHandler.h Generate config.h into ${CONFIG_INCLUDE_PATH} 2022-09-28 12:48:26 +00:00
validateODBCConnectionString.cpp Better formatting for exception messages (#45449) 2023-01-24 00:13:58 +03:00
validateODBCConnectionString.h