Fixed build

This commit is contained in:
Alexey Milovidov 2019-06-16 02:44:51 +03:00
parent 7514674447
commit 0dd88a1b03
2 changed files with 4 additions and 3 deletions

View File

@ -65,7 +65,7 @@ bool DatabaseMySQL::empty(const Context &) const
return local_tables_cache.empty(); return local_tables_cache.empty();
} }
DatabaseIteratorPtr DatabaseMySQL::getIterator(const Context &) DatabaseIteratorPtr DatabaseMySQL::getIterator(const Context &, const FilterByNameFunction & filter_by_table_name)
{ {
Tables tables; Tables tables;
std::lock_guard<std::mutex> lock(mutex); std::lock_guard<std::mutex> lock(mutex);
@ -73,6 +73,7 @@ DatabaseIteratorPtr DatabaseMySQL::getIterator(const Context &)
fetchTablesIntoLocalCache(); fetchTablesIntoLocalCache();
for (const auto & local_table : local_tables_cache) for (const auto & local_table : local_tables_cache)
if (!filter_by_table_name || filter_by_table_name(local_table.first))
tables[local_table.first] = local_table.second.storage; tables[local_table.first] = local_table.second.storage;
return std::make_unique<DatabaseSnapshotIterator>(tables); return std::make_unique<DatabaseSnapshotIterator>(tables);

View File

@ -28,7 +28,7 @@ public:
bool empty(const Context & context) const override; bool empty(const Context & context) const override;
DatabaseIteratorPtr getIterator(const Context & context) override; DatabaseIteratorPtr getIterator(const Context & context, const FilterByNameFunction & filter_by_table_name = {}) override;
ASTPtr getCreateDatabaseQuery(const Context & context) const override; ASTPtr getCreateDatabaseQuery(const Context & context) const override;