mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Backport #69895 to 24.8: Fix analyzer default with old compatibility value
This commit is contained in:
parent
394506429a
commit
e21ed67c13
@ -153,12 +153,15 @@ void Settings::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