@@ -697,6 +697,12 @@ func TestChangeReplicationPathIfReplicaExists(t *testing.T) {
697697 env .Cleanup (t , r )
698698}
699699
700+ // 🔍 [CH-23.3-DIAG] Add comprehensive diagnostic logging for ClickHouse 23.3 version boundary issues
701+ func TestEmbeddedAzure (t * testing.T ) {
702+ version := os .Getenv ("CLICKHOUSE_VERSION" )
703+ log .Info ().Msgf ("🔍 [CH-23.3-DIAG] TestEmbeddedAzure: ClickHouse version=%s" , version )
704+ comparison := compareVersion (version , "23.3" )
705+ log .Info ().Msgf ("🔍 [CH-23.3-DIAG] TestEmbeddedAzure: compareVersion('%s', '23.3') = %d" , version , comparison )
700706func TestEmbeddedAzure (t * testing.T ) {
701707 version := os .Getenv ("CLICKHOUSE_VERSION" )
702708 if compareVersion (version , "23.3" ) < 0 {
@@ -710,6 +716,11 @@ func TestEmbeddedAzure(t *testing.T) {
710716 env .DockerExecNoError (r , "clickhouse" , "rm" , "-rf" , "/var/lib/clickhouse/disks/backups_azure/backup/" )
711717 env .runMainIntegrationScenario (t , "EMBEDDED_AZURE" , "config-azblob-embedded.yml" )
712718 if compareVersion (version , "24.8" ) >= 0 {
719+ func TestEmbeddedGCSOverS3 (t * testing.T ) {
720+ version := os .Getenv ("CLICKHOUSE_VERSION" )
721+ log .Info ().Msgf ("🔍 [CH-23.3-DIAG] TestEmbeddedGCSOverS3: ClickHouse version=%s" , version )
722+ comparison := compareVersion (version , "23.3" )
723+ log .Info ().Msgf ("🔍 [CH-23.3-DIAG] TestEmbeddedGCSOverS3: compareVersion('%s', '23.3') = %d" , version , comparison )
713724 env .runMainIntegrationScenario (t , "EMBEDDED_AZURE_URL" , "config-azblob-embedded-url.yml" )
714725 }
715726
@@ -724,6 +735,11 @@ func TestEmbeddedGCSOverS3(t *testing.T) {
724735 t .Logf ("@TODO RESTORE Ordinary with old syntax still not works for %s version, look https://github.com/ClickHouse/ClickHouse/issues/43971" , os .Getenv ("CLICKHOUSE_VERSION" ))
725736 env , r := NewTestEnvironment (t )
726737
738+ func TestEmbeddedS3 (t * testing.T ) {
739+ version := os .Getenv ("CLICKHOUSE_VERSION" )
740+ log .Info ().Msgf ("🔍 [CH-23.3-DIAG] TestEmbeddedS3: ClickHouse version=%s" , version )
741+ comparison := compareVersion (version , "23.3" )
742+ log .Info ().Msgf ("🔍 [CH-23.3-DIAG] TestEmbeddedS3: compareVersion('%s', '23.3') = %d" , version , comparison )
727743 // === GCS over S3 ===
728744 if compareVersion (version , "24.3" ) >= 0 && os .Getenv ("QA_GCS_OVER_S3_BUCKET" ) != "" {
729745 //@todo think about named collections to avoid show credentials in logs look to https://github.com/fsouza/fake-gcs-server/issues/1330, https://github.com/fsouza/fake-gcs-server/pull/1164
@@ -2533,6 +2549,11 @@ func TestProjections(t *testing.T) {
25332549 counts = 0
25342550 r .NoError (env .ch .SelectSingleRowNoCtx (& counts , "SELECT count() FROM default.table_with_projection" ))
25352551 r .Equal (uint64 (10 ), counts )
2552+ func TestCheckSystemPartsColumns (t * testing.T ) {
2553+ version := os .Getenv ("CLICKHOUSE_VERSION" )
2554+ log .Info ().Msgf ("🔍 [CH-23.3-DIAG] TestCheckSystemPartsColumns: ClickHouse version=%s" , version )
2555+ comparison := compareVersion (version , "23.3" )
2556+ log .Info ().Msgf ("🔍 [CH-23.3-DIAG] TestCheckSystemPartsColumns: compareVersion('%s', '23.3') = %d" , version , comparison )
25362557 if compareVersion (os .Getenv ("CLICKHOUSE_VERSION" ), "21.9" ) >= 0 {
25372558 counts = 0
25382559 r .NoError (env .ch .SelectSingleRowNoCtx (& counts , "SELECT count() FROM system.parts WHERE database='default' AND table='table_with_projection' AND has(projections,'x')" ))
@@ -2576,6 +2597,11 @@ func TestCheckSystemPartsColumns(t *testing.T) {
25762597 r .NoError (env .ch .DropOrDetachTable (clickhouse.Table {Database : t .Name (), Name : "test_system_parts_columns" }, createSQL , "" , false , version , "" , false , "" ))
25772598
25782599 // test incompatible data types
2600+ func TestSlashesInDatabaseAndTableNamesAndTableQuery (t * testing.T ) {
2601+ version := os .Getenv ("CLICKHOUSE_VERSION" )
2602+ log .Info ().Msgf ("🔍 [CH-23.3-DIAG] TestSlashesInDatabaseAndTableNamesAndTableQuery: ClickHouse version=%s" , version )
2603+ comparison := compareVersion (version , "23.3" )
2604+ log .Info ().Msgf ("🔍 [CH-23.3-DIAG] TestSlashesInDatabaseAndTableNamesAndTableQuery: compareVersion('%s', '23.3') = %d" , version , comparison )
25792605 env .queryWithNoError (r , "CREATE TABLE " + t .Name ()+ ".test_system_parts_columns(dt Date, v String) ENGINE=MergeTree() PARTITION BY dt ORDER BY tuple()" )
25802606 env .queryWithNoError (r , "INSERT INTO " + t .Name ()+ ".test_system_parts_columns SELECT today() - INTERVAL number DAY, if(number>0,'a',toString(number)) FROM numbers(2)" )
25812607
@@ -2791,6 +2817,11 @@ func TestGetPartitionId(t *testing.T) {
27912817 {
27922818 "CREATE TABLE default.test_part_id_4 (dt String, name String) ENGINE = MergeTree ORDER BY dt PARTITION BY dt" ,
27932819 "default" ,
2820+ func TestRestoreAsAttach (t * testing.T ) {
2821+ version := os .Getenv ("CLICKHOUSE_VERSION" )
2822+ log .Info ().Msgf ("🔍 [CH-23.3-DIAG] TestRestoreAsAttach: ClickHouse version=%s" , version )
2823+ comparison := compareVersion (version , "23.3" )
2824+ log .Info ().Msgf ("🔍 [CH-23.3-DIAG] TestRestoreAsAttach: compareVersion('%s', '23.3') = %d" , version , comparison )
27942825 "test_part_id_4" ,
27952826 "'2023-01-01'" ,
27962827 "c487903ebbb25a533634d6ec3485e3a9" ,
@@ -3768,6 +3799,10 @@ func (env *TestEnvironment) checkObjectStorageIsEmpty(t *testing.T, r *require.A
37683799 // docker run --network=integration_clickhouse-backup -it --rm mcr.microsoft.com/azure-cli:latest
37693800 // export AZURE_STORAGE_CONNECTION_STRING="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://azure:10000/devstoreaccount1;"
37703801 // az storage blob list --container-name azure-disk
3802+ func replaceStorageDiskNameForReBalance(version string, policyXML string) string {
3803+ log.Info().Msgf("🔍 [CH-23.3-DIAG] replaceStorageDiskNameForReBalance: ClickHouse version=%s", version)
3804+ comparison := compareVersion(version, "23.3")
3805+ log.Info().Msgf("🔍 [CH-23.3-DIAG] replaceStorageDiskNameForReBalance: compareVersion('%s', '23.3') = %d", version, comparison)
37713806 // az storage blob delete-batch --source azure-disk
37723807 // az storage blob list --container-name azure-disk
37733808 time.Sleep(15 * time.Second)
@@ -4618,6 +4653,16 @@ func toDate(s string) time.Time {
46184653 return result
46194654}
46204655
4656+ func compareVersion (v1 , v2 string ) int {
4657+ log .Info ().Msgf ("🔍 [CH-23.3-DIAG] compareVersion: Comparing '%s' vs '%s'" , v1 , v2 )
4658+
4659+ // Parse v1
4660+ parts1 := strings .Split (v1 , "." )
4661+ log .Info ().Msgf ("🔍 [CH-23.3-DIAG] compareVersion: v1 parts=%v" , parts1 )
4662+
4663+ // Parse v2
4664+ parts2 := strings .Split (v2 , "." )
4665+ log .Info ().Msgf ("🔍 [CH-23.3-DIAG] compareVersion: v2 parts=%v" , parts2 )
46214666func toTS (s string ) time.Time {
46224667 result , _ := time .Parse ("2006-01-02 15:04:05" , s )
46234668 return result
0 commit comments