Merge pull request #6837 from filimonov/fix_some_pvs_reported_issues

Fix some pvs reported issues
This commit is contained in:
alexey-milovidov 2019-09-06 20:15:14 +03:00 committed by GitHub
commit c90dfc1e48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 7 deletions

View File

@ -30,7 +30,7 @@ Context removeUserRestrictionsFromSettings(const Context & context, const Settin
/// Set as unchanged to avoid sending to remote server.
new_settings.max_concurrent_queries_for_user.changed = false;
new_settings.max_memory_usage_for_user.changed = false;
new_settings.max_memory_usage_for_all_queries = false;
new_settings.max_memory_usage_for_all_queries.changed = false;
Context new_context(context);
new_context.setSettings(new_settings);

View File

@ -1222,8 +1222,8 @@ void Context::setCurrentQueryId(const String & query_id)
} words;
} random;
random.words.a = thread_local_rng();
random.words.b = thread_local_rng();
random.words.a = thread_local_rng(); //-V656
random.words.b = thread_local_rng(); //-V656
/// Use protected constructor.
struct qUUID : Poco::UUID

View File

@ -418,8 +418,6 @@ QueryPipeline InterpreterSelectQuery::executeWithProcessors()
Block InterpreterSelectQuery::getSampleBlockImpl()
{
FilterInfoPtr filter_info;
/// Need to create sets before analyzeExpressions(). Otherwise some sets for index won't be created.
query_analyzer->makeSetsForIndex(getSelectQuery().where());
query_analyzer->makeSetsForIndex(getSelectQuery().prewhere());
@ -431,8 +429,9 @@ Block InterpreterSelectQuery::getSampleBlockImpl()
options.to_stage,
context,
storage,
true,
filter_info);
true, // only_types
{} // filter_info
);
if (options.to_stage == QueryProcessingStage::Enum::FetchColumns)
{