ClickHouse/tests/queries/0_stateless/02995_new_settings_history.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
2.0 KiB
Bash
Raw Normal View History

#!/usr/bin/env bash
2024-02-20 15:24:30 +00:00
# Tags: no-tsan, no-asan, no-ubsan, no-msan, no-cpu-aarch64, no-random-settings
# Some settings can be different for builds with sanitizers or aarch64
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CUR_DIR"/../shell_config.sh
# Note that this is a broad check. A per version check is done in the upgrade test
2024-08-01 09:37:42 +00:00
# Baseline generated with 24.7.2
# clickhouse local --query "select name, default from system.settings order by name format TSV" > 02995_baseline_24_7_2.tsv
$CLICKHOUSE_LOCAL --query "
WITH old_settings AS
(
2024-08-01 09:37:42 +00:00
SELECT * FROM file('${CUR_DIR}/02995_baseline_24_7_2.tsv', 'TSV', 'name String, default String')
),
new_settings AS
(
2024-02-20 17:24:35 +00:00
-- Ignore settings that depend on the machine config (max_threads and similar)
SELECT name, default FROM system.settings WHERE default NOT LIKE '%auto(%'
)
SELECT * FROM
(
2024-07-31 11:32:24 +00:00
SELECT 'PLEASE ADD THE NEW SETTING TO SettingsChangesHistory.cpp: ' || name || ' WAS ADDED',
FROM new_settings
WHERE (name NOT IN (
SELECT name
FROM old_settings
)) AND (name NOT IN (
SELECT arrayJoin(tupleElement(changes, 'name'))
FROM system.settings_changes
2024-07-31 11:32:24 +00:00
WHERE splitByChar('.', version)[1]::UInt64 >= 24 AND splitByChar('.', version)[2]::UInt64 > 7
))
UNION ALL
(
2024-07-31 11:32:24 +00:00
SELECT 'PLEASE ADD THE SETTING VALUE CHANGE TO SettingsChangesHistory.cpp: ' || name || ' WAS CHANGED FROM ' || old_settings.default || ' TO ' || new_settings.default,
FROM new_settings
LEFT JOIN old_settings ON new_settings.name = old_settings.name
WHERE (new_settings.default != old_settings.default) AND (name NOT IN (
SELECT arrayJoin(tupleElement(changes, 'name'))
FROM system.settings_changes
2024-07-31 11:32:24 +00:00
WHERE splitByChar('.', version)[1]::UInt64 >= 24 AND splitByChar('.', version)[2]::UInt64 > 7
))
)
)
"