diff --git a/programs/client/Client.cpp b/programs/client/Client.cpp index df3db72c5e9..02c9f01d4c1 100644 --- a/programs/client/Client.cpp +++ b/programs/client/Client.cpp @@ -59,7 +59,7 @@ #include #include #include -#include +#include #include #include #include @@ -1962,9 +1962,14 @@ private: return; } - connection->sendData(block); - processed_rows += block.rows(); + if (block) + { + connection->sendData(block); + processed_rows += block.rows(); + } } + + connection->sendData({}); } diff --git a/programs/library-bridge/Handlers.cpp b/programs/library-bridge/Handlers.cpp index ec82d7d52f4..a605bbdbbf3 100644 --- a/programs/library-bridge/Handlers.cpp +++ b/programs/library-bridge/Handlers.cpp @@ -51,10 +51,14 @@ namespace void LibraryRequestHandler::handleRequest(HTTPServerRequest & request, HTTPServerResponse & response) { LOG_TRACE(log, "Request URI: {}", request.getURI()); + LOG_TRACE(log, "Ololo"); + try + { HTMLForm params(getContext()->getSettingsRef(), request); - + LOG_TRACE(log, "parsed params"); if (!params.has("method")) { + LOG_TRACE(log, "No 'method' in request URL"); processError(response, "No 'method' in request URL"); return; } @@ -256,6 +260,13 @@ void LibraryRequestHandler::handleRequest(HTTPServerRequest & request, HTTPServe { tryLogCurrentException(log); } + + } + catch (...) + { + tryLogCurrentException(log); + throw; + } } diff --git a/src/Access/ya.make b/src/Access/ya.make index e8584230538..59fb504c6ab 100644 --- a/src/Access/ya.make +++ b/src/Access/ya.make @@ -45,6 +45,7 @@ SRCS( SettingsProfilesCache.cpp User.cpp UsersConfigAccessStorage.cpp + tests/gtest_access_rights_ops.cpp ) diff --git a/src/DataStreams/ya.make b/src/DataStreams/ya.make index e6534ebc2f7..720503dceca 100644 --- a/src/DataStreams/ya.make +++ b/src/DataStreams/ya.make @@ -14,7 +14,6 @@ NO_COMPILER_WARNINGS() SRCS( AddingDefaultBlockOutputStream.cpp - AddingDefaultsBlockInputStream.cpp AsynchronousBlockInputStream.cpp BlockIO.cpp BlockStreamProfileInfo.cpp @@ -28,7 +27,6 @@ SRCS( ExpressionBlockInputStream.cpp IBlockInputStream.cpp ITTLAlgorithm.cpp - InputStreamFromASTInsertQuery.cpp InternalTextLogsRowOutputStream.cpp LimitBlockInputStream.cpp MaterializingBlockInputStream.cpp diff --git a/src/Interpreters/InterpreterInsertQuery.cpp b/src/Interpreters/InterpreterInsertQuery.cpp index 3a060e267e8..52334c192c8 100644 --- a/src/Interpreters/InterpreterInsertQuery.cpp +++ b/src/Interpreters/InterpreterInsertQuery.cpp @@ -4,8 +4,7 @@ #include #include #include -#include -#include +#include #include #include #include diff --git a/src/Interpreters/executeQuery.cpp b/src/Interpreters/executeQuery.cpp index 930680e9725..75b89554820 100644 --- a/src/Interpreters/executeQuery.cpp +++ b/src/Interpreters/executeQuery.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/DataStreams/AddingDefaultsBlockInputStream.cpp b/src/Processors/Transforms/AddingDefaultsTransform.cpp similarity index 99% rename from src/DataStreams/AddingDefaultsBlockInputStream.cpp rename to src/Processors/Transforms/AddingDefaultsTransform.cpp index 3f256594b61..c92d4d7a456 100644 --- a/src/DataStreams/AddingDefaultsBlockInputStream.cpp +++ b/src/Processors/Transforms/AddingDefaultsTransform.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/DataStreams/AddingDefaultsBlockInputStream.h b/src/Processors/Transforms/AddingDefaultsTransform.h similarity index 94% rename from src/DataStreams/AddingDefaultsBlockInputStream.h rename to src/Processors/Transforms/AddingDefaultsTransform.h index a285c4f6f6a..844f4fb96e6 100644 --- a/src/DataStreams/AddingDefaultsBlockInputStream.h +++ b/src/Processors/Transforms/AddingDefaultsTransform.h @@ -1,6 +1,5 @@ #pragma once -#include #include #include diff --git a/src/DataStreams/InputStreamFromASTInsertQuery.cpp b/src/Processors/Transforms/getSourceFromFromASTInsertQuery.cpp similarity index 95% rename from src/DataStreams/InputStreamFromASTInsertQuery.cpp rename to src/Processors/Transforms/getSourceFromFromASTInsertQuery.cpp index d34c70cfd19..8d8a4761657 100644 --- a/src/DataStreams/InputStreamFromASTInsertQuery.cpp +++ b/src/Processors/Transforms/getSourceFromFromASTInsertQuery.cpp @@ -5,8 +5,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/src/DataStreams/InputStreamFromASTInsertQuery.h b/src/Processors/Transforms/getSourceFromFromASTInsertQuery.h similarity index 72% rename from src/DataStreams/InputStreamFromASTInsertQuery.h rename to src/Processors/Transforms/getSourceFromFromASTInsertQuery.h index 318b6e47130..3c00bd47ea0 100644 --- a/src/DataStreams/InputStreamFromASTInsertQuery.h +++ b/src/Processors/Transforms/getSourceFromFromASTInsertQuery.h @@ -9,10 +9,7 @@ namespace DB { -// struct StorageInMemoryMetadata; -// using StorageMetadataPtr = std::shared_ptr; - -/** Prepares an input stream which produce data containing in INSERT query +/** Prepares a pipe which produce data containing in INSERT query * Head of inserting data could be stored in INSERT ast directly * Remaining (tail) data could be stored in input_buffer_tail_part */ diff --git a/src/Processors/ya.make b/src/Processors/ya.make index 3e51d9a77af..179335a9dbf 100644 --- a/src/Processors/ya.make +++ b/src/Processors/ya.make @@ -139,6 +139,7 @@ SRCS( Sources/SinkToOutputStream.cpp Sources/SourceFromInputStream.cpp Sources/SourceWithProgress.cpp + Transforms/AddingDefaultsTransform.cpp Transforms/AddingSelectorTransform.cpp Transforms/AggregatingInOrderTransform.cpp Transforms/AggregatingTransform.cpp @@ -165,6 +166,7 @@ SRCS( Transforms/SortingTransform.cpp Transforms/TotalsHavingTransform.cpp Transforms/WindowTransform.cpp + Transforms/getSourceFromFromASTInsertQuery.cpp printPipeline.cpp ) diff --git a/src/Server/GRPCServer.cpp b/src/Server/GRPCServer.cpp index 71f27748458..e60105279d5 100644 --- a/src/Server/GRPCServer.cpp +++ b/src/Server/GRPCServer.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/Storages/StorageFile.cpp b/src/Storages/StorageFile.cpp index 7429cf4ca7b..28a12f6aa2d 100644 --- a/src/Storages/StorageFile.cpp +++ b/src/Storages/StorageFile.cpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/Storages/StorageS3.cpp b/src/Storages/StorageS3.cpp index 1b0de5055ea..d9c7159ef93 100644 --- a/src/Storages/StorageS3.cpp +++ b/src/Storages/StorageS3.cpp @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include diff --git a/src/Storages/StorageS3Cluster.cpp b/src/Storages/StorageS3Cluster.cpp index 8a320190036..9884c2c7fe4 100644 --- a/src/Storages/StorageS3Cluster.cpp +++ b/src/Storages/StorageS3Cluster.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/Storages/StorageURL.cpp b/src/Storages/StorageURL.cpp index 50e30d3d787..ef837fef2e5 100644 --- a/src/Storages/StorageURL.cpp +++ b/src/Storages/StorageURL.cpp @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include