mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-17 05:03:20 +00:00
495c6e03aa
* Replace all Context references with std::weak_ptr * Fix shared context captured by value * Fix build * Fix Context with named sessions * Fix copy context * Fix gcc build * Merge with master and fix build * Fix gcc-9 build
24 lines
836 B
C++
24 lines
836 B
C++
#include <Interpreters/IInterpreter.h>
|
|
#include <Interpreters/QueryLog.h>
|
|
|
|
namespace DB
|
|
{
|
|
void IInterpreter::extendQueryLogElem(
|
|
QueryLogElement & elem, const ASTPtr & ast, ContextPtr context, const String & query_database, const String & query_table) const
|
|
{
|
|
if (!query_database.empty() && query_table.empty())
|
|
{
|
|
elem.query_databases.insert(backQuoteIfNeed(query_database));
|
|
}
|
|
else if (!query_table.empty())
|
|
{
|
|
auto quoted_database = query_database.empty() ? backQuoteIfNeed(context->getCurrentDatabase())
|
|
: backQuoteIfNeed(query_database);
|
|
elem.query_databases.insert(quoted_database);
|
|
elem.query_tables.insert(quoted_database + "." + backQuoteIfNeed(query_table));
|
|
}
|
|
|
|
extendQueryLogElemImpl(elem, ast, context);
|
|
}
|
|
}
|