Fix build.

This commit is contained in:
Vitaly Baranov 2022-06-20 01:54:56 +02:00
parent 2c8788266c
commit 638ea23399
3 changed files with 3 additions and 2 deletions

View File

@ -689,7 +689,7 @@ void RestorerFromBackup::createTables()
if (!restore_settings.allow_different_table_def) if (!restore_settings.allow_different_table_def)
{ {
ASTPtr create_table_query = storage->getCreateQueryForBackup(context); ASTPtr create_table_query = storage->getCreateQueryForBackup(context, nullptr);
ASTPtr expected_create_query = table_info.create_table_query; ASTPtr expected_create_query = table_info.create_table_query;
if (serializeAST(*create_table_query) != serializeAST(*expected_create_query)) if (serializeAST(*create_table_query) != serializeAST(*expected_create_query))
{ {

View File

@ -97,6 +97,7 @@ BlockIO executeDDLQueryOnCluster(const ASTPtr & query_ptr_, ContextPtr context,
throw Exception("No hosts defined to execute distributed DDL query", ErrorCodes::LOGICAL_ERROR); throw Exception("No hosts defined to execute distributed DDL query", ErrorCodes::LOGICAL_ERROR);
std::vector<HostID> hosts; std::vector<HostID> hosts;
hosts.reserve(addresses.size());
for (const auto * address : addresses) for (const auto * address : addresses)
hosts.emplace_back(*address); hosts.emplace_back(*address);

View File

@ -225,7 +225,7 @@ public:
/// Returns a slightly changed version of the CREATE TABLE query which must be written to a backup. /// Returns a slightly changed version of the CREATE TABLE query which must be written to a backup.
/// The function can throw `TABLE_IS_DROPPED` if this storage is not attached to a database. /// The function can throw `TABLE_IS_DROPPED` if this storage is not attached to a database.
virtual ASTPtr getCreateQueryForBackup(const ContextPtr & context, DatabasePtr * database = nullptr) const; virtual ASTPtr getCreateQueryForBackup(const ContextPtr & context, DatabasePtr * database) const;
virtual ASTPtr getCreateQueryForBackup(const BackupEntriesCollector & backup_entries_collector) const; virtual ASTPtr getCreateQueryForBackup(const BackupEntriesCollector & backup_entries_collector) const;
/// Makes backup entries to backup the data of this storage. /// Makes backup entries to backup the data of this storage.