Build fixes (#3466)

This commit is contained in:
proller 2018-10-25 18:23:41 +03:00 committed by GitHub
parent 19a69004f0
commit 713c44c3db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 13 additions and 6 deletions

View File

@ -86,4 +86,4 @@ if (ENABLE_ODBC)
endif () endif ()
endif () endif ()
message (STATUS "Using odbc: ${ODBC_INCLUDE_DIRECTORIES} : ${ODBC_LIBRARIES}") message (STATUS "Using odbc=${ODBC_FOUND}: ${ODBC_INCLUDE_DIRECTORIES} : ${ODBC_LIBRARIES}")

View File

@ -116,10 +116,10 @@ endif ()
if (Poco_MongoDB_LIBRARY) if (Poco_MongoDB_LIBRARY)
set (USE_POCO_MONGODB 1) set (USE_POCO_MONGODB 1)
endif () endif ()
if (Poco_DataODBC_LIBRARY) if (Poco_DataODBC_LIBRARY AND ODBC_FOUND)
set (USE_POCO_DATAODBC 1) set (USE_POCO_DATAODBC 1)
endif () endif ()
if (Poco_SQLODBC_LIBRARY) if (Poco_SQLODBC_LIBRARY AND ODBC_FOUND)
set (USE_POCO_SQLODBC 1) set (USE_POCO_SQLODBC 1)
endif () endif ()

View File

@ -80,7 +80,13 @@ void Connection::connect()
if (timeouts.tcp_keep_alive_timeout.totalSeconds()) if (timeouts.tcp_keep_alive_timeout.totalSeconds())
{ {
socket->setKeepAlive(true); socket->setKeepAlive(true);
socket->setOption(IPPROTO_TCP, TCP_KEEPIDLE, timeouts.tcp_keep_alive_timeout); socket->setOption(IPPROTO_TCP,
#if defined(TCP_KEEPALIVE)
TCP_KEEPALIVE
#else
TCP_KEEPIDLE // __APPLE__
#endif
, timeouts.tcp_keep_alive_timeout);
} }
in = std::make_shared<ReadBufferFromPocoSocket>(*socket); in = std::make_shared<ReadBufferFromPocoSocket>(*socket);

View File

@ -242,7 +242,7 @@ def main(args):
stderr_element = et.Element("system-err") stderr_element = et.Element("system-err")
stderr_element.text = et.CDATA(stderr) stderr_element.text = et.CDATA(stderr)
report_testcase.append(stderr_element) report_testcase.append(stderr_element)
print(stderr) print(stderr.encode('utf-8'))
if args.stop and ('Connection refused' in stderr or 'Attempt to read after eof' in stderr) and not 'Received exception from server' in stderr: if args.stop and ('Connection refused' in stderr or 'Attempt to read after eof' in stderr) and not 'Received exception from server' in stderr:
SERVER_DIED = True SERVER_DIED = True

View File

@ -12,7 +12,7 @@ $CLICKHOUSE_CLIENT -q "select name from system.table_functions format TSV;" > $S
# This is short run for ordinary tests. # This is short run for ordinary tests.
# if you want long run use: env SQL_FUZZY_RUNS=100000 clickhouse-test sql_fuzzy # if you want long run use: env SQL_FUZZY_RUNS=100000 clickhouse-test sql_fuzzy
for SQL_FUZZY_RUN in $(seq ${SQL_FUZZY_RUNS:=100}); do for SQL_FUZZY_RUN in $(seq ${SQL_FUZZY_RUNS:=10}); do
env SQL_FUZZY_RUN=$SQL_FUZZY_RUN $CURDIR/00746_sql_fuzzy.pl | $CLICKHOUSE_CLIENT -n --ignore-error >/dev/null 2>&1 env SQL_FUZZY_RUN=$SQL_FUZZY_RUN $CURDIR/00746_sql_fuzzy.pl | $CLICKHOUSE_CLIENT -n --ignore-error >/dev/null 2>&1
if [[ `$CLICKHOUSE_CLIENT -q "SELECT 'Still alive'"` != 'Still alive' ]]; then if [[ `$CLICKHOUSE_CLIENT -q "SELECT 'Still alive'"` != 'Still alive' ]]; then
break break

View File

@ -6,3 +6,4 @@ SELECT extractURLParameter('?_', '\0');
SELECT extractURLParameter('ZiqSZeh?', '\0') SELECT extractURLParameter('ZiqSZeh?', '\0')
SELECT globalNotIn(['"wh'], [NULL]); SELECT globalNotIn(['"wh'], [NULL]);
SELECT globalIn([''], [NULL]) SELECT globalIn([''], [NULL])
SELECT ( SELECT toDecimal128([], rowNumberInBlock()) ) , lcm('', [[(CAST(('>A') AS String))]]);