mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Add suggestion from @alesap
This commit is contained in:
parent
b7ec5f94f2
commit
6c93016c91
@ -110,7 +110,7 @@ public:
|
|||||||
uri.addQueryParameter("connection_string", getConnectionString());
|
uri.addQueryParameter("connection_string", getConnectionString());
|
||||||
|
|
||||||
ReadWriteBufferFromHTTP buf(
|
ReadWriteBufferFromHTTP buf(
|
||||||
uri, Poco::Net::HTTPRequest::HTTP_POST, {}, ConnectionTimeouts(http_timeout, http_timeout, http_timeout));
|
uri, Poco::Net::HTTPRequest::HTTP_POST, {}, ConnectionTimeouts::getHTTPTimeouts(context));
|
||||||
std::string character;
|
std::string character;
|
||||||
readStringBinary(character, buf);
|
readStringBinary(character, buf);
|
||||||
if (character.length() > 1)
|
if (character.length() > 1)
|
||||||
@ -210,7 +210,7 @@ private:
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
ReadWriteBufferFromHTTP buf(
|
ReadWriteBufferFromHTTP buf(
|
||||||
ping_url, Poco::Net::HTTPRequest::HTTP_GET, {}, ConnectionTimeouts(http_timeout, http_timeout, http_timeout));
|
ping_url, Poco::Net::HTTPRequest::HTTP_GET, {}, ConnectionTimeouts::getHTTPTimeouts(context));
|
||||||
return checkString(XDBCBridgeHelper::PING_OK_ANSWER, buf);
|
return checkString(XDBCBridgeHelper::PING_OK_ANSWER, buf);
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
|
@ -75,11 +75,7 @@ StoragePtr ITableFunctionXDBC::executeImpl(const ASTPtr & ast_function, const Co
|
|||||||
columns_info_uri.addQueryParameter("external_table_functions_use_nulls",
|
columns_info_uri.addQueryParameter("external_table_functions_use_nulls",
|
||||||
Poco::NumberFormatter::format(use_nulls));
|
Poco::NumberFormatter::format(use_nulls));
|
||||||
|
|
||||||
ReadWriteBufferFromHTTP buf(columns_info_uri, Poco::Net::HTTPRequest::HTTP_POST, {},
|
ReadWriteBufferFromHTTP buf(columns_info_uri, Poco::Net::HTTPRequest::HTTP_POST, {}, ConnectionTimeouts::getHTTPTimeouts(context));
|
||||||
ConnectionTimeouts(
|
|
||||||
context.getSettingsRef().http_connection_timeout,
|
|
||||||
context.getSettingsRef().http_send_timeout,
|
|
||||||
context.getSettingsRef().http_receive_timeout));
|
|
||||||
|
|
||||||
std::string columns_info;
|
std::string columns_info;
|
||||||
readStringBinary(columns_info, buf);
|
readStringBinary(columns_info, buf);
|
||||||
|
Loading…
Reference in New Issue
Block a user