Skip to content

Commit

Permalink
Merge pull request #6837 from filimonov/fix_some_pvs_reported_issues
Browse files Browse the repository at this point in the history
Fix some pvs reported issues

(cherry picked from commit c90dfc1)
  • Loading branch information
alexey-milovidov authored and nikitamikhaylov committed Sep 12, 2019
1 parent 1602dab commit 242bded
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dbms/src/Interpreters/ClusterProxy/executeQuery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions dbms/src/Interpreters/Context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions dbms/src/Interpreters/InterpreterSelectQuery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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)
{
Expand Down

0 comments on commit 242bded

Please sign in to comment.