mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 09:02:00 +00:00
Fixed tests
This commit is contained in:
parent
fad6013270
commit
b079631f61
@ -807,13 +807,6 @@ private:
|
||||
if (!parsed_query)
|
||||
return true;
|
||||
|
||||
/// Replace ASTQueryParameter with ASTLiteral for prepared statements.
|
||||
ReplaceQueryParameterVisitor visitor(query_parameters);
|
||||
visitor.visit(parsed_query);
|
||||
|
||||
/// Get new query after substitutions.
|
||||
query = serializeAST(*parsed_query);
|
||||
|
||||
processed_rows = 0;
|
||||
progress.reset();
|
||||
show_progress_bar = false;
|
||||
@ -909,6 +902,13 @@ private:
|
||||
/// Process the query that doesn't require transferring data blocks to the server.
|
||||
void processOrdinaryQuery()
|
||||
{
|
||||
/// Replace ASTQueryParameter with ASTLiteral for prepared statements.
|
||||
ReplaceQueryParameterVisitor visitor(query_parameters);
|
||||
visitor.visit(parsed_query);
|
||||
|
||||
/// Get new query after substitutions. Note that it cannot be done for INSERT query with embedded data.
|
||||
query = serializeAST(*parsed_query);
|
||||
|
||||
connection->sendQuery(query, query_id, QueryProcessingStage::Complete, &context.getSettingsRef(), nullptr, true);
|
||||
sendExternalTables();
|
||||
receiveResult();
|
||||
|
@ -170,10 +170,6 @@ static std::tuple<ASTPtr, BlockIO> executeQueryImpl(
|
||||
/// TODO Parser should fail early when max_query_size limit is reached.
|
||||
ast = parseQuery(parser, begin, end, "", max_query_size);
|
||||
|
||||
/// Replace ASTQueryParameter with ASTLiteral for prepared statements.
|
||||
ReplaceQueryParameterVisitor visitor(context.getQueryParameters());
|
||||
visitor.visit(ast);
|
||||
|
||||
auto * insert_query = ast->as<ASTInsertQuery>();
|
||||
|
||||
if (insert_query && insert_query->settings_ast)
|
||||
@ -185,8 +181,10 @@ static std::tuple<ASTPtr, BlockIO> executeQueryImpl(
|
||||
insert_query->has_tail = has_query_tail;
|
||||
}
|
||||
else
|
||||
{
|
||||
query_end = end;
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
/// Anyway log the query.
|
||||
@ -205,6 +203,10 @@ static std::tuple<ASTPtr, BlockIO> executeQueryImpl(
|
||||
|
||||
try
|
||||
{
|
||||
/// Replace ASTQueryParameter with ASTLiteral for prepared statements.
|
||||
ReplaceQueryParameterVisitor visitor(context.getQueryParameters());
|
||||
visitor.visit(ast);
|
||||
|
||||
/// Get new query after substitutions.
|
||||
if (context.hasQueryParameters())
|
||||
query = serializeAST(*ast);
|
||||
|
@ -2,3 +2,4 @@
|
||||
1 Hello, world 2005-05-05 05:05:05
|
||||
2 test 2005-05-25 15:00:00
|
||||
2 test 2005-05-25 15:00:00
|
||||
Code: 36. DB::Exception: Substitution `s` is not set
|
||||
|
@ -3,7 +3,7 @@
|
||||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
. $CURDIR/../shell_config.sh
|
||||
|
||||
EXCEPTION_TEXT="Code: 36. DB::Exception: Expected correct value in parameter with name 'injection'"
|
||||
EXCEPTION_TEXT="Code: 36."
|
||||
EXCEPTION_SUCCESS_TEXT="OK"
|
||||
EXCEPTION_FAIL_TEXT="FAIL"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user