mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Merge pull request #70021 from ClickHouse/backport/24.9/69895
Backport #69895 to 24.9: Fix analyzer default with old compatibility value
This commit is contained in:
commit
c9f438a336
@ -1247,12 +1247,15 @@ void SettingsImpl::applyCompatibilitySetting(const String & compatibility_value)
|
||||
/// Apply reversed changes from this version.
|
||||
for (const auto & change : it->second)
|
||||
{
|
||||
/// In case the alias is being used (e.g. use enable_analyzer) we must change the original setting
|
||||
auto final_name = SettingsTraits::resolveName(change.name);
|
||||
|
||||
/// If this setting was changed manually, we don't change it
|
||||
if (isChanged(change.name) && !settings_changed_by_compatibility_setting.contains(change.name))
|
||||
if (isChanged(final_name) && !settings_changed_by_compatibility_setting.contains(final_name))
|
||||
continue;
|
||||
|
||||
BaseSettings::set(change.name, change.previous_value);
|
||||
settings_changed_by_compatibility_setting.insert(change.name);
|
||||
BaseSettings::set(final_name, change.previous_value);
|
||||
settings_changed_by_compatibility_setting.insert(final_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,8 @@
|
||||
allow_experimental_analyzer 1 0
|
||||
enable_analyzer 1 0
|
||||
allow_experimental_analyzer 1 0
|
||||
enable_analyzer 1 0
|
||||
allow_experimental_analyzer 1 1
|
||||
enable_analyzer 1 1
|
||||
allow_experimental_analyzer 0 1
|
||||
enable_analyzer 0 1
|
@ -0,0 +1,8 @@
|
||||
SET enable_analyzer = DEFAULT;
|
||||
SELECT name, value, changed from system.settings where name IN ('allow_experimental_analyzer', 'enable_analyzer') ORDER BY name;
|
||||
SET compatibility = '24.8';
|
||||
SELECT name, value, changed from system.settings where name IN ('allow_experimental_analyzer', 'enable_analyzer') ORDER BY name;
|
||||
SET compatibility = '24.3';
|
||||
SELECT name, value, changed from system.settings where name IN ('allow_experimental_analyzer', 'enable_analyzer') ORDER BY name;
|
||||
SET compatibility = '24.1';
|
||||
SELECT name, value, changed from system.settings where name IN ('allow_experimental_analyzer', 'enable_analyzer') ORDER BY name;
|
Loading…
Reference in New Issue
Block a user