From 3283af49e541d1894c34de4091d41f302c7f93a0 Mon Sep 17 00:00:00 2001 From: morningman Date: Thu, 19 Sep 2024 17:25:15 +0800 Subject: [PATCH 1/3] [fix](test-case) fix unstable test case about table_options sys table --- .../data/query_p0/system/test_table_properties.out | 6 ------ .../query_p0/system/test_table_properties.groovy | 10 +++++----- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/regression-test/data/query_p0/system/test_table_properties.out b/regression-test/data/query_p0/system/test_table_properties.out index f5ca9bb9220a0a..896df77f6f05db 100644 --- a/regression-test/data/query_p0/system/test_table_properties.out +++ b/regression-test/data/query_p0/system/test_table_properties.out @@ -12,7 +12,6 @@ internal test_table_properties_db duplicate_table compaction_policy size_based internal test_table_properties_db duplicate_table compression LZ4F internal test_table_properties_db duplicate_table data_sort.col_num 3 internal test_table_properties_db duplicate_table data_sort.sort_type LEXICAL -internal test_table_properties_db duplicate_table default.replication_allocation tag.location.default: 1 internal test_table_properties_db duplicate_table disable_auto_compaction false internal test_table_properties_db duplicate_table enable_mow_light_delete false internal test_table_properties_db duplicate_table enable_single_replica_compaction false @@ -45,7 +44,6 @@ internal test_table_properties_db listtable compaction_policy size_based internal test_table_properties_db listtable compression LZ4F internal test_table_properties_db listtable data_sort.col_num 6 internal test_table_properties_db listtable data_sort.sort_type LEXICAL -internal test_table_properties_db listtable default.replication_allocation tag.location.default: 1 internal test_table_properties_db listtable disable_auto_compaction false internal test_table_properties_db listtable enable_mow_light_delete false internal test_table_properties_db listtable enable_single_replica_compaction false @@ -78,7 +76,6 @@ internal test_table_properties_db unique_table compaction_policy size_based internal test_table_properties_db unique_table compression LZ4F internal test_table_properties_db unique_table data_sort.col_num 2 internal test_table_properties_db unique_table data_sort.sort_type LEXICAL -internal test_table_properties_db unique_table default.replication_allocation tag.location.default: 1 internal test_table_properties_db unique_table disable_auto_compaction false internal test_table_properties_db unique_table enable_mow_light_delete false internal test_table_properties_db unique_table enable_single_replica_compaction false @@ -113,7 +110,6 @@ internal test_table_properties_db duplicate_table compaction_policy size_based internal test_table_properties_db duplicate_table compression LZ4F internal test_table_properties_db duplicate_table data_sort.col_num 3 internal test_table_properties_db duplicate_table data_sort.sort_type LEXICAL -internal test_table_properties_db duplicate_table default.replication_allocation tag.location.default: 1 internal test_table_properties_db duplicate_table disable_auto_compaction false internal test_table_properties_db duplicate_table enable_mow_light_delete false internal test_table_properties_db duplicate_table enable_single_replica_compaction false @@ -146,7 +142,6 @@ internal test_table_properties_db unique_table compaction_policy size_based internal test_table_properties_db unique_table compression LZ4F internal test_table_properties_db unique_table data_sort.col_num 2 internal test_table_properties_db unique_table data_sort.sort_type LEXICAL -internal test_table_properties_db unique_table default.replication_allocation tag.location.default: 1 internal test_table_properties_db unique_table disable_auto_compaction false internal test_table_properties_db unique_table enable_mow_light_delete false internal test_table_properties_db unique_table enable_single_replica_compaction false @@ -183,7 +178,6 @@ internal test_table_properties_db duplicate_table compaction_policy size_based internal test_table_properties_db duplicate_table compression LZ4F internal test_table_properties_db duplicate_table data_sort.col_num 3 internal test_table_properties_db duplicate_table data_sort.sort_type LEXICAL -internal test_table_properties_db duplicate_table default.replication_allocation tag.location.default: 1 internal test_table_properties_db duplicate_table disable_auto_compaction false internal test_table_properties_db duplicate_table enable_mow_light_delete false internal test_table_properties_db duplicate_table enable_single_replica_compaction false diff --git a/regression-test/suites/query_p0/system/test_table_properties.groovy b/regression-test/suites/query_p0/system/test_table_properties.groovy index 7dd55d4fb78a7f..e6fb95a68093f2 100644 --- a/regression-test/suites/query_p0/system/test_table_properties.groovy +++ b/regression-test/suites/query_p0/system/test_table_properties.groovy @@ -84,11 +84,11 @@ suite("test_table_properties") { """ qt_select_check_1 """select count(*) from information_schema.table_properties where table_schema=\"${dbName}\"; """ - qt_select_check_2 """select * from information_schema.table_properties where table_schema=\"${dbName}\" ORDER BY TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,PROPERTY_NAME,PROPERTY_VALUE; """ + qt_select_check_2 """select * from information_schema.table_properties where table_schema=\"${dbName}\" ORDER BY TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,PROPERTY_NAME,PROPERTY_VALUE where PROPERTY_NAME != "default.replication_allocation" """ sql """ drop table listtable; """ - qt_select_check_3 """select * from information_schema.table_properties where table_schema=\"${dbName}\" ORDER BY TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,PROPERTY_NAME,PROPERTY_VALUE; """ + qt_select_check_3 """select * from information_schema.table_properties where table_schema=\"${dbName}\" ORDER BY TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,PROPERTY_NAME,PROPERTY_VALUE where PROPERTY_NAME != "default.replication_allocation" """ def user = "table_properties_user" sql "DROP USER IF EXISTS ${user}" @@ -106,17 +106,17 @@ suite("test_table_properties") { def url=tokens[0] + "//" + tokens[2] + "/" + "information_schema" + "?" connect(user=user, password='123abc!@#', url=url) { - qt_select_check_4 """select * from information_schema.table_properties ORDER BY TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,PROPERTY_NAME,PROPERTY_VALUE; """ + qt_select_check_4 """select * from information_schema.table_properties ORDER BY TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,PROPERTY_NAME,PROPERTY_VALUE where PROPERTY_NAME != "default.replication_allocation"; """ } sql "GRANT SELECT_PRIV ON ${dbName}.duplicate_table TO ${user}" connect(user=user, password='123abc!@#', url=url) { - qt_select_check_5 """select * from information_schema.table_properties ORDER BY TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,PROPERTY_NAME,PROPERTY_VALUE; """ + qt_select_check_5 """select * from information_schema.table_properties ORDER BY TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,PROPERTY_NAME,PROPERTY_VALUE where PROPERTY_NAME != "default.replication_allocation"; """ } sql "REVOKE SELECT_PRIV ON ${dbName}.duplicate_table FROM ${user}" connect(user=user, password='123abc!@#', url=url) { - qt_select_check_6 """select * from information_schema.table_properties ORDER BY TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,PROPERTY_NAME,PROPERTY_VALUE; """ + qt_select_check_6 """select * from information_schema.table_properties ORDER BY TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,PROPERTY_NAME,PROPERTY_VALUE where PROPERTY_NAME != "default.replication_allocation"; """ } From 76ef4eb61fc6d89499f5175a53b19d984e2223a3 Mon Sep 17 00:00:00 2001 From: morningman Date: Fri, 20 Sep 2024 17:17:06 +0800 Subject: [PATCH 2/3] 2 --- .../query_p0/system/test_table_properties.groovy | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/regression-test/suites/query_p0/system/test_table_properties.groovy b/regression-test/suites/query_p0/system/test_table_properties.groovy index e6fb95a68093f2..4d61d988cb86ec 100644 --- a/regression-test/suites/query_p0/system/test_table_properties.groovy +++ b/regression-test/suites/query_p0/system/test_table_properties.groovy @@ -84,11 +84,11 @@ suite("test_table_properties") { """ qt_select_check_1 """select count(*) from information_schema.table_properties where table_schema=\"${dbName}\"; """ - qt_select_check_2 """select * from information_schema.table_properties where table_schema=\"${dbName}\" ORDER BY TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,PROPERTY_NAME,PROPERTY_VALUE where PROPERTY_NAME != "default.replication_allocation" """ + qt_select_check_2 """select * from information_schema.table_properties where table_schema=\"${dbName}\" where PROPERTY_NAME != "default.replication_allocation" ORDER BY TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,PROPERTY_NAME,PROPERTY_VALUE""" sql """ drop table listtable; """ - qt_select_check_3 """select * from information_schema.table_properties where table_schema=\"${dbName}\" ORDER BY TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,PROPERTY_NAME,PROPERTY_VALUE where PROPERTY_NAME != "default.replication_allocation" """ + qt_select_check_3 """select * from information_schema.table_properties where table_schema=\"${dbName}\" where PROPERTY_NAME != "default.replication_allocation" ORDER BY TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,PROPERTY_NAME,PROPERTY_VALUE""" def user = "table_properties_user" sql "DROP USER IF EXISTS ${user}" @@ -106,17 +106,17 @@ suite("test_table_properties") { def url=tokens[0] + "//" + tokens[2] + "/" + "information_schema" + "?" connect(user=user, password='123abc!@#', url=url) { - qt_select_check_4 """select * from information_schema.table_properties ORDER BY TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,PROPERTY_NAME,PROPERTY_VALUE where PROPERTY_NAME != "default.replication_allocation"; """ + qt_select_check_4 """select * from information_schema.table_properties where PROPERTY_NAME != "default.replication_allocation" ORDER BY TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,PROPERTY_NAME,PROPERTY_VALUE""" } sql "GRANT SELECT_PRIV ON ${dbName}.duplicate_table TO ${user}" connect(user=user, password='123abc!@#', url=url) { - qt_select_check_5 """select * from information_schema.table_properties ORDER BY TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,PROPERTY_NAME,PROPERTY_VALUE where PROPERTY_NAME != "default.replication_allocation"; """ + qt_select_check_5 """select * from information_schema.table_properties where PROPERTY_NAME != "default.replication_allocation" ORDER BY TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,PROPERTY_NAME,PROPERTY_VALUE""" } sql "REVOKE SELECT_PRIV ON ${dbName}.duplicate_table FROM ${user}" connect(user=user, password='123abc!@#', url=url) { - qt_select_check_6 """select * from information_schema.table_properties ORDER BY TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,PROPERTY_NAME,PROPERTY_VALUE where PROPERTY_NAME != "default.replication_allocation"; """ + qt_select_check_6 """select * from information_schema.table_properties where PROPERTY_NAME != "default.replication_allocation" ORDER BY TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,PROPERTY_NAME,PROPERTY_VALUE""" } From 8649c5ca509d13e81f574d18e1f2c93d1d4c8cfd Mon Sep 17 00:00:00 2001 From: morningman Date: Fri, 20 Sep 2024 19:58:53 +0800 Subject: [PATCH 3/3] 3 --- .../suites/query_p0/system/test_table_properties.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/regression-test/suites/query_p0/system/test_table_properties.groovy b/regression-test/suites/query_p0/system/test_table_properties.groovy index 4d61d988cb86ec..3314975d689c0f 100644 --- a/regression-test/suites/query_p0/system/test_table_properties.groovy +++ b/regression-test/suites/query_p0/system/test_table_properties.groovy @@ -84,11 +84,11 @@ suite("test_table_properties") { """ qt_select_check_1 """select count(*) from information_schema.table_properties where table_schema=\"${dbName}\"; """ - qt_select_check_2 """select * from information_schema.table_properties where table_schema=\"${dbName}\" where PROPERTY_NAME != "default.replication_allocation" ORDER BY TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,PROPERTY_NAME,PROPERTY_VALUE""" + qt_select_check_2 """select * from information_schema.table_properties where table_schema=\"${dbName}\" and PROPERTY_NAME != "default.replication_allocation" ORDER BY TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,PROPERTY_NAME,PROPERTY_VALUE""" sql """ drop table listtable; """ - qt_select_check_3 """select * from information_schema.table_properties where table_schema=\"${dbName}\" where PROPERTY_NAME != "default.replication_allocation" ORDER BY TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,PROPERTY_NAME,PROPERTY_VALUE""" + qt_select_check_3 """select * from information_schema.table_properties where table_schema=\"${dbName}\" and PROPERTY_NAME != "default.replication_allocation" ORDER BY TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,PROPERTY_NAME,PROPERTY_VALUE""" def user = "table_properties_user" sql "DROP USER IF EXISTS ${user}"