Minor fixes: typo and missing forward declaration

This commit is contained in:
Vasily Nemkov 2022-10-25 13:42:54 +04:00
parent 659a097631
commit c569adfaf6
2 changed files with 3 additions and 2 deletions

View File

@ -10,6 +10,7 @@ namespace DB
namespace ErrorCodes namespace ErrorCodes
{ {
extern const int THERE_IS_NO_PROFILE; extern const int THERE_IS_NO_PROFILE;
extern const int LOGICAL_ERROR;
} }
SettingsProfilesCache::SettingsProfilesCache(const AccessControl & access_control_) SettingsProfilesCache::SettingsProfilesCache(const AccessControl & access_control_)
@ -151,7 +152,7 @@ void SettingsProfilesCache::mergeSettingsAndConstraintsFor(EnabledSettings & ena
if (!info->names_of_profiles.contains(profile_id)) if (!info->names_of_profiles.contains(profile_id))
{ {
const auto p = all_profiles.find(profile_id); const auto p = all_profiles.find(profile_id);
const auto profile_name = p != all_profiles.end() ? p->second->getName() : "<!!!Profile with no name!!!>"; const auto profile_name = p != all_profiles.end() ? p->second->getName() : "<! Profile with no name !>";
throw Exception( throw Exception(
ErrorCodes::LOGICAL_ERROR, ErrorCodes::LOGICAL_ERROR,

View File

@ -65,7 +65,7 @@ SettingsProfilesInfo::getConstraintsAndProfileIDs(const std::shared_ptr<const Se
Strings SettingsProfilesInfo::getProfileNames() const Strings SettingsProfilesInfo::getProfileNames() const
{ {
// Using profiles_with_implicit instead of profiles, // Using profiles_with_implicit instead of profiles,
// since former is syncronized with names_of_profiles // since former is synchronized with names_of_profiles
// see invocations of SettingsProfilesCache::substituteProfiles. // see invocations of SettingsProfilesCache::substituteProfiles.
Strings result; Strings result;
result.reserve(profiles_with_implicit.size()); result.reserve(profiles_with_implicit.size());