From 1c47f5cf57674961c73ced611aa7889ef0456b33 Mon Sep 17 00:00:00 2001 From: shuke Date: Tue, 24 Dec 2024 11:10:28 +0800 Subject: [PATCH] [regression-test](fix) fix case with invalid grammer (#45211) (#45791) Problem Summary: Defining global variables in a test suite can easily introduce errors, such as variable conflicts in concurrent scenarios. In #44576 , a method for detecting global variables was introduced. That approach conflicts with the function calling like connect(user=user, password="pwd"). Furthermore, the connect(user=user, password="pwd") method cannot specify assignments to parameters with default values; values still need to be assigned according to the order of parameters. Therefore, modifying these calling method. --- .../suites/account_p0/test_alter_user.groovy | 46 ++++++------- .../suites/account_p0/test_auth_show.groovy | 4 +- .../suites/account_p0/test_grant_priv.groovy | 4 +- .../test_grant_priv_resource.groovy | 4 +- .../test_grant_priv_workload.groovy | 4 +- .../test_nereids_authentication.groovy | 14 ++-- .../account_p0/test_nereids_row_policy.groovy | 6 +- .../suites/account_p0/test_role.groovy | 4 +- .../test_admin_copy_tablet_auth.groovy | 2 +- .../auth_p0/test_alter_policy_auth.groovy | 2 +- .../auth_p0/test_alter_view_auth.groovy | 4 +- .../test_cancel_alter_system_auth.groovy | 2 +- .../auth_p0/test_create_policy_auth.groovy | 2 +- .../auth_p0/test_create_view_auth.groovy | 4 +- .../test_drop_materialized_view_auth.groovy | 2 +- .../auth_p0/test_drop_policy_auth.groovy | 2 +- .../test_master_slave_consistency_auth.groovy | 64 +++++++++---------- .../auth_p0/test_select_column_auth.groovy | 16 ++--- .../auth_p0/test_select_view_auth.groovy | 4 +- .../test_set_ldap_admin_password_auth.groovy | 2 +- .../test_show_catalog_recycle_bin_auth.groovy | 2 +- .../test_show_create_database_auth.groovy | 2 +- .../test_show_create_repository_auth.groovy | 2 +- .../suites/auth_p0/test_show_data_auth.groovy | 2 +- .../auth_p0/test_show_encryptkeys_auth.groovy | 2 +- .../auth_p0/test_show_plugins_auth.groovy | 2 +- .../test_show_repositories_auth.groovy | 2 +- .../auth_p0/test_show_snapshot_auth.groovy | 2 +- .../auth_p0/test_show_stream_load_auth.groovy | 4 +- .../test_show_tablets_belong_auth.groovy | 2 +- .../auth_p0/test_show_transaction_auth.groovy | 2 +- .../auth_p0/test_use_encryptkey_auth.groovy | 4 +- .../suites/auth_up_down_p0/load.groovy | 22 +++---- .../test_grant_revoke_auth.groovy | 12 ++-- .../test_disable_revoke_admin_auth.groovy | 2 +- ...test_compaction_uniq_keys_row_store.groovy | 2 +- .../delete_p0/test_delete_on_mor.groovy | 2 +- .../suites/demo_p0/connect_action.groovy | 2 +- .../hive/test_external_catalog_hive.groovy | 2 +- .../hive/test_external_sql_block_rule.groovy | 6 +- .../hive/test_hive_other.groovy | 2 +- .../iceberg/iceberg_drop_rest_table.groovy | 2 +- .../jdbc/test_jdbc_call.groovy | 4 +- .../jdbc/test_mysql_jdbc_catalog.groovy | 4 +- .../tvf/test_catalogs_tvf.groovy | 6 +- ...st_insert_from_tvf_with_common_user.groovy | 2 +- .../tvf/test_s3_tvf_with_resource.groovy | 4 +- .../insert_p0/insert_group_commit_into.groovy | 10 +-- ..._group_commit_into_max_filter_ratio.groovy | 2 +- .../insert_group_commit_into_unique.groovy | 6 +- ..._group_commit_into_unique_sync_mode.groovy | 6 +- ...insert_group_commit_with_large_data.groovy | 2 +- .../suites/insert_p0/prepare_insert.groovy | 10 +-- ...st_group_commit_data_bytes_property.groovy | 2 +- ...t_group_commit_interval_ms_property.groovy | 2 +- .../suites/insert_p0/test_jdbc.groovy | 4 +- .../operate_internal_schema.groovy | 2 +- .../javaudf_p0/test_javaudf_auth.groovy | 4 +- .../manager/test_manager_interface_3.groovy | 28 ++++---- .../authorization/column_authorization.groovy | 2 +- .../authorization/view_authorization.groovy | 2 +- .../cache/parse_sql_from_sql_cache.groovy | 18 +++--- .../nereids_p0/delete/delete_cte.groovy | 2 +- .../delete/delete_mow_partial_update.groovy | 2 +- .../nereids_p0/delete/delete_using.groovy | 2 +- .../insert_into_table/insert_auth.groovy | 6 +- .../insert_into_table/partial_update.groovy | 2 +- .../partial_update_complex.groovy | 2 +- .../partial_update_seq_col.groovy | 2 +- .../with_auth/with_select_table_auth.groovy | 4 +- .../point_query_p0/test_point_query.groovy | 6 +- .../test_point_query_partition.groovy | 6 +- .../prepared_stmt_p0/prepared_stmt.groovy | 2 +- .../system/test_partitions_schema.groovy | 6 +- .../query_p0/system/test_table_options.groovy | 6 +- .../system/test_table_properties.groovy | 6 +- .../suites/query_p0/test_row_policy.groovy | 4 +- .../test_alter_table_column_rename.groovy | 2 +- .../suites/show_p0/test_show_backends.groovy | 4 +- .../show_p0/test_show_statistic_proc.groovy | 4 +- .../statistics/test_analyze_mtmv.groovy | 2 +- .../suites/statistics/test_analyze_mv.groovy | 2 +- .../test_mix_partial_update.groovy | 2 +- .../test_new_partial_update_delete.groovy | 4 +- .../partial_update/test_partial_update.groovy | 2 +- ...st_partial_update_2pc_schema_change.groovy | 2 +- .../test_partial_update_after_delete.groovy | 2 +- .../test_partial_update_auto_inc.groovy | 2 +- ...t_partial_update_case_insensitivity.groovy | 2 +- .../test_partial_update_complex_type.groovy | 2 +- ...l_update_complex_type_schema_change.groovy | 2 +- .../test_partial_update_default_value.groovy | 2 +- .../test_partial_update_delete.groovy | 2 +- .../test_partial_update_delete_sign.groovy | 2 +- ...l_update_insert_light_schema_change.groovy | 2 +- .../test_partial_update_insert_seq_col.groovy | 2 +- .../test_partial_update_merge_type.groovy | 2 +- ...t_partial_update_native_insert_stmt.groovy | 2 +- ...l_update_native_insert_stmt_complex.groovy | 2 +- .../test_partial_update_only_keys.groovy | 2 +- .../test_partial_update_seq_col.groovy | 2 +- .../test_partial_update_seq_col_delete.groovy | 2 +- .../test_partial_update_seq_type.groovy | 2 +- ...test_partial_update_seq_type_delete.groovy | 2 +- .../test_partial_update_strict_mode.groovy | 2 +- .../test_partial_update_upsert.groovy | 2 +- ...est_partial_update_with_delete_stmt.groovy | 2 +- ...est_partial_update_with_update_stmt.groovy | 2 +- .../test_delete_sign.groovy | 2 +- .../variant_p0/variant_with_rowstore.groovy | 2 +- .../workload_manager_p0/test_curd_wlg.groovy | 8 +-- .../test_resource_tag.groovy | 4 +- .../test_workload_sched_policy.groovy | 12 ++-- 113 files changed, 274 insertions(+), 274 deletions(-) diff --git a/regression-test/suites/account_p0/test_alter_user.groovy b/regression-test/suites/account_p0/test_alter_user.groovy index 2cfa5b082b3994..7a2c4649a0667e 100644 --- a/regression-test/suites/account_p0/test_alter_user.groovy +++ b/regression-test/suites/account_p0/test_alter_user.groovy @@ -37,7 +37,7 @@ suite("test_alter_user", "account,nonConcurrent") { sql """alter user test_auth_user2 password_history 0""" sql """set password for 'test_auth_user2' = password('12345')""" - def result1 = connect(user = 'test_auth_user2', password = '12345', url = context.config.jdbcUrl) { + def result1 = connect('test_auth_user2', '12345', context.config.jdbcUrl) { sql 'select 1' } @@ -48,7 +48,7 @@ suite("test_alter_user", "account,nonConcurrent") { sql """alter user test_auth_user2 identified by 'abc12345'""" exception "Cannot use these credentials for 'test_auth_user2'@'%' because they contradict the password history policy" } - result1 = connect(user = 'test_auth_user2', password = 'abc123456', url = context.config.jdbcUrl) { + result1 = connect('test_auth_user2', 'abc123456', context.config.jdbcUrl) { sql 'select 1' } sql """set global password_history=0""" // set to disabled @@ -58,31 +58,31 @@ suite("test_alter_user", "account,nonConcurrent") { sql """grant all on *.* to test_auth_user3""" // login success in multi times - result1 = connect(user = 'test_auth_user3', password = '12345', url = context.config.jdbcUrl) { + result1 = connect('test_auth_user3', '12345', context.config.jdbcUrl) { sql 'select 1' } - result1 = connect(user = 'test_auth_user3', password = '12345', url = context.config.jdbcUrl) { + result1 = connect('test_auth_user3', '12345', context.config.jdbcUrl) { sql 'select 1' } - result1 = connect(user = 'test_auth_user3', password = '12345', url = context.config.jdbcUrl) { + result1 = connect('test_auth_user3', '12345', context.config.jdbcUrl) { sql 'select 1' } // login failed in 2 times try { - connect(user = 'test_auth_user3', password = 'wrong', url = context.config.jdbcUrl) {} + connect('test_auth_user3', 'wrong',context.config.jdbcUrl) {} assertTrue(false. "should not be able to login") } catch (Exception e) { assertTrue(e.getMessage().contains("Access denied for user 'test_auth_user3"), e.getMessage()) } try { - connect(user = 'test_auth_user3', password = 'wrong', url = context.config.jdbcUrl) {} + connect('test_auth_user3', 'wrong', context.config.jdbcUrl) {} assertTrue(false. "should not be able to login") } catch (Exception e) { assertTrue(e.getMessage().contains("Access denied for user 'test_auth_user3"), e.getMessage()) } // login with correct password but also failed try { - connect(user = 'test_auth_user3', password = '12345', url = context.config.jdbcUrl) {} + connect('test_auth_user3', '12345', context.config.jdbcUrl) {} assertTrue(false. "should not be able to login") } catch (Exception e) { assertTrue(e.getMessage().contains("Access denied for user 'test_auth_user3'@'%'. Account is blocked for 86400 second(s) (86400 second(s) remaining) due to 2 consecutive failed logins."), e.getMessage()) @@ -90,7 +90,7 @@ suite("test_alter_user", "account,nonConcurrent") { // unlock user and login again sql """alter user test_auth_user3 account_unlock""" - result1 = connect(user = 'test_auth_user3', password = '12345', url = context.config.jdbcUrl) { + result1 = connect('test_auth_user3', '12345', context.config.jdbcUrl) { sql 'select 1' } @@ -98,27 +98,27 @@ suite("test_alter_user", "account,nonConcurrent") { sql """alter user test_auth_user3 PASSWORD_LOCK_TIME 5 SECOND""" // login failed in 2 times to lock the accout again try { - connect(user = 'test_auth_user3', password = 'wrong', url = context.config.jdbcUrl) {} + connect('test_auth_user3', 'wrong', context.config.jdbcUrl) {} assertTrue(false. "should not be able to login") } catch (Exception e) { assertTrue(e.getMessage().contains("Access denied for user 'test_auth_user3"), e.getMessage()) } try { - connect(user = 'test_auth_user3', password = 'wrong', url = context.config.jdbcUrl) {} + connect('test_auth_user3', 'wrong', context.config.jdbcUrl) {} assertTrue(false. "should not be able to login") } catch (Exception e) { assertTrue(e.getMessage().contains("Access denied for user 'test_auth_user3"), e.getMessage()) } // login with correct password but also failed try { - connect(user = 'test_auth_user3', password = '12345', url = context.config.jdbcUrl) {} + connect('test_auth_user3', '12345', context.config.jdbcUrl) {} assertTrue(false. "should not be able to login") } catch (Exception e) { assertTrue(e.getMessage().contains("Access denied for user 'test_auth_user3'@'%'. Account is blocked for 5 second(s) (5 second(s) remaining) due to 2 consecutive failed logins."), e.getMessage()) } // sleep 5 second to unlock account sleep(5000) - result1 = connect(user = 'test_auth_user3', password = '12345', url = context.config.jdbcUrl) { + result1 = connect('test_auth_user3', '12345', context.config.jdbcUrl) { sql 'select 1' } @@ -134,7 +134,7 @@ suite("test_alter_user", "account,nonConcurrent") { } sql """set password for 'test_auth_user3' = password('Ab1234567^')""" - result1 = connect(user = 'test_auth_user3', password = 'Ab1234567^', url = context.config.jdbcUrl) { + result1 = connect('test_auth_user3', 'Ab1234567^', context.config.jdbcUrl) { sql 'select 1' } sql """set global validate_password_policy=NONE""" @@ -142,12 +142,12 @@ suite("test_alter_user", "account,nonConcurrent") { // 5. test expire sql """create user test_auth_user4 identified by '12345' PASSWORD_EXPIRE INTERVAL 5 SECOND""" sql """grant all on *.* to test_auth_user4""" - result1 = connect(user = 'test_auth_user4', password = '12345', url = context.config.jdbcUrl) { + result1 = connect('test_auth_user4', '12345', context.config.jdbcUrl) { sql 'select 1' } sleep(6000) try { - connect(user = 'test_auth_user4', password = '12345', url = context.config.jdbcUrl) {} + connect('test_auth_user4', '12345', context.config.jdbcUrl) {} assertTrue(false. "should not be able to login") } catch (Exception e) { assertTrue(e.getMessage().contains("Your password has expired. To log in you must change it using a client that supports expired passwords."), e.getMessage()) @@ -157,7 +157,7 @@ suite("test_alter_user", "account,nonConcurrent") { sql """drop user test_auth_user4""" sql """create user test_auth_user4 identified by '12345'""" sql """grant all on *.* to test_auth_user4""" - result1 = connect(user = 'test_auth_user4', password = '12345', url = context.config.jdbcUrl) { + result1 = connect('test_auth_user4', '12345', context.config.jdbcUrl) { sql 'select 1' } @@ -165,17 +165,17 @@ suite("test_alter_user", "account,nonConcurrent") { sql """drop user test_auth_user4""" sql """create user test_auth_user4 identified by '12345' PASSWORD_EXPIRE INTERVAL 5 SECOND""" sql """grant all on *.* to test_auth_user4""" - result1 = connect(user = 'test_auth_user4', password = '12345', url = context.config.jdbcUrl) { + result1 = connect('test_auth_user4', '12345', context.config.jdbcUrl) { sql 'select 1' } sleep(6000) sql """set password for 'test_auth_user4' = password('123')""" - result2 = connect(user = 'test_auth_user4', password = '123', url = context.config.jdbcUrl) { + result2 = connect('test_auth_user4', '123', context.config.jdbcUrl) { sql 'select 1' } sleep(6000) try { - connect(user = 'test_auth_user4', password = '123', url = context.config.jdbcUrl) {} + connect('test_auth_user4', '123', context.config.jdbcUrl) {} assertTrue(false. "should not be able to login") } catch (Exception e) { assertTrue(e.getMessage().contains("Your password has expired. To log in you must change it using a client that supports expired passwords."), e.getMessage()) @@ -185,11 +185,11 @@ suite("test_alter_user", "account,nonConcurrent") { sql """drop user test_auth_user4""" sql """create user test_auth_user4 identified by '12345'""" sql """grant all on *.* to test_auth_user4""" - result1 = connect(user = 'test_auth_user4', password = '12345', url = context.config.jdbcUrl) { + result1 = connect('test_auth_user4', '12345', context.config.jdbcUrl) { sql 'select 1' } sleep(1000) - result2 = connect(user = 'test_auth_user4', password = '12345', url = context.config.jdbcUrl) { + result2 = connect('test_auth_user4', '12345', context.config.jdbcUrl) { sql 'select 1' } @@ -197,7 +197,7 @@ suite("test_alter_user", "account,nonConcurrent") { sql """drop user if exists test_auth_user4""" sql """create user test_auth_user4 identified by '12345'""" sql """grant SELECT_PRIV on regression_test.* to test_auth_user4""" - result1 = connect(user = 'test_auth_user4', password = '12345', url = context.config.jdbcUrl) { + result1 = connect('test_auth_user4', '12345', context.config.jdbcUrl) { sql 'select 1' sql 'use information_schema' sql 'use mysql' diff --git a/regression-test/suites/account_p0/test_auth_show.groovy b/regression-test/suites/account_p0/test_auth_show.groovy index c847fd1715aaeb..d9d4f3fa7f16ec 100644 --- a/regression-test/suites/account_p0/test_auth_show.groovy +++ b/regression-test/suites/account_p0/test_auth_show.groovy @@ -45,7 +45,7 @@ suite("test_auth_show", "account") { // With select priv for table, should be able to see db sql """GRANT SELECT_PRIV ON ${dbName}.${tableName} TO ${user}""" - def result1 = connect(user=user, password="${pwd}", url=url) { + def result1 = connect(user, "${pwd}", url) { sql """show databases like '${dbName}'""" } assertEquals(result1.size(), 1) @@ -53,7 +53,7 @@ suite("test_auth_show", "account") { // With show_view priv for table, should be able to see db sql """GRANT SHOW_VIEW_PRIV ON ${dbName}.${tableName} TO ${user}""" - def result2 = connect(user=user, password="${pwd}", url=url) { + def result2 = connect(user, "${pwd}", url) { sql """show databases like '${dbName}'""" } assertEquals(result2.size(), 1) diff --git a/regression-test/suites/account_p0/test_grant_priv.groovy b/regression-test/suites/account_p0/test_grant_priv.groovy index abb95e9d1228aa..d2e04945905bee 100644 --- a/regression-test/suites/account_p0/test_grant_priv.groovy +++ b/regression-test/suites/account_p0/test_grant_priv.groovy @@ -38,7 +38,7 @@ suite("test_grant_priv") { // test only have select_priv, can not grant to other user sql """grant select_priv on ${dbName}.* to ${user1}""" - connect(user=user1, password="${pwd}", url=url) { + connect(user1, "${pwd}", url) { try { sql """grant select_priv on ${dbName}.* to ${user2}""" Assert.fail("can not grant to other user"); @@ -49,7 +49,7 @@ suite("test_grant_priv") { // test both have select_priv and grant_priv , can grant to other user sql """grant grant_priv on ${dbName}.* to ${user1}""" - connect(user=user1, password="${pwd}", url=url) { + connect(user1, "${pwd}", url) { try { sql """grant select_priv on ${dbName}.* to ${user2}""" } catch (Exception e) { diff --git a/regression-test/suites/account_p0/test_grant_priv_resource.groovy b/regression-test/suites/account_p0/test_grant_priv_resource.groovy index f679835e1ca96e..c8eea500a07dc5 100644 --- a/regression-test/suites/account_p0/test_grant_priv_resource.groovy +++ b/regression-test/suites/account_p0/test_grant_priv_resource.groovy @@ -33,7 +33,7 @@ suite("test_grant_priv_resource") { // test only have USAGE_PRIV, can not grant to other user sql """grant USAGE_PRIV on RESOURCE ${resource1} to ${user1}""" - connect(user=user1, password="${pwd}", url=url) { + connect(user1, "${pwd}", url) { try { sql """grant USAGE_PRIV on RESOURCE ${resource1} to ${user2}""" Assert.fail("can not grant to other user"); @@ -44,7 +44,7 @@ suite("test_grant_priv_resource") { // test both have USAGE_PRIV and grant_priv , can grant to other user sql """grant grant_priv on RESOURCE * to ${user1}""" - connect(user=user1, password="${pwd}", url=url) { + connect(user1, "${pwd}", url) { try { sql """grant USAGE_PRIV on RESOURCE ${resource1} to ${user2}""" } catch (Exception e) { diff --git a/regression-test/suites/account_p0/test_grant_priv_workload.groovy b/regression-test/suites/account_p0/test_grant_priv_workload.groovy index 291cfe1fa4cd02..12149f0fa7a8b7 100644 --- a/regression-test/suites/account_p0/test_grant_priv_workload.groovy +++ b/regression-test/suites/account_p0/test_grant_priv_workload.groovy @@ -33,7 +33,7 @@ suite("test_grant_priv_workload") { // test only have USAGE_PRIV, can not grant to other user sql """grant USAGE_PRIV on WORKLOAD GROUP ${workload1} to ${user1}""" - connect(user=user1, password="${pwd}", url=url) { + connect(user1, "${pwd}", url) { try { sql """grant USAGE_PRIV on WORKLOAD GROUP ${workload1} to ${user2}""" Assert.fail("can not grant to other user"); @@ -44,7 +44,7 @@ suite("test_grant_priv_workload") { // test both have USAGE_PRIV and grant_priv , can grant to other user sql """grant grant_priv on WORKLOAD GROUP ${workload1} to ${user1}""" - connect(user=user1, password="${pwd}", url=url) { + connect(user1, "${pwd}", url) { try { sql """grant USAGE_PRIV on WORKLOAD GROUP ${workload1} to ${user2}""" } catch (Exception e) { diff --git a/regression-test/suites/account_p0/test_nereids_authentication.groovy b/regression-test/suites/account_p0/test_nereids_authentication.groovy index d26c36c648bee0..383aff72c4c6b8 100644 --- a/regression-test/suites/account_p0/test_nereids_authentication.groovy +++ b/regression-test/suites/account_p0/test_nereids_authentication.groovy @@ -47,26 +47,26 @@ suite("test_nereids_authentication", "query") { def tokens = context.config.jdbcUrl.split('/') def url=tokens[0] + "//" + tokens[2] + "/" + dbName + "?" - def result = connect(user=user, password='Doris_123456', url=url) { + def result = connect(user, 'Doris_123456', url) { sql "SELECT * FROM ${tableName1}" } assertEquals(result.size(), 0) - connect(user=user, password='Doris_123456', url=url) { + connect(user, 'Doris_123456', url) { test { sql "SELECT * FROM ${tableName2}" exception "denied" } } - connect(user=user, password='Doris_123456', url=url) { + connect(user, 'Doris_123456', url) { test { sql "SELECT count(*) FROM ${tableName2}" exception "denied" } } - connect(user=user, password='Doris_123456', url=url) { + connect(user, 'Doris_123456', url) { test { sql "SELECT * FROM ${tableName1}, ${tableName2} WHERE ${tableName1}.`key` = ${tableName2}.`key`" exception "denied" @@ -74,14 +74,14 @@ suite("test_nereids_authentication", "query") { } sql "GRANT SELECT_PRIV ON internal.${dbName}.${tableName2} TO ${user}" - connect(user=user, password='Doris_123456', url=url) { + connect(user, 'Doris_123456', url) { sql "SELECT * FROM ${tableName2}" } assertEquals(result.size(), 0) - connect(user=user, password='Doris_123456', url=url) { + connect(user, 'Doris_123456', url) { sql "SELECT count(*) FROM ${tableName2}" } - connect(user=user, password='Doris_123456', url=url) { + connect(user, 'Doris_123456', url) { sql "SELECT * FROM ${tableName1}, ${tableName2} WHERE ${tableName1}.`key` = ${tableName2}.`key`" } assertEquals(result.size(), 0) diff --git a/regression-test/suites/account_p0/test_nereids_row_policy.groovy b/regression-test/suites/account_p0/test_nereids_row_policy.groovy index 59edd884d5e990..df78be5cd4c1aa 100644 --- a/regression-test/suites/account_p0/test_nereids_row_policy.groovy +++ b/regression-test/suites/account_p0/test_nereids_row_policy.groovy @@ -23,16 +23,16 @@ suite("test_nereids_row_policy") { def url=tokens[0] + "//" + tokens[2] + "/" + dbName + "?" def assertQueryResult = { size -> - def result1 = connect(user=user, password='123abc!@#', url=url) { + def result1 = connect(user, '123abc!@#', url) { sql "set enable_nereids_planner = false" sql "SELECT * FROM ${tableName}" } - def result2 = connect(user=user, password='123abc!@#', url=url) { + def result2 = connect(user, '123abc!@#', url) { sql "set enable_nereids_planner = true" sql "set enable_fallback_to_original_planner = false" sql "SELECT * FROM ${tableName}" } - connect(user=user, password='123abc!@#', url=url) { + connect(user, '123abc!@#', url) { sql "set enable_nereids_planner = true" sql "set enable_fallback_to_original_planner = false" test { diff --git a/regression-test/suites/account_p0/test_role.groovy b/regression-test/suites/account_p0/test_role.groovy index 6d88238ebf5f03..24b4e6859795b2 100644 --- a/regression-test/suites/account_p0/test_role.groovy +++ b/regression-test/suites/account_p0/test_role.groovy @@ -32,13 +32,13 @@ suite("test_role", "account") { sql """GRANT SELECT_PRIV ON ${context.config.defaultDb} TO ROLE '${role}'""" sql """GRANT SELECT_PRIV ON ${dbName} TO ROLE '${role}'""" sql """CREATE USER '${user}' IDENTIFIED BY '${pwd}' DEFAULT ROLE '${role}'""" - def result1 = connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + def result1 = connect(user, "${pwd}", context.config.jdbcUrl) { sql "show databases like '${dbName}'" } assertEquals(result1.size(), 1) sql """REVOKE SELECT_PRIV ON ${dbName} FROM ROLE '${role}'""" - def result2 = connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + def result2 = connect(user, "${pwd}", context.config.jdbcUrl) { sql "show databases like '${dbName}'" } assertEquals(result2.size(), 0) diff --git a/regression-test/suites/auth_p0/test_admin_copy_tablet_auth.groovy b/regression-test/suites/auth_p0/test_admin_copy_tablet_auth.groovy index c040dfb8e956c3..9bfffadb730e66 100644 --- a/regression-test/suites/auth_p0/test_admin_copy_tablet_auth.groovy +++ b/regression-test/suites/auth_p0/test_admin_copy_tablet_auth.groovy @@ -23,7 +23,7 @@ suite("test_admin_copy_tablet_auth","p0,auth") { try_sql("DROP USER ${user}") sql """CREATE USER '${user}' IDENTIFIED BY '${pwd}'""" sql """grant select_priv on regression_test to ${user}""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { try { sql "ADMIN COPY TABLET 10010 PROPERTIES('backend_id' = '10001');" } catch (Exception e) { diff --git a/regression-test/suites/auth_p0/test_alter_policy_auth.groovy b/regression-test/suites/auth_p0/test_alter_policy_auth.groovy index 3b1e9af6e2c609..c5b720dbf92d23 100644 --- a/regression-test/suites/auth_p0/test_alter_policy_auth.groovy +++ b/regression-test/suites/auth_p0/test_alter_policy_auth.groovy @@ -23,7 +23,7 @@ suite("test_alter_policy_auth","p0,auth") { try_sql("DROP USER ${user}") sql """CREATE USER '${user}' IDENTIFIED BY '${pwd}'""" sql """grant select_priv on regression_test to ${user}""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { try { sql """ ALTER STORAGE POLICY has_test_policy_to_alter PROPERTIES("cooldown_datetime" = "2023-06-08 00:00:00"); diff --git a/regression-test/suites/auth_p0/test_alter_view_auth.groovy b/regression-test/suites/auth_p0/test_alter_view_auth.groovy index 52bf8ac75c7217..137af46f32fb16 100644 --- a/regression-test/suites/auth_p0/test_alter_view_auth.groovy +++ b/regression-test/suites/auth_p0/test_alter_view_auth.groovy @@ -42,7 +42,7 @@ suite("test_alter_view_auth","p0,auth") { """ sql """grant select_priv on regression_test to ${user}""" sql """create view ${dbName}.${viewName} as select * from ${dbName}.${tableName};""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { try { sql "alter view ${dbName}.${viewName} as select * from ${dbName}.${tableName};" } catch (Exception e) { @@ -51,7 +51,7 @@ suite("test_alter_view_auth","p0,auth") { } } sql """grant Alter_priv on ${dbName}.${viewName} to ${user}""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { try { sql "alter view ${dbName}.${viewName} as select * from ${dbName}.${tableName};" } catch (Exception e) { diff --git a/regression-test/suites/auth_p0/test_cancel_alter_system_auth.groovy b/regression-test/suites/auth_p0/test_cancel_alter_system_auth.groovy index 0e630fdae8e9cc..6dc93a817ad942 100644 --- a/regression-test/suites/auth_p0/test_cancel_alter_system_auth.groovy +++ b/regression-test/suites/auth_p0/test_cancel_alter_system_auth.groovy @@ -23,7 +23,7 @@ suite("test_cancel_alter_system_auth","p0,auth") { try_sql("DROP USER ${user}") sql """CREATE USER '${user}' IDENTIFIED BY '${pwd}'""" sql """grant select_priv on regression_test to ${user}""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { try { sql "CANCEL DECOMMISSION BACKEND 'id1';" } catch (Exception e) { diff --git a/regression-test/suites/auth_p0/test_create_policy_auth.groovy b/regression-test/suites/auth_p0/test_create_policy_auth.groovy index 8debfaedb273a7..db7968dc64ddf8 100644 --- a/regression-test/suites/auth_p0/test_create_policy_auth.groovy +++ b/regression-test/suites/auth_p0/test_create_policy_auth.groovy @@ -23,7 +23,7 @@ suite("test_create_policy_auth","p0,auth") { try_sql("DROP USER ${user}") sql """CREATE USER '${user}' IDENTIFIED BY '${pwd}'""" sql """grant select_priv on regression_test to ${user}""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { try { sql "CREATE ROW POLICY test_create_policy_auth ON test.table1 AS RESTRICTIVE TO test USING (c1 = 'a');" } catch (Exception e) { diff --git a/regression-test/suites/auth_p0/test_create_view_auth.groovy b/regression-test/suites/auth_p0/test_create_view_auth.groovy index 4c9d31b51454b3..7e2e253123c4c0 100644 --- a/regression-test/suites/auth_p0/test_create_view_auth.groovy +++ b/regression-test/suites/auth_p0/test_create_view_auth.groovy @@ -39,7 +39,7 @@ suite("test_create_view_auth","p0,auth") { ); """ sql """grant select_priv on regression_test to ${user}""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { try { sql "create view ${dbName}.v1 as select * from ${dbName}.${tableName};" } catch (Exception e) { @@ -48,7 +48,7 @@ suite("test_create_view_auth","p0,auth") { } } sql """grant create_priv on ${dbName}.* to ${user}""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { try { sql "create view ${dbName}.v1 as select * from ${dbName}.${tableName};" } catch (Exception e) { diff --git a/regression-test/suites/auth_p0/test_drop_materialized_view_auth.groovy b/regression-test/suites/auth_p0/test_drop_materialized_view_auth.groovy index 4d55b1482cff12..47ca778de217d9 100644 --- a/regression-test/suites/auth_p0/test_drop_materialized_view_auth.groovy +++ b/regression-test/suites/auth_p0/test_drop_materialized_view_auth.groovy @@ -23,7 +23,7 @@ suite("test_drop_materialized_view_auth","p0,auth") { try_sql("DROP USER ${user}") sql """CREATE USER '${user}' IDENTIFIED BY '${pwd}'""" sql """grant select_priv on regression_test to ${user}""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { try { sql "DROP MATERIALIZED VIEW mv_name ON table_name;" } catch (Exception e) { diff --git a/regression-test/suites/auth_p0/test_drop_policy_auth.groovy b/regression-test/suites/auth_p0/test_drop_policy_auth.groovy index 0d6a9e103d173f..748a56bf7b45bf 100644 --- a/regression-test/suites/auth_p0/test_drop_policy_auth.groovy +++ b/regression-test/suites/auth_p0/test_drop_policy_auth.groovy @@ -23,7 +23,7 @@ suite("test_drop_policy_auth","p0,auth") { try_sql("DROP USER ${user}") sql """CREATE USER '${user}' IDENTIFIED BY '${pwd}'""" sql """grant select_priv on regression_test to ${user}""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { try { sql "DROP ROW POLICY test_row_policy_1 on table1;" } catch (Exception e) { diff --git a/regression-test/suites/auth_p0/test_master_slave_consistency_auth.groovy b/regression-test/suites/auth_p0/test_master_slave_consistency_auth.groovy index acb59e74326a78..407852f176a66a 100644 --- a/regression-test/suites/auth_p0/test_master_slave_consistency_auth.groovy +++ b/regression-test/suites/auth_p0/test_master_slave_consistency_auth.groovy @@ -115,7 +115,7 @@ suite ("test_follower_consistent_auth","p0,auth") { logger.info("url_tmp1:" + url_tmp1) logger.info("new_jdbc_url:" + new_jdbc_url) - connect(user=user, password="${pwd}", url=url_tmp1) { + connect(user, "${pwd}", url_tmp1) { try { sql "SHOW CATALOG RECYCLE BIN WHERE NAME = '${catalog_name}'" } catch (Exception e) { @@ -123,7 +123,7 @@ suite ("test_follower_consistent_auth","p0,auth") { assertTrue(e.getMessage().contains("denied")) } } - connect(user=user, password="${pwd}", url=new_jdbc_url) { + connect(user, "${pwd}", new_jdbc_url) { try { sql "SHOW CATALOG RECYCLE BIN WHERE NAME = '${catalog_name}'" } catch (Exception e) { @@ -131,7 +131,7 @@ suite ("test_follower_consistent_auth","p0,auth") { assertTrue(e.getMessage().contains("denied")) } } - connect(user=user, password="${pwd}", url=url_tmp1) { + connect(user, "${pwd}", url_tmp1) { try { sql "SHOW DATA" } catch (Exception e) { @@ -139,7 +139,7 @@ suite ("test_follower_consistent_auth","p0,auth") { assertTrue(e.getMessage().contains("denied")) } } - connect(user=user, password="${pwd}", url=new_jdbc_url) { + connect(user, "${pwd}", new_jdbc_url) { try { sql "SHOW DATA" } catch (Exception e) { @@ -148,7 +148,7 @@ suite ("test_follower_consistent_auth","p0,auth") { } } - connect(user=user, password="${pwd}", url=url_tmp1) { + connect(user, "${pwd}", url_tmp1) { try { sql "select username from ${dbName}.${tableName}" } catch (Exception e) { @@ -156,7 +156,7 @@ suite ("test_follower_consistent_auth","p0,auth") { assertTrue(e.getMessage().contains("denied")) } } - connect(user=user, password="${pwd}", url=new_jdbc_url) { + connect(user, "${pwd}", new_jdbc_url) { try { sql "select username from ${dbName}.${tableName}" } catch (Exception e) { @@ -165,15 +165,15 @@ suite ("test_follower_consistent_auth","p0,auth") { } } sql """grant select_priv(username) on ${dbName}.${tableName} to ${user}""" - connect(user=user, password="${pwd}", url=url_tmp1) { + connect(user, "${pwd}", url_tmp1) { sql "select username from ${dbName}.${tableName}" } - connect(user=user, password="${pwd}", url=new_jdbc_url) { + connect(user, "${pwd}", new_jdbc_url) { sql "select username from ${dbName}.${tableName}" } - connect(user=user, password="${pwd}", url=url_tmp1) { + connect(user, "${pwd}", url_tmp1) { try { sql "select username from ${dbName}.${view_name}" } catch (Exception e) { @@ -181,7 +181,7 @@ suite ("test_follower_consistent_auth","p0,auth") { assertTrue(e.getMessage().contains("denied")) } } - connect(user=user, password="${pwd}", url=new_jdbc_url) { + connect(user, "${pwd}", new_jdbc_url) { try { sql "select username from ${dbName}.${view_name}" } catch (Exception e) { @@ -190,15 +190,15 @@ suite ("test_follower_consistent_auth","p0,auth") { } } sql """grant select_priv(username) on ${dbName}.${view_name} to ${user}""" - connect(user=user, password="${pwd}", url=url_tmp1) { + connect(user, "${pwd}", url_tmp1) { sql "select username from ${dbName}.${view_name}" } - connect(user=user, password="${pwd}", url=new_jdbc_url) { + connect(user, "${pwd}", new_jdbc_url) { sql "select username from ${dbName}.${view_name}" } - connect(user=user, password="${pwd}", url=url_tmp1) { + connect(user, "${pwd}", url_tmp1) { try { sql "select username from ${dbName}.${mtmv_name}" } catch (Exception e) { @@ -206,7 +206,7 @@ suite ("test_follower_consistent_auth","p0,auth") { assertTrue(e.getMessage().contains("denied")) } } - connect(user=user, password="${pwd}", url=new_jdbc_url) { + connect(user, "${pwd}", new_jdbc_url) { try { sql "select username from ${dbName}.${mtmv_name}" } catch (Exception e) { @@ -215,10 +215,10 @@ suite ("test_follower_consistent_auth","p0,auth") { } } sql """grant select_priv(username) on ${dbName}.${mtmv_name} to ${user}""" - connect(user=user, password="${pwd}", url=url_tmp1) { + connect(user, "${pwd}", url_tmp1) { sql "select username from ${dbName}.${mtmv_name}" } - connect(user=user, password="${pwd}", url=new_jdbc_url) { + connect(user, "${pwd}", new_jdbc_url) { sql "select username from ${dbName}.${mtmv_name}" } @@ -228,15 +228,15 @@ suite ("test_follower_consistent_auth","p0,auth") { // user sql """grant select_priv on ${dbName}.${tableName} to ${user}""" - connect(user=user, password="${pwd}", url=url_tmp1) { + connect(user, "${pwd}", url_tmp1) { sql "select username from ${dbName}.${tableName}" } - connect(user=user, password="${pwd}", url=new_jdbc_url) { + connect(user, "${pwd}", new_jdbc_url) { sql "select username from ${dbName}.${tableName}" } sql """revoke select_priv on ${dbName}.${tableName} from ${user}""" - connect(user=user, password="${pwd}", url=url_tmp1) { + connect(user, "${pwd}", url_tmp1) { try { sql "select username from ${dbName}.${tableName}" } catch (Exception e) { @@ -244,7 +244,7 @@ suite ("test_follower_consistent_auth","p0,auth") { assertTrue(e.getMessage().contains("denied")) } } - connect(user=user, password="${pwd}", url=new_jdbc_url) { + connect(user, "${pwd}", new_jdbc_url) { try { sql "select username from ${dbName}.${tableName}" } catch (Exception e) { @@ -257,17 +257,17 @@ suite ("test_follower_consistent_auth","p0,auth") { sql """grant select_priv on ${dbName}.${tableName} to ROLE '${role}'""" sql """grant Load_priv on ${dbName}.${tableName} to ROLE '${role}'""" sql """grant '${role}' to '${user}'""" - connect(user=user, password="${pwd}", url=url_tmp1) { + connect(user, "${pwd}", url_tmp1) { sql "select username from ${dbName}.${tableName}" sql """insert into ${dbName}.`${tableName}` values (4, "444")""" } - connect(user=user, password="${pwd}", url=new_jdbc_url) { + connect(user, "${pwd}", new_jdbc_url) { sql "select username from ${dbName}.${tableName}" sql """insert into ${dbName}.`${tableName}` values (4, "444")""" } sql """revoke '${role}' from '${user}'""" - connect(user=user, password="${pwd}", url=url_tmp1) { + connect(user, "${pwd}", url_tmp1) { try { sql "select username from ${dbName}.${tableName}" } catch (Exception e) { @@ -275,7 +275,7 @@ suite ("test_follower_consistent_auth","p0,auth") { assertTrue(e.getMessage().contains("denied")) } } - connect(user=user, password="${pwd}", url=new_jdbc_url) { + connect(user, "${pwd}", new_jdbc_url) { try { sql "select username from ${dbName}.${tableName}" } catch (Exception e) { @@ -286,7 +286,7 @@ suite ("test_follower_consistent_auth","p0,auth") { // workload group - connect(user=user, password="${pwd}", url=url_tmp1) { + connect(user, "${pwd}", url_tmp1) { sql """set workload_group = '${wg}';""" try { sql "select username from ${dbName}.${tableName}" @@ -295,7 +295,7 @@ suite ("test_follower_consistent_auth","p0,auth") { assertTrue(e.getMessage().contains("denied")) } } - connect(user=user, password="${pwd}", url=new_jdbc_url) { + connect(user, "${pwd}", new_jdbc_url) { sql """set workload_group = '${wg}';""" try { sql "select username from ${dbName}.${tableName}" @@ -305,30 +305,30 @@ suite ("test_follower_consistent_auth","p0,auth") { } } sql """GRANT USAGE_PRIV ON WORKLOAD GROUP '${wg}' TO '${user}';""" - connect(user=user, password="${pwd}", url=url_tmp1) { + connect(user, "${pwd}", url_tmp1) { sql """set workload_group = '${wg}';""" sql """select username from ${dbName}.${tableName}""" } - connect(user=user, password="${pwd}", url=new_jdbc_url) { + connect(user, "${pwd}", new_jdbc_url) { sql """set workload_group = '${wg}';""" sql """select username from ${dbName}.${tableName}""" } // resource group - connect(user=user, password="${pwd}", url=url_tmp1) { + connect(user, "${pwd}", url_tmp1) { def res = sql """SHOW RESOURCES;""" assertTrue(res == []) } - connect(user=user, password="${pwd}", url=new_jdbc_url) { + connect(user, "${pwd}", new_jdbc_url) { def res = sql """SHOW RESOURCES;""" assertTrue(res == []) } sql """GRANT USAGE_PRIV ON RESOURCE ${rg} TO ${user};""" - connect(user=user, password="${pwd}", url=url_tmp1) { + connect(user, "${pwd}", url_tmp1) { def res = sql """SHOW RESOURCES;""" assertTrue(res.size == 10) } - connect(user=user, password="${pwd}", url=new_jdbc_url) { + connect(user, "${pwd}", new_jdbc_url) { def res = sql """SHOW RESOURCES;""" assertTrue(res.size == 10) } diff --git a/regression-test/suites/auth_p0/test_select_column_auth.groovy b/regression-test/suites/auth_p0/test_select_column_auth.groovy index a204672ea90582..04b426830a6fdc 100644 --- a/regression-test/suites/auth_p0/test_select_column_auth.groovy +++ b/regression-test/suites/auth_p0/test_select_column_auth.groovy @@ -63,7 +63,7 @@ suite("test_select_column_auth","p0,auth") { sql """grant select_priv on regression_test to ${user}""" // table column - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { try { sql "select username from ${dbName}.${tableName}" } catch (Exception e) { @@ -72,12 +72,12 @@ suite("test_select_column_auth","p0,auth") { } } sql """grant select_priv(username) on ${dbName}.${tableName} to ${user}""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { sql "select username from ${dbName}.${tableName}" } // view column - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { try { sql "select username from ${dbName}.${mv_name}" } catch (Exception e) { @@ -86,12 +86,12 @@ suite("test_select_column_auth","p0,auth") { } } sql """grant select_priv(username) on ${dbName}.${mv_name} to ${user}""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { sql "select username from ${dbName}.${mv_name}" } // mtmv column - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { try { sql "select username from ${dbName}.${mtmv_name}" } catch (Exception e) { @@ -100,13 +100,13 @@ suite("test_select_column_auth","p0,auth") { } } sql """grant select_priv(username) on ${dbName}.${mtmv_name} to ${user}""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { sql "select username from ${dbName}.${mtmv_name}" } // mtmv hit - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { sql "SET enable_materialized_view_rewrite=true" try { sql "select username, sum(id) from ${dbName}.${tableName} group by username" @@ -118,7 +118,7 @@ suite("test_select_column_auth","p0,auth") { sql """grant select_priv(username) on ${dbName}.${mtmv_name} to ${user}""" sql """grant select_priv(sum_id) on ${dbName}.${mtmv_name} to ${user}""" sql """grant select_priv(id) on ${dbName}.${tableName} to ${user}""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { sql "SET enable_materialized_view_rewrite=true" explain { sql("""select username, sum(id) from ${dbName}.${tableName} group by username""") diff --git a/regression-test/suites/auth_p0/test_select_view_auth.groovy b/regression-test/suites/auth_p0/test_select_view_auth.groovy index 87ec8cf0aeb758..9a5020ea163ce6 100644 --- a/regression-test/suites/auth_p0/test_select_view_auth.groovy +++ b/regression-test/suites/auth_p0/test_select_view_auth.groovy @@ -68,7 +68,7 @@ suite("test_select_view_auth","p0,auth") { sql """grant select_priv on regression_test to ${user}""" // table column - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { try { sql "select * from ${dbName}.${viewName}" } catch (Exception e) { @@ -77,7 +77,7 @@ suite("test_select_view_auth","p0,auth") { } } sql """grant select_priv on ${dbName}.${viewName} to ${user}""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { sql "select * from ${dbName}.${viewName}" } diff --git a/regression-test/suites/auth_p0/test_set_ldap_admin_password_auth.groovy b/regression-test/suites/auth_p0/test_set_ldap_admin_password_auth.groovy index 6c5032f7ef9867..e72e1e1774c8a5 100644 --- a/regression-test/suites/auth_p0/test_set_ldap_admin_password_auth.groovy +++ b/regression-test/suites/auth_p0/test_set_ldap_admin_password_auth.groovy @@ -23,7 +23,7 @@ suite("test_set_ldap_admin_password_auth","p0,auth") { try_sql("DROP USER ${user}") sql """CREATE USER '${user}' IDENTIFIED BY '${pwd}'""" sql """grant select_priv on regression_test to ${user}""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { try { sql "SET LDAP_ADMIN_PASSWORD = PASSWORD('plain password')" } catch (Exception e) { diff --git a/regression-test/suites/auth_p0/test_show_catalog_recycle_bin_auth.groovy b/regression-test/suites/auth_p0/test_show_catalog_recycle_bin_auth.groovy index aa3ba7f8e2bfa2..9c9d7a07cdd8f3 100644 --- a/regression-test/suites/auth_p0/test_show_catalog_recycle_bin_auth.groovy +++ b/regression-test/suites/auth_p0/test_show_catalog_recycle_bin_auth.groovy @@ -23,7 +23,7 @@ suite("test_show_catalog_recycle_bin_auth","p0,auth") { try_sql("DROP USER ${user}") sql """CREATE USER '${user}' IDENTIFIED BY '${pwd}'""" sql """grant select_priv on regression_test to ${user}""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { try { sql "SHOW CATALOG RECYCLE BIN WHERE NAME = 'test'" } catch (Exception e) { diff --git a/regression-test/suites/auth_p0/test_show_create_database_auth.groovy b/regression-test/suites/auth_p0/test_show_create_database_auth.groovy index c4efff7d662478..4562a301fc3986 100644 --- a/regression-test/suites/auth_p0/test_show_create_database_auth.groovy +++ b/regression-test/suites/auth_p0/test_show_create_database_auth.groovy @@ -23,7 +23,7 @@ suite("test_show_create_database_auth","p0,auth") { try_sql("DROP USER ${user}") sql """CREATE USER '${user}' IDENTIFIED BY '${pwd}'""" sql """grant select_priv on regression_test to ${user}""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { try { sql "SHOW CREATE DATABASE db_name" } catch (Exception e) { diff --git a/regression-test/suites/auth_p0/test_show_create_repository_auth.groovy b/regression-test/suites/auth_p0/test_show_create_repository_auth.groovy index 5e787aead258bf..717b70a723e435 100644 --- a/regression-test/suites/auth_p0/test_show_create_repository_auth.groovy +++ b/regression-test/suites/auth_p0/test_show_create_repository_auth.groovy @@ -23,7 +23,7 @@ suite("test_show_create_repository_auth","p0,auth") { try_sql("DROP USER ${user}") sql """CREATE USER '${user}' IDENTIFIED BY '${pwd}'""" sql """grant select_priv on regression_test to ${user}""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { try { sql "SHOW CREATE REPOSITORY for repository_name" } catch (Exception e) { diff --git a/regression-test/suites/auth_p0/test_show_data_auth.groovy b/regression-test/suites/auth_p0/test_show_data_auth.groovy index fdd42d2759664f..75176d14a442c4 100644 --- a/regression-test/suites/auth_p0/test_show_data_auth.groovy +++ b/regression-test/suites/auth_p0/test_show_data_auth.groovy @@ -23,7 +23,7 @@ suite("test_show_data_auth","p0,auth") { try_sql("DROP USER ${user}") sql """CREATE USER '${user}' IDENTIFIED BY '${pwd}'""" sql """grant select_priv on regression_test to ${user}""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { try { sql "SHOW DATA" } catch (Exception e) { diff --git a/regression-test/suites/auth_p0/test_show_encryptkeys_auth.groovy b/regression-test/suites/auth_p0/test_show_encryptkeys_auth.groovy index 1e2cf4c27fd212..ccc6de1b7213b9 100644 --- a/regression-test/suites/auth_p0/test_show_encryptkeys_auth.groovy +++ b/regression-test/suites/auth_p0/test_show_encryptkeys_auth.groovy @@ -23,7 +23,7 @@ suite("test_show_encryptkeys_auth","p0,auth") { try_sql("DROP USER ${user}") sql """CREATE USER '${user}' IDENTIFIED BY '${pwd}'""" sql """grant select_priv on regression_test to ${user}""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { try { sql "use regression_test" sql "SHOW ENCRYPTKEYS" diff --git a/regression-test/suites/auth_p0/test_show_plugins_auth.groovy b/regression-test/suites/auth_p0/test_show_plugins_auth.groovy index b5b4de84265162..bb91edc2ea5d58 100644 --- a/regression-test/suites/auth_p0/test_show_plugins_auth.groovy +++ b/regression-test/suites/auth_p0/test_show_plugins_auth.groovy @@ -23,7 +23,7 @@ suite("test_show_plugins_auth","p0,auth") { try_sql("DROP USER ${user}") sql """CREATE USER '${user}' IDENTIFIED BY '${pwd}'""" sql """grant select_priv on regression_test to ${user}""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { try { sql "SHOW PLUGINS" } catch (Exception e) { diff --git a/regression-test/suites/auth_p0/test_show_repositories_auth.groovy b/regression-test/suites/auth_p0/test_show_repositories_auth.groovy index 507d8768669973..4b4e68ed6cae08 100644 --- a/regression-test/suites/auth_p0/test_show_repositories_auth.groovy +++ b/regression-test/suites/auth_p0/test_show_repositories_auth.groovy @@ -23,7 +23,7 @@ suite("test_show_repositories_auth","p0,auth") { try_sql("DROP USER ${user}") sql """CREATE USER '${user}' IDENTIFIED BY '${pwd}'""" sql """grant select_priv on regression_test to ${user}""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { try { sql "SHOW REPOSITORIES" } catch (Exception e) { diff --git a/regression-test/suites/auth_p0/test_show_snapshot_auth.groovy b/regression-test/suites/auth_p0/test_show_snapshot_auth.groovy index f90e1fdc57aaab..9ef808e7fee2f7 100644 --- a/regression-test/suites/auth_p0/test_show_snapshot_auth.groovy +++ b/regression-test/suites/auth_p0/test_show_snapshot_auth.groovy @@ -23,7 +23,7 @@ suite("test_show_snapshot_auth","p0,auth") { try_sql("DROP USER ${user}") sql """CREATE USER '${user}' IDENTIFIED BY '${pwd}'""" sql """grant select_priv on regression_test to ${user}""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { try { sql "SHOW SNAPSHOT ON example_repo" } catch (Exception e) { diff --git a/regression-test/suites/auth_p0/test_show_stream_load_auth.groovy b/regression-test/suites/auth_p0/test_show_stream_load_auth.groovy index cb2446f04405f3..f64f0fa73dd220 100644 --- a/regression-test/suites/auth_p0/test_show_stream_load_auth.groovy +++ b/regression-test/suites/auth_p0/test_show_stream_load_auth.groovy @@ -59,13 +59,13 @@ suite("test_show_stream_load_auth","p0,auth") { sql """CREATE USER '${user}' IDENTIFIED BY '${pwd}'""" sql """grant select_priv on regression_test to ${user}""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { res = sql "SHOW STREAM LOAD from regression_test_auth_p0 where label = '${label}'" log.info(res.toString()) assertFalse(res.toString().contains("${label}")) } sql """grant load_priv on regression_test_auth_p0.${tableName} to ${user}""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { res = sql "SHOW STREAM LOAD from regression_test_auth_p0 where label = '${label}'" log.info(res.toString()) assertTrue(res.toString().contains("${label}")) diff --git a/regression-test/suites/auth_p0/test_show_tablets_belong_auth.groovy b/regression-test/suites/auth_p0/test_show_tablets_belong_auth.groovy index b7d66af9348f0d..b86a840bae1be9 100644 --- a/regression-test/suites/auth_p0/test_show_tablets_belong_auth.groovy +++ b/regression-test/suites/auth_p0/test_show_tablets_belong_auth.groovy @@ -23,7 +23,7 @@ suite("test_show_tablets_belong_auth","p0,auth") { try_sql("DROP USER ${user}") sql """CREATE USER '${user}' IDENTIFIED BY '${pwd}'""" sql """grant select_priv on regression_test to ${user}""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { try { sql "SHOW TABLETS BELONG 27028" } catch (Exception e) { diff --git a/regression-test/suites/auth_p0/test_show_transaction_auth.groovy b/regression-test/suites/auth_p0/test_show_transaction_auth.groovy index f4e564c52889a0..9e6303a2a925b8 100644 --- a/regression-test/suites/auth_p0/test_show_transaction_auth.groovy +++ b/regression-test/suites/auth_p0/test_show_transaction_auth.groovy @@ -23,7 +23,7 @@ suite("test_show_transaction_auth","p0,auth") { try_sql("DROP USER ${user}") sql """CREATE USER '${user}' IDENTIFIED BY '${pwd}'""" sql """grant select_priv on regression_test to ${user}""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { try { sql "SHOW TRANSACTION WHERE ID=4005;" } catch (Exception e) { diff --git a/regression-test/suites/auth_p0/test_use_encryptkey_auth.groovy b/regression-test/suites/auth_p0/test_use_encryptkey_auth.groovy index 8245486d66fd7e..14bd6b0ffa98e4 100644 --- a/regression-test/suites/auth_p0/test_use_encryptkey_auth.groovy +++ b/regression-test/suites/auth_p0/test_use_encryptkey_auth.groovy @@ -40,7 +40,7 @@ suite("test_use_encryptkey_auth","p0,auth") { } sql """CREATE ENCRYPTKEY ${key} AS 'ABCD123456789'""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { test { sql """ SELECT HEX(AES_ENCRYPT("Doris is Great", KEY ${dbName}.${key})); @@ -49,7 +49,7 @@ suite("test_use_encryptkey_auth","p0,auth") { } } sql """grant select_priv on ${dbName} to ${user}""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { sql """ SELECT HEX(AES_ENCRYPT("Doris is Great", KEY ${dbName}.${key})); """ diff --git a/regression-test/suites/auth_up_down_p0/load.groovy b/regression-test/suites/auth_up_down_p0/load.groovy index 71e08656159287..84deb2cde2e206 100644 --- a/regression-test/suites/auth_up_down_p0/load.groovy +++ b/regression-test/suites/auth_up_down_p0/load.groovy @@ -119,15 +119,15 @@ suite("test_upgrade_downgrade_prepare_auth","p0,auth,restart_fe") { // user sql """grant select_priv on ${dbName}.${tableName1} to ${user1}""" sql """grant select_priv on ${dbName}.${tableName2} to ${user1}""" - connect(user=user1, password="${pwd}", url=context.config.jdbcUrl) { + connect(user1, "${pwd}", context.config.jdbcUrl) { sql "select username from ${dbName}.${tableName1}" } - connect(user=user1, password="${pwd}", url=context.config.jdbcUrl) { + connect(user1, "${pwd}", context.config.jdbcUrl) { sql "select username from ${dbName}.${tableName2}" } sql """revoke select_priv on ${dbName}.${tableName1} from ${user1}""" - connect(user=user1, password="${pwd}", url=context.config.jdbcUrl) { + connect(user1, "${pwd}", context.config.jdbcUrl) { try { sql "select username from ${dbName}.${tableName1}" } catch (Exception e) { @@ -135,7 +135,7 @@ suite("test_upgrade_downgrade_prepare_auth","p0,auth,restart_fe") { assertTrue(e.getMessage().contains("denied")) } } - connect(user=user1, password="${pwd}", url=context.config.jdbcUrl) { + connect(user1, "${pwd}", context.config.jdbcUrl) { sql "select username from ${dbName}.${tableName2}" } @@ -143,13 +143,13 @@ suite("test_upgrade_downgrade_prepare_auth","p0,auth,restart_fe") { sql """grant select_priv on ${dbName}.${tableName1} to ROLE '${role1}'""" sql """grant Load_priv on ${dbName}.${tableName1} to ROLE '${role2}'""" sql """grant '${role1}', '${role2}' to '${user2}'""" - connect(user=user2, password="${pwd}", url=context.config.jdbcUrl) { + connect(user2, "${pwd}", context.config.jdbcUrl) { sql "select username from ${dbName}.${tableName1}" sql """insert into ${dbName}.`${tableName1}` values (4, "444")""" } sql """revoke '${role1}' from '${user2}'""" - connect(user=user2, password="${pwd}", url=context.config.jdbcUrl) { + connect(user2, "${pwd}", context.config.jdbcUrl) { try { sql "select username from ${dbName}.${tableName1}" } catch (Exception e) { @@ -157,12 +157,12 @@ suite("test_upgrade_downgrade_prepare_auth","p0,auth,restart_fe") { assertTrue(e.getMessage().contains("denied")) } } - connect(user=user2, password="${pwd}", url=context.config.jdbcUrl) { + connect(user2, "${pwd}", context.config.jdbcUrl) { sql """insert into ${dbName}.`${tableName1}` values (5, "555")""" } // workload group - connect(user=user1, password="${pwd}", url=context.config.jdbcUrl) { + connect(user1, "${pwd}", context.config.jdbcUrl) { sql """set workload_group = '${wg1}';""" try { sql "select username from ${dbName}.${tableName2}" @@ -172,18 +172,18 @@ suite("test_upgrade_downgrade_prepare_auth","p0,auth,restart_fe") { } } sql """GRANT USAGE_PRIV ON WORKLOAD GROUP '${wg1}' TO '${user1}';""" - connect(user=user1, password="${pwd}", url=context.config.jdbcUrl) { + connect(user1, "${pwd}", context.config.jdbcUrl) { sql """set workload_group = '${wg1}';""" sql """select username from ${dbName}.${tableName2}""" } // resource group - connect(user=user1, password="${pwd}", url=context.config.jdbcUrl) { + connect(user1, "${pwd}", context.config.jdbcUrl) { def res = sql """SHOW RESOURCES;""" assertTrue(res == []) } sql """GRANT USAGE_PRIV ON RESOURCE ${rg1} TO ${user1};""" - connect(user=user1, password="${pwd}", url=context.config.jdbcUrl) { + connect(user1, "${pwd}", context.config.jdbcUrl) { def res = sql """SHOW RESOURCES;""" assertTrue(res.size == 10) } diff --git a/regression-test/suites/auth_up_down_p0/test_grant_revoke_auth.groovy b/regression-test/suites/auth_up_down_p0/test_grant_revoke_auth.groovy index 1d79d9fb066607..c2f9e4d74f4cbc 100644 --- a/regression-test/suites/auth_up_down_p0/test_grant_revoke_auth.groovy +++ b/regression-test/suites/auth_up_down_p0/test_grant_revoke_auth.groovy @@ -36,7 +36,7 @@ suite("test_upgrade_downgrade_compatibility_auth","p0,auth,restart_fe") { String rg2 = 'test_up_down_resource_2_hdfs' // user - connect(user=user1, password="${pwd}", url=context.config.jdbcUrl) { + connect(user1, "${pwd}", context.config.jdbcUrl) { try { sql "select username from ${dbName}.${tableName1}" } catch (Exception e) { @@ -44,12 +44,12 @@ suite("test_upgrade_downgrade_compatibility_auth","p0,auth,restart_fe") { assertTrue(e.getMessage().contains("denied")) } } - connect(user=user1, password="${pwd}", url=context.config.jdbcUrl) { + connect(user1, "${pwd}", context.config.jdbcUrl) { sql "select username from ${dbName}.${tableName2}" } // role - connect(user=user2, password="${pwd}", url=context.config.jdbcUrl) { + connect(user2, "${pwd}", context.config.jdbcUrl) { try { sql "select username from ${dbName}.${tableName1}" } catch (Exception e) { @@ -57,18 +57,18 @@ suite("test_upgrade_downgrade_compatibility_auth","p0,auth,restart_fe") { assertTrue(e.getMessage().contains("denied")) } } - connect(user=user2, password="${pwd}", url=context.config.jdbcUrl) { + connect(user2, "${pwd}", context.config.jdbcUrl) { sql """insert into ${dbName}.`${tableName1}` values (5, "555")""" } // workload group - connect(user=user1, password="${pwd}", url=context.config.jdbcUrl) { + connect(user1, "${pwd}", context.config.jdbcUrl) { sql """set workload_group = '${wg1}';""" sql """select username from ${dbName}.${tableName2}""" } // resource group - connect(user=user1, password="${pwd}", url=context.config.jdbcUrl) { + connect(user1, "${pwd}", context.config.jdbcUrl) { def res = sql """SHOW RESOURCES;""" assertTrue(res.size == 10) } diff --git a/regression-test/suites/cloud_p0/auth/test_disable_revoke_admin_auth.groovy b/regression-test/suites/cloud_p0/auth/test_disable_revoke_admin_auth.groovy index 2a36ecf8879d9d..19add1d2c87503 100644 --- a/regression-test/suites/cloud_p0/auth/test_disable_revoke_admin_auth.groovy +++ b/regression-test/suites/cloud_p0/auth/test_disable_revoke_admin_auth.groovy @@ -30,7 +30,7 @@ suite("test_disable_revoke_admin_auth", "cloud_auth") { } try { - result = connect(user = "${user}", password = 'Cloud12345', url = context.config.jdbcUrl) { + result = connect("${user}", 'Cloud12345', context.config.jdbcUrl) { sql """ revoke 'admin' from 'admin' """ diff --git a/regression-test/suites/compaction/test_compaction_uniq_keys_row_store.groovy b/regression-test/suites/compaction/test_compaction_uniq_keys_row_store.groovy index 767e1a529c6aa0..6f65b896364044 100644 --- a/regression-test/suites/compaction/test_compaction_uniq_keys_row_store.groovy +++ b/regression-test/suites/compaction/test_compaction_uniq_keys_row_store.groovy @@ -75,7 +75,7 @@ suite("test_compaction_uniq_keys_row_store", "p0") { } // set server side prepared statment url def url="jdbc:mysql://" + sql_ip + ":" + sql_port + "/" + realDb + "?&useServerPrepStmts=true" - def result1 = connect(user=user, password=password, url=url) { + def result1 = connect(user, password, url) { def stmt = prepareStatement """ SELECT /*+ SET_VAR(enable_nereids_planner=true,enable_fallback_to_original_planner=false) */ * FROM ${tableName} t where user_id = ? and date = ? and datev2 = ? and datetimev2_1 = ? and datetimev2_2 = ? and city = ? and age = ? and sex = ?; """ setPrepareStmtArgs stmt, 1, '2017-10-01', '2017-10-01', '2017-10-01 11:11:11.21', '2017-10-01 11:11:11.11', 'Beijing', 10, 1 qe_point_select stmt diff --git a/regression-test/suites/delete_p0/test_delete_on_mor.groovy b/regression-test/suites/delete_p0/test_delete_on_mor.groovy index 71b5b1571272bc..bd46ab58ca8413 100644 --- a/regression-test/suites/delete_p0/test_delete_on_mor.groovy +++ b/regression-test/suites/delete_p0/test_delete_on_mor.groovy @@ -21,7 +21,7 @@ suite("test_delete_on_mor") { for (def use_nereids_planner : [false, true]) { logger.info("current params: use_nereids_planner: ${use_nereids_planner}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect(context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" if (use_nereids_planner) { sql """ set enable_nereids_dml = true; """ diff --git a/regression-test/suites/demo_p0/connect_action.groovy b/regression-test/suites/demo_p0/connect_action.groovy index 437b8fe6651bb8..f269ae35225129 100644 --- a/regression-test/suites/demo_p0/connect_action.groovy +++ b/regression-test/suites/demo_p0/connect_action.groovy @@ -17,7 +17,7 @@ suite("connect_action") { logger.info("ok") - def result1 = connect(user = 'admin', password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + def result1 = connect('admin', context.config.jdbcPassword, context.config.jdbcUrl) { // execute sql with admin user sql 'select 99 + 1' } diff --git a/regression-test/suites/external_table_p0/hive/test_external_catalog_hive.groovy b/regression-test/suites/external_table_p0/hive/test_external_catalog_hive.groovy index b71c72957e9c02..16c8c1f6707d04 100644 --- a/regression-test/suites/external_table_p0/hive/test_external_catalog_hive.groovy +++ b/regression-test/suites/external_table_p0/hive/test_external_catalog_hive.groovy @@ -154,7 +154,7 @@ suite("test_external_catalog_hive", "p0,external,hive,external_docker,external_d try_sql("DROP USER ${user}") sql """CREATE USER '${user}' IDENTIFIED BY '${pwd}'""" sql """GRANT SELECT_PRIV on *.*.* to '${user}'""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { sql """switch hms;""" test { sql "show tables" diff --git a/regression-test/suites/external_table_p0/hive/test_external_sql_block_rule.groovy b/regression-test/suites/external_table_p0/hive/test_external_sql_block_rule.groovy index 0ea308ffbdcd36..f3f04cbb2a3429 100644 --- a/regression-test/suites/external_table_p0/hive/test_external_sql_block_rule.groovy +++ b/regression-test/suites/external_table_p0/hive/test_external_sql_block_rule.groovy @@ -73,7 +73,7 @@ suite("test_external_sql_block_rule", "external_docker,hive,external_docker_hive }); // login as external_block_user1 - def result1 = connect(user = 'external_block_user1', password = '', url = context.config.jdbcUrl) { + def result1 = connect('external_block_user1', '', context.config.jdbcUrl) { sql """set enable_fallback_to_original_planner=false;""" test { sql """select * from ${catalog_name}.`default`.parquet_partition_table order by l_linenumber limit 10;""" @@ -81,7 +81,7 @@ suite("test_external_sql_block_rule", "external_docker,hive,external_docker_hive } } // login as external_block_user2 - def result2 = connect(user = 'external_block_user2', password = '', url = context.config.jdbcUrl) { + def result2 = connect('external_block_user2', '', context.config.jdbcUrl) { sql """set enable_fallback_to_original_planner=false;""" test { sql """select * from ${catalog_name}.`default`.parquet_partition_table order by l_linenumber limit 10;""" @@ -89,7 +89,7 @@ suite("test_external_sql_block_rule", "external_docker,hive,external_docker_hive } } // login as external_block_user3 - def result3 = connect(user = 'external_block_user3', password = '', url = context.config.jdbcUrl) { + def result3 = connect('external_block_user3', '', context.config.jdbcUrl) { def res = sql """show property;""" print "${res}" sql """set enable_fallback_to_original_planner=false;""" diff --git a/regression-test/suites/external_table_p0/hive/test_hive_other.groovy b/regression-test/suites/external_table_p0/hive/test_hive_other.groovy index 936790c6dc23d9..198c746d42e3f0 100644 --- a/regression-test/suites/external_table_p0/hive/test_hive_other.groovy +++ b/regression-test/suites/external_table_p0/hive/test_hive_other.groovy @@ -74,7 +74,7 @@ suite("test_hive_other", "p0,external,hive,external_docker,external_docker_hive" sql """create user ext_catalog_user identified by '12345'""" sql """grant all on internal.${context.config.defaultDb}.* to ext_catalog_user""" sql """grant all on ${catalog_name}.*.* to ext_catalog_user""" - connect(user = 'ext_catalog_user', password = '12345', url = context.config.jdbcUrl) { + connect('ext_catalog_user', '12345', context.config.jdbcUrl) { def database_lists = sql """show databases from ${catalog_name}""" boolean ok = false; for (int i = 0; i < database_lists.size(); ++i) { diff --git a/regression-test/suites/external_table_p0/iceberg/iceberg_drop_rest_table.groovy b/regression-test/suites/external_table_p0/iceberg/iceberg_drop_rest_table.groovy index 35293a22177e2c..8bb779d759c317 100644 --- a/regression-test/suites/external_table_p0/iceberg/iceberg_drop_rest_table.groovy +++ b/regression-test/suites/external_table_p0/iceberg/iceberg_drop_rest_table.groovy @@ -65,7 +65,7 @@ suite("iceberg_drop_rest_table", "p0,external,doris,external_docker,external_doc sql """ grant all on internal.*.* to user1 """ sql """ grant SELECT_PRIV on ${catalog_name}.${db}.${tb} to user1 """ - def result1 = connect(user = 'user1', password = '12345', url = context.config.jdbcUrl) { + def result1 = connect('user1', '12345', context.config.jdbcUrl) { sql """ use ${catalog_name}.${db} """ qt_q1 """ select * from ${tb} """ test { diff --git a/regression-test/suites/external_table_p0/jdbc/test_jdbc_call.groovy b/regression-test/suites/external_table_p0/jdbc/test_jdbc_call.groovy index aa590efddd2a55..ef535ce9a41ad3 100644 --- a/regression-test/suites/external_table_p0/jdbc/test_jdbc_call.groovy +++ b/regression-test/suites/external_table_p0/jdbc/test_jdbc_call.groovy @@ -120,7 +120,7 @@ suite("test_jdbc_call", "p0,external,doris,external_docker,external_docker_doris sql """create user ${user2}"""; sql """grant load_priv, select_priv on *.*.* to ${user2}""" - def result1 = connect(user="${user1}", password="", url=context.config.jdbcUrl) { + def result1 = connect("${user1}", "", context.config.jdbcUrl) { sql """set enable_nereids_planner=true;""" sql """set enable_fallback_to_original_planner=false;""" test { @@ -129,7 +129,7 @@ suite("test_jdbc_call", "p0,external,doris,external_docker,external_docker_doris } } - def result2 = connect(user="${user2}", password="", url=context.config.jdbcUrl) { + def result2 = connect("${user2}", "", context.config.jdbcUrl) { sql """set enable_nereids_planner=true;""" sql """set enable_fallback_to_original_planner=false;""" sql """call execute_stmt("${catalog_name}", "insert into ${internal_db_name}.${internal_tbl_name} values (9, 10)")""" diff --git a/regression-test/suites/external_table_p0/jdbc/test_mysql_jdbc_catalog.groovy b/regression-test/suites/external_table_p0/jdbc/test_mysql_jdbc_catalog.groovy index 36d6807b5dc2d4..637312edec7f5b 100644 --- a/regression-test/suites/external_table_p0/jdbc/test_mysql_jdbc_catalog.groovy +++ b/regression-test/suites/external_table_p0/jdbc/test_mysql_jdbc_catalog.groovy @@ -192,7 +192,7 @@ suite("test_mysql_jdbc_catalog", "p0,external,mysql,external_docker,external_doc // test insert String uuid1 = UUID.randomUUID().toString(); - connect(user=user, password="${pwd}", url=url) { + connect(user, "${pwd}", url) { try { sql """ insert into ${catalog_name}.${ex_db_name}.${test_insert} values ('${uuid1}', 'doris1', 18) """ fail() @@ -203,7 +203,7 @@ suite("test_mysql_jdbc_catalog", "p0,external,mysql,external_docker,external_doc sql """GRANT LOAD_PRIV ON ${catalog_name}.${ex_db_name}.${test_insert} TO ${user}""" - connect(user=user, password="${pwd}", url=url) { + connect(user, "${pwd}", url) { try { sql """ insert into ${catalog_name}.${ex_db_name}.${test_insert} values ('${uuid1}', 'doris1', 18) """ } catch (Exception e) { diff --git a/regression-test/suites/external_table_p0/tvf/test_catalogs_tvf.groovy b/regression-test/suites/external_table_p0/tvf/test_catalogs_tvf.groovy index 748a7e49d14c77..2d68c2078172ba 100644 --- a/regression-test/suites/external_table_p0/tvf/test_catalogs_tvf.groovy +++ b/regression-test/suites/external_table_p0/tvf/test_catalogs_tvf.groovy @@ -108,7 +108,7 @@ suite("test_catalogs_tvf","p0,external,tvf,external_docker") { - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { sql """ switch internal """ order_qt_test_15 """ select CatalogName,CatalogType,Property,Value from catalogs() where CatalogName = "catalog_tvf_test_dlf" and Property= "type" """ order_qt_test_16 """ select CatalogName,CatalogType,Property,Value from catalogs() """ @@ -117,7 +117,7 @@ suite("test_catalogs_tvf","p0,external,tvf,external_docker") { sql """GRANT SELECT_PRIV on `catalog_tvf_test_dlf`.``.`` to '${user}'""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { sql """ switch internal """ order_qt_test_17 """ select CatalogName,CatalogType,Property,Value from catalogs() where CatalogName = "catalog_tvf_test_dlf" and Property= "dlf.secret_key" """ @@ -129,7 +129,7 @@ suite("test_catalogs_tvf","p0,external,tvf,external_docker") { sql """REVOKE SELECT_PRIV on `catalog_tvf_test_dlf`.``.`` FROM '${user}'""" - connect(user=user, password="${pwd}", url=context.config.jdbcUrl) { + connect(user, "${pwd}", context.config.jdbcUrl) { sql """ switch internal """ order_qt_test_21 """ select CatalogName,CatalogType,Property,Value from catalogs() where CatalogName = "catalog_tvf_test_dlf" and Property= "dlf.secret_key" """ diff --git a/regression-test/suites/external_table_p0/tvf/test_insert_from_tvf_with_common_user.groovy b/regression-test/suites/external_table_p0/tvf/test_insert_from_tvf_with_common_user.groovy index 441e05f6ef50b5..5c2471314bb1db 100644 --- a/regression-test/suites/external_table_p0/tvf/test_insert_from_tvf_with_common_user.groovy +++ b/regression-test/suites/external_table_p0/tvf/test_insert_from_tvf_with_common_user.groovy @@ -88,7 +88,7 @@ suite("test_insert_from_tvf_with_common_user", "p0") { sql """create user ${common_user} identified by '12345'""" sql """GRANT SELECT_PRIV,LOAD_PRIV,ALTER_PRIV,CREATE_PRIV,DROP_PRIV ON *.*.* TO '${common_user}'@'%';""" - connect(user = "${common_user}", password = '12345', url = context.config.jdbcUrl) { + connect("${common_user}", '12345', context.config.jdbcUrl) { sql """ use regression_test_external_table_p0_tvf """ sql """ INSERT INTO ${load_table_name} diff --git a/regression-test/suites/external_table_p0/tvf/test_s3_tvf_with_resource.groovy b/regression-test/suites/external_table_p0/tvf/test_s3_tvf_with_resource.groovy index 45796cad882f64..9c97c701bed77f 100644 --- a/regression-test/suites/external_table_p0/tvf/test_s3_tvf_with_resource.groovy +++ b/regression-test/suites/external_table_p0/tvf/test_s3_tvf_with_resource.groovy @@ -199,7 +199,7 @@ suite("test_s3_tvf_with_resource", "p0") { """ sql """grant select_priv on ${db}.${viewName} to ${user}""" // not have usage priv, can not select tvf with resource - connect(user=user, password="${pwd}", url=url) { + connect(user, "${pwd}", url) { sql """set enable_fallback_to_original_planner=false;""" test { sql """set enable_fallback_to_original_planner=false;""" @@ -216,7 +216,7 @@ suite("test_s3_tvf_with_resource", "p0") { } // only have select_priv of view,can select view with resource - connect(user=user, password="${pwd}", url=url) { + connect(user, "${pwd}", url) { sql """SELECT * FROM ${db}.${viewName};""" } diff --git a/regression-test/suites/insert_p0/insert_group_commit_into.groovy b/regression-test/suites/insert_p0/insert_group_commit_into.groovy index 894e218baa1e35..4c616c3a33f2ad 100644 --- a/regression-test/suites/insert_p0/insert_group_commit_into.groovy +++ b/regression-test/suites/insert_p0/insert_group_commit_into.groovy @@ -120,7 +120,7 @@ suite("insert_group_commit_into") { ); """ - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect(context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql """ set group_commit = async_mode; """ if (item == "nereids") { sql """ set enable_nereids_dml = true; """ @@ -257,7 +257,7 @@ suite("insert_group_commit_into") { if (observer_fe != null) { def url = "jdbc:mysql://${observer_fe.Host}:${observer_fe.QueryPort}/" logger.info("observer url: " + url) - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = url) { + connect(context.config.jdbcUser, context.config.jdbcPassword, url) { sql """ set group_commit = async_mode; """ sql """ set enable_nereids_dml = false; """ sql """ set enable_profile= true; """ @@ -322,7 +322,7 @@ suite("insert_group_commit_into") { PROPERTIES ("replication_allocation" = "tag.location.default: 1") """ - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect(context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql """ set group_commit = async_mode; """ if (item == "nereids") { sql """ set enable_nereids_dml = true; """ @@ -397,7 +397,7 @@ suite("insert_group_commit_into") { select ordernum,max(dnt) as dnt from ${table} group by ordernum ORDER BY ordernum;""" - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect(context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql """ set group_commit = async_mode; """ if (item == "nereids") { sql """ set enable_nereids_dml = true; """ @@ -500,7 +500,7 @@ suite("insert_group_commit_into") { ); """ - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect(context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql """ set group_commit = async_mode; """ if (item == "nereids") { sql """ set enable_nereids_dml = true; """ diff --git a/regression-test/suites/insert_p0/insert_group_commit_into_max_filter_ratio.groovy b/regression-test/suites/insert_p0/insert_group_commit_into_max_filter_ratio.groovy index a381b702e1ca34..2013af6b8f6af3 100644 --- a/regression-test/suites/insert_p0/insert_group_commit_into_max_filter_ratio.groovy +++ b/regression-test/suites/insert_p0/insert_group_commit_into_max_filter_ratio.groovy @@ -170,7 +170,7 @@ suite("insert_group_commit_into_max_filter_ratio") { // async mode, sync mode, off mode for (item in ["legacy", "nereids"]) { sql """ truncate table ${tableName} """ - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect(context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { if (item == "nereids") { sql """ set enable_nereids_dml = true; """ sql """ set enable_nereids_planner=true; """ diff --git a/regression-test/suites/insert_p0/insert_group_commit_into_unique.groovy b/regression-test/suites/insert_p0/insert_group_commit_into_unique.groovy index 05cd6da64835c8..889c654afaa4d3 100644 --- a/regression-test/suites/insert_p0/insert_group_commit_into_unique.groovy +++ b/regression-test/suites/insert_p0/insert_group_commit_into_unique.groovy @@ -92,7 +92,7 @@ suite("insert_group_commit_into_unique") { """ // 1. insert into - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect(context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql """ set group_commit = async_mode; """ if (item == "nereids") { sql """ set enable_nereids_dml = true; """ @@ -179,7 +179,7 @@ suite("insert_group_commit_into_unique") { """ // 1. insert into - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect(context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql """ set group_commit = async_mode; """ if (item == "nereids") { sql """ set enable_nereids_dml = true; """ @@ -267,7 +267,7 @@ suite("insert_group_commit_into_unique") { """ // 1. insert into - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect(context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql """ set group_commit = async_mode; """ if (item == "nereids") { sql """ set enable_nereids_dml = true; """ diff --git a/regression-test/suites/insert_p0/insert_group_commit_into_unique_sync_mode.groovy b/regression-test/suites/insert_p0/insert_group_commit_into_unique_sync_mode.groovy index aae859c71de2c4..8493429e7e54b6 100644 --- a/regression-test/suites/insert_p0/insert_group_commit_into_unique_sync_mode.groovy +++ b/regression-test/suites/insert_p0/insert_group_commit_into_unique_sync_mode.groovy @@ -129,7 +129,7 @@ suite("insert_group_commit_into_unique_sync_mode") { """ // 1. insert into - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect(context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql """ set group_commit = sync_mode; """ if (item == "nereids") { sql """ set enable_nereids_dml = true; """ @@ -217,7 +217,7 @@ suite("insert_group_commit_into_unique_sync_mode") { """ // 1. insert into - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect(context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql """ set group_commit = sync_mode; """ if (item == "nereids") { sql """ set enable_nereids_dml = true; """ @@ -308,7 +308,7 @@ suite("insert_group_commit_into_unique_sync_mode") { """ // 1. insert into - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect(context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql """ set group_commit = sync_mode; """ if (item == "nereids") { sql """ set enable_nereids_dml = true; """ diff --git a/regression-test/suites/insert_p0/insert_group_commit_with_large_data.groovy b/regression-test/suites/insert_p0/insert_group_commit_with_large_data.groovy index 6a708eaf5e2ee6..d3d933b3a627a1 100644 --- a/regression-test/suites/insert_p0/insert_group_commit_with_large_data.groovy +++ b/regression-test/suites/insert_p0/insert_group_commit_with_large_data.groovy @@ -66,7 +66,7 @@ suite("insert_group_commit_with_large_data") { ); """ - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect(context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql """ set group_commit = async_mode; """ if (item == "nereids") { sql """ set enable_nereids_dml = true; """ diff --git a/regression-test/suites/insert_p0/prepare_insert.groovy b/regression-test/suites/insert_p0/prepare_insert.groovy index ee4b5c3d654bd8..5d9457b9d9e515 100644 --- a/regression-test/suites/insert_p0/prepare_insert.groovy +++ b/regression-test/suites/insert_p0/prepare_insert.groovy @@ -101,7 +101,7 @@ suite("prepare_insert") { } } - def result1 = connect(user = user, password = password, url = url) { + def result1 = connect(user, password, url) { def stmt = prepareStatement "insert into ${tableName} values(?, ?, ?)" check {assertEquals(com.mysql.cj.jdbc.ServerPreparedStatement, stmt.class)} stmt.setInt(1, 1) @@ -142,7 +142,7 @@ suite("prepare_insert") { } // insert with null - result1 = connect(user = user, password = password, url = url) { + result1 = connect(user, password, url) { def stmt = prepareStatement "insert into ${tableName} values(?, ?, ?)" check {assertEquals(com.mysql.cj.jdbc.ServerPreparedStatement, stmt.class)} stmt.setNull(1, java.sql.Types.INTEGER) @@ -157,7 +157,7 @@ suite("prepare_insert") { // insert with label def label = "insert_" + System.currentTimeMillis() - result1 = connect(user = user, password = password, url = url) { + result1 = connect(user, password, url) { def stmt = prepareStatement "insert into ${tableName} with label ${label} values(?, ?, ?)" assertEquals(com.mysql.cj.jdbc.ClientPreparedStatement, stmt.class) stmt.setInt(1, 5) @@ -171,7 +171,7 @@ suite("prepare_insert") { } url += "&rewriteBatchedStatements=true" - result1 = connect(user = user, password = password, url = url) { + result1 = connect(user, password, url) { def stmt = prepareStatement "insert into ${tableName} values(?, ?, ?)" check {assertEquals(com.mysql.cj.jdbc.ServerPreparedStatement, stmt.class)} stmt.setInt(1, 10) @@ -211,7 +211,7 @@ suite("prepare_insert") { } url += "&cachePrepStmts=true" - result1 = connect(user = user, password = password, url = url) { + result1 = connect(user, password, url) { def stmt = prepareStatement "insert into ${tableName} values(?, ?, ?)" check {assertEquals(com.mysql.cj.jdbc.ServerPreparedStatement, stmt.class)} stmt.setInt(1, 10) diff --git a/regression-test/suites/insert_p0/test_group_commit_data_bytes_property.groovy b/regression-test/suites/insert_p0/test_group_commit_data_bytes_property.groovy index cba4349e16d896..50896d491ed905 100644 --- a/regression-test/suites/insert_p0/test_group_commit_data_bytes_property.groovy +++ b/regression-test/suites/insert_p0/test_group_commit_data_bytes_property.groovy @@ -58,7 +58,7 @@ suite("test_group_commit_data_bytes_property") { ); """ - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect(context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql """ set group_commit = async_mode; """ diff --git a/regression-test/suites/insert_p0/test_group_commit_interval_ms_property.groovy b/regression-test/suites/insert_p0/test_group_commit_interval_ms_property.groovy index 5d8962d07ac6dc..abaa416f3b0b44 100644 --- a/regression-test/suites/insert_p0/test_group_commit_interval_ms_property.groovy +++ b/regression-test/suites/insert_p0/test_group_commit_interval_ms_property.groovy @@ -58,7 +58,7 @@ suite("test_group_commit_interval_ms_property") { ); """ - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect(context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql """ set group_commit = async_mode; """ diff --git a/regression-test/suites/insert_p0/test_jdbc.groovy b/regression-test/suites/insert_p0/test_jdbc.groovy index acd275983aaeae..9beadaff1c4393 100644 --- a/regression-test/suites/insert_p0/test_jdbc.groovy +++ b/regression-test/suites/insert_p0/test_jdbc.groovy @@ -62,7 +62,7 @@ suite("test_jdbc") { ] def insert = { jdbc_url -> - connect(user = user, password = password, url = jdbc_url) { + connect(user, password, jdbc_url) { logger.info("insert url: {}", jdbc_url) def ps = prepareStatement "insert into ${tableName} values(?, ?)" for (int i = 0; i < batchSize; i++) { @@ -79,7 +79,7 @@ suite("test_jdbc") { } def update = { jdbc_url -> - connect(user = user, password = password, url = jdbc_url) { + connect(user, password, jdbc_url) { logger.info("update url: {}", jdbc_url) def ps = prepareStatement "update ${tableName} set phone = ? where id = ?"; for (int i = 0; i < batchSize; i++) { diff --git a/regression-test/suites/internal_schema_p0/operate_internal_schema.groovy b/regression-test/suites/internal_schema_p0/operate_internal_schema.groovy index 658dec30b9310c..d00bef146d4441 100644 --- a/regression-test/suites/internal_schema_p0/operate_internal_schema.groovy +++ b/regression-test/suites/internal_schema_p0/operate_internal_schema.groovy @@ -56,7 +56,7 @@ suite("operate_internal_schema") { sql """GRANT ADMIN_PRIV ON *.*.* TO ${user}""" def tokens = context.config.jdbcUrl.split('/') def url=tokens[0] + "//" + tokens[2] + "/" + "__internal_schema" + "?" - connect(user=user, password="${pwd}", url=url) { + connect(user, "${pwd}", url) { sql "use __internal_schema;" try { //alter db diff --git a/regression-test/suites/javaudf_p0/test_javaudf_auth.groovy b/regression-test/suites/javaudf_p0/test_javaudf_auth.groovy index e1a6f6f8e864d7..a7d5a117ed2cf2 100644 --- a/regression-test/suites/javaudf_p0/test_javaudf_auth.groovy +++ b/regression-test/suites/javaudf_p0/test_javaudf_auth.groovy @@ -50,7 +50,7 @@ suite("test_javaudf_auth") { "symbol"="org.apache.doris.udf.IntTest", "type"="JAVA_UDF" ); """ - connect(user=user, password="${pwd}", url=url) { + connect(user, "${pwd}", url) { try { sql "select ${dbName}.java_udf_auth_test(1)" fail() @@ -60,7 +60,7 @@ suite("test_javaudf_auth") { } sql """GRANT SELECT_PRIV ON ${dbName}.* TO ${user}""" - connect(user=user, password="${pwd}", url=url) { + connect(user, "${pwd}", url) { try { sql "select ${dbName}.java_udf_auth_test(1)" } catch (Exception e) { diff --git a/regression-test/suites/manager/test_manager_interface_3.groovy b/regression-test/suites/manager/test_manager_interface_3.groovy index e94ae3dff6f460..969d21f9e79976 100644 --- a/regression-test/suites/manager/test_manager_interface_3.groovy +++ b/regression-test/suites/manager/test_manager_interface_3.groovy @@ -85,7 +85,7 @@ suite('test_manager_interface_3',"p0") { sql """CREATE USER '${user1}' IDENTIFIED BY '${pwd}' default role '${role1}' """ sql """CREATE USER '${user2}' IDENTIFIED BY '${pwd}' """ - connect(user=user1, password="${pwd}", url=url) { + connect(user1, "${pwd}", url) { test { sql """ select 1""" result( @@ -123,7 +123,7 @@ suite('test_manager_interface_3',"p0") { sql """grant DROP_PRIV on ${dbName} TO ROLE '${role1}' """ sql """grant CREATE_PRIV on ${dbName} TO '${user1}' """ - connect(user=user1, password="${pwd}", url=url) { + connect(user1, "${pwd}", url) { sql """ create table test_manager_tb_2 ( k1 TINYINT, @@ -137,7 +137,7 @@ suite('test_manager_interface_3',"p0") { sql """grant LOAD_PRIV on ${dbName} TO '${user2}' """ sql """ grant "${role1}" to '${user2}' """ - connect(user=user2, password="${pwd}", url=url) { + connect(user2, "${pwd}", url) { test { sql """ create table test_manager_tb_2 ( @@ -206,7 +206,7 @@ suite('test_manager_interface_3',"p0") { assertTrue(x == 4) sql """ revoke CREATE_PRIV on ${dbName} from '${user1}' """ - connect(user=user1, password="${pwd}", url=url) { + connect(user1, "${pwd}", url) { test { sql """ create table test_manager_tb_2 ( k1 TINYINT, @@ -220,7 +220,7 @@ suite('test_manager_interface_3',"p0") { } sql """ revoke LOAD_PRIV on ${dbName} from '${user2}' """ - connect(user=user2, password="${pwd}", url=url) { + connect(user2, "${pwd}", url) { test{ sql """ insert into test_manager_tb values(1,"2"); """ exception """LOAD command denied to user""" @@ -309,14 +309,14 @@ suite('test_manager_interface_3',"p0") { PROPERTIES ('replication_num' = '1');""" - connect(user=user1, password="${pwd}", url=url) { + connect(user1, "${pwd}", url) { test { sql """ Drop table ${dbName}.test_manager_tb_2""" exception "Access denied; you need (at least one of) the (DROP) privilege(s) for this operation" } } - connect(user=user2, password="${pwd}", url=url) { + connect(user2, "${pwd}", url) { test{ sql """ Drop table ${dbName}.test_manager_tb_2""" exception "Access denied; you need (at least one of) the (DROP) privilege(s) for this operation" @@ -325,13 +325,13 @@ suite('test_manager_interface_3',"p0") { sql """set password for '${user2}' = password('${new_pwd}')""" try { - connect(user =user2, password = '${pwd}', url = url) {} + connect(user2, '${pwd}', url) {} assertTrue(false. "should not be able to login") } catch (Exception e) { assertTrue(e.getMessage().contains("Access denied for user"), e.getMessage()) } - connect(user=user2, password="${new_pwd}", url=url) { + connect(user2, "${new_pwd}", url) { result = sql """ select k1 from ${dbName}.${tbName} order by k1 desc limit 1""" assertTrue(result[0][0] == 3) @@ -351,7 +351,7 @@ suite('test_manager_interface_3',"p0") { sql """ revoke "${role1}" from "${user2}" """ try { - connect(user =user2, password = '${pwd}', url = url) {} + connect(user2, '${pwd}', url) {} assertTrue(false. "should not be able to login") } catch (Exception e) { assertTrue(e.getMessage().contains("Access denied for user"), e.getMessage()) @@ -411,7 +411,7 @@ suite('test_manager_interface_3',"p0") { } assertTrue(x == 20) - connect(user=user, password="${pwd}", url=url) { + connect(user, "${pwd}", url) { result = sql """ show resources """ x = 0 for(int i = 0;i> result = sql """ show property like "max_query_instances" """ assertTrue(result[0][0]=="max_query_instances") assertTrue(result[0][1]=="-1") diff --git a/regression-test/suites/nereids_p0/authorization/column_authorization.groovy b/regression-test/suites/nereids_p0/authorization/column_authorization.groovy index a092ce9a3b7997..fed8db3b0116b7 100644 --- a/regression-test/suites/nereids_p0/authorization/column_authorization.groovy +++ b/regression-test/suites/nereids_p0/authorization/column_authorization.groovy @@ -48,7 +48,7 @@ suite("column_authorization") { def defaultDbUrl = context.config.jdbcUrl.substring(0, context.config.jdbcUrl.lastIndexOf("/")) logger.info("connect to ${defaultDbUrl}".toString()) - connect(user = user1, password = null, url = defaultDbUrl) { + connect(user1, null, defaultDbUrl) { sql "set enable_fallback_to_original_planner=false" // no privilege to name diff --git a/regression-test/suites/nereids_p0/authorization/view_authorization.groovy b/regression-test/suites/nereids_p0/authorization/view_authorization.groovy index aa76ccba3df4cd..0326c1e5ba3f7a 100644 --- a/regression-test/suites/nereids_p0/authorization/view_authorization.groovy +++ b/regression-test/suites/nereids_p0/authorization/view_authorization.groovy @@ -51,7 +51,7 @@ suite("view_authorization") { def defaultDbUrl = context.config.jdbcUrl.substring(0, context.config.jdbcUrl.lastIndexOf("/")) logger.info("connect to ${defaultDbUrl}".toString()) - connect(user = user1, password = null, url = defaultDbUrl) { + connect(user1, null, defaultDbUrl) { sql "set enable_fallback_to_original_planner=false" // no privilege to base table diff --git a/regression-test/suites/nereids_p0/cache/parse_sql_from_sql_cache.groovy b/regression-test/suites/nereids_p0/cache/parse_sql_from_sql_cache.groovy index ccb4130455d66c..d1b1e9641267a5 100644 --- a/regression-test/suites/nereids_p0/cache/parse_sql_from_sql_cache.groovy +++ b/regression-test/suites/nereids_p0/cache/parse_sql_from_sql_cache.groovy @@ -294,7 +294,7 @@ suite("parse_sql_from_sql_cache") { extraThread("test_cache_user1_thread", { - connect(user = "test_cache_user1", password="DORIS@2024") { + connect("test_cache_user1", "DORIS@2024") { sql "use ${dbName}" sql "set enable_nereids_planner=true" sql "set enable_fallback_to_original_planner=false" @@ -321,7 +321,7 @@ suite("parse_sql_from_sql_cache") { sleep(10000) extraThread("test_cache_user2_thread", { - connect(user = "test_cache_user2", password="DORIS@2024") { + connect("test_cache_user2", "DORIS@2024") { sql "use ${dbName}" sql "set enable_nereids_planner=true" sql "set enable_fallback_to_original_planner=false" @@ -341,7 +341,7 @@ suite("parse_sql_from_sql_cache") { // after row policy changed, the cache is invalidate extraThread("test_cache_user2_thread2", { - connect(user = "test_cache_user2", password="DORIS@2024") { + connect("test_cache_user2", "DORIS@2024") { sql "use ${dbName}" sql "set enable_nereids_planner=true" sql "set enable_fallback_to_original_planner=false" @@ -374,7 +374,7 @@ suite("parse_sql_from_sql_cache") { sleep(10000) extraThread("test_cache_user3_thread", { - connect(user = "test_cache_user3", password="DORIS@2024") { + connect("test_cache_user3", "DORIS@2024") { sql "use ${dbName}" sql "set enable_nereids_planner=true" sql "set enable_fallback_to_original_planner=false" @@ -393,7 +393,7 @@ suite("parse_sql_from_sql_cache") { // after row policy changed, the cache is invalidate extraThread("test_cache_user3_thread2", { - connect(user = "test_cache_user3", password="DORIS@2024") { + connect("test_cache_user3", "DORIS@2024") { sql "use ${dbName}" sql "set enable_nereids_planner=true" sql "set enable_fallback_to_original_planner=false" @@ -417,7 +417,7 @@ suite("parse_sql_from_sql_cache") { sql "GRANT SELECT_PRIV ON ${dbName}.test_use_plan_cache15 TO test_cache_user4" extraThread("test_cache_user4_thread", { - connect(user = "test_cache_user4", password="DORIS@2024") { + connect("test_cache_user4", "DORIS@2024") { sql "use ${dbName}" sql "set enable_nereids_planner=true" sql "set enable_fallback_to_original_planner=false" @@ -433,7 +433,7 @@ suite("parse_sql_from_sql_cache") { // after privileges changed, the cache is invalidate extraThread("test_cache_user4_thread2", { - connect(user = "test_cache_user4", password="DORIS@2024") { + connect("test_cache_user4", "DORIS@2024") { sql "set enable_nereids_planner=true" sql "set enable_fallback_to_original_planner=false" sql "set enable_sql_cache=true" @@ -590,7 +590,7 @@ suite("parse_sql_from_sql_cache") { def dbName = context.config.getDbNameByFile(context.file) log.info("connect to fe: ${fe1}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = "jdbc:mysql://${fe1}") { + connect( context.config.jdbcUser, context.config.jdbcPassword, "jdbc:mysql://${fe1}") { sql "ADMIN SET FRONTEND CONFIG ('cache_last_version_interval_second' = '10')" sql "use ${dbName}" @@ -612,7 +612,7 @@ suite("parse_sql_from_sql_cache") { } log.info("connect to fe: ${fe2}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = "jdbc:mysql://${fe2}") { + connect( context.config.jdbcUser, context.config.jdbcPassword, "jdbc:mysql://${fe2}") { sql "ADMIN SET FRONTEND CONFIG ('cache_last_version_interval_second' = '10')" sql "use ${dbName}" diff --git a/regression-test/suites/nereids_p0/delete/delete_cte.groovy b/regression-test/suites/nereids_p0/delete/delete_cte.groovy index 711ba1dac4f752..8d58866216b69d 100644 --- a/regression-test/suites/nereids_p0/delete/delete_cte.groovy +++ b/regression-test/suites/nereids_p0/delete/delete_cte.groovy @@ -23,7 +23,7 @@ suite('nereids_delete_cte') { for (def use_row_store : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" def t1 = 't1_cte' diff --git a/regression-test/suites/nereids_p0/delete/delete_mow_partial_update.groovy b/regression-test/suites/nereids_p0/delete/delete_mow_partial_update.groovy index 256881c7b310c4..96ef1fc1878ae0 100644 --- a/regression-test/suites/nereids_p0/delete/delete_mow_partial_update.groovy +++ b/regression-test/suites/nereids_p0/delete/delete_mow_partial_update.groovy @@ -23,7 +23,7 @@ suite('delete_mow_partial_update') { for (def use_row_store : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" sql 'set enable_nereids_planner=true' diff --git a/regression-test/suites/nereids_p0/delete/delete_using.groovy b/regression-test/suites/nereids_p0/delete/delete_using.groovy index 061d748d8a3321..d38c89277214b8 100644 --- a/regression-test/suites/nereids_p0/delete/delete_using.groovy +++ b/regression-test/suites/nereids_p0/delete/delete_using.groovy @@ -23,7 +23,7 @@ suite('nereids_delete_using') { for (def use_row_store : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" sql 'drop table if exists t1' diff --git a/regression-test/suites/nereids_p0/insert_into_table/insert_auth.groovy b/regression-test/suites/nereids_p0/insert_into_table/insert_auth.groovy index 1a333d41d3269e..969fcb5e731d86 100644 --- a/regression-test/suites/nereids_p0/insert_into_table/insert_auth.groovy +++ b/regression-test/suites/nereids_p0/insert_into_table/insert_auth.groovy @@ -48,7 +48,7 @@ suite('nereids_insert_auth') { try_sql("DROP USER ${user}") sql """CREATE USER '${user}' IDENTIFIED BY '${pwd}'""" - connect(user=user, password="${pwd}", url=url) { + connect(user, "${pwd}", url) { try { sql """ insert into ${db}.${t1} values (1, 1) """ fail() @@ -59,7 +59,7 @@ suite('nereids_insert_auth') { sql """GRANT LOAD_PRIV ON ${db}.${t1} TO ${user}""" - connect(user=user, password="${pwd}", url=url) { + connect(user, "${pwd}", url) { try { sql """ insert into ${db}.${t1} values (1, 1) """ } catch (Exception e) { @@ -68,7 +68,7 @@ suite('nereids_insert_auth') { } } - connect(user=user, password="${pwd}", url=url) { + connect(user, "${pwd}", url) { try { sql """ insert overwrite table ${db}.${t1} values (2, 2) """ } catch (Exception e) { diff --git a/regression-test/suites/nereids_p0/insert_into_table/partial_update.groovy b/regression-test/suites/nereids_p0/insert_into_table/partial_update.groovy index fd2145a71ed7b2..0d551ee9cc0292 100644 --- a/regression-test/suites/nereids_p0/insert_into_table/partial_update.groovy +++ b/regression-test/suites/nereids_p0/insert_into_table/partial_update.groovy @@ -24,7 +24,7 @@ suite("nereids_partial_update_native_insert_stmt", "p0") { for (def use_row_store : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" sql "set enable_nereids_dml=true;" diff --git a/regression-test/suites/nereids_p0/insert_into_table/partial_update_complex.groovy b/regression-test/suites/nereids_p0/insert_into_table/partial_update_complex.groovy index 00e13176e47ff6..99989791f7efa7 100644 --- a/regression-test/suites/nereids_p0/insert_into_table/partial_update_complex.groovy +++ b/regression-test/suites/nereids_p0/insert_into_table/partial_update_complex.groovy @@ -23,7 +23,7 @@ suite("nereids_partial_update_native_insert_stmt_complex", "p0") { for (def use_row_store : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" sql "set enable_nereids_dml=true;" diff --git a/regression-test/suites/nereids_p0/insert_into_table/partial_update_seq_col.groovy b/regression-test/suites/nereids_p0/insert_into_table/partial_update_seq_col.groovy index 622350955e9ef0..6e7b70b5c05f7d 100644 --- a/regression-test/suites/nereids_p0/insert_into_table/partial_update_seq_col.groovy +++ b/regression-test/suites/nereids_p0/insert_into_table/partial_update_seq_col.groovy @@ -24,7 +24,7 @@ suite("nereids_partial_update_native_insert_seq_col", "p0") { for (def use_row_store : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" sql "set enable_nereids_dml=true;" diff --git a/regression-test/suites/nereids_rules_p0/mv/with_auth/with_select_table_auth.groovy b/regression-test/suites/nereids_rules_p0/mv/with_auth/with_select_table_auth.groovy index c51dea2f5a7403..09296bbbc1b69e 100644 --- a/regression-test/suites/nereids_rules_p0/mv/with_auth/with_select_table_auth.groovy +++ b/regression-test/suites/nereids_rules_p0/mv/with_auth/with_select_table_auth.groovy @@ -135,7 +135,7 @@ suite("with_select_table_auth","p0,auth") { l_suppkey; """) - connect(user=user_name, password="${pwd}", url=context.config.jdbcUrl) { + connect(user_name, "${pwd}", context.config.jdbcUrl) { sql "use ${db}" mv_rewrite_success( """ @@ -156,7 +156,7 @@ suite("with_select_table_auth","p0,auth") { ) } - connect(user=user_name, password="${pwd}", url=context.config.jdbcUrl) { + connect(user_name, "${pwd}", context.config.jdbcUrl) { sql "use ${db}" test { sql """select * from mv1;""" diff --git a/regression-test/suites/point_query_p0/test_point_query.groovy b/regression-test/suites/point_query_p0/test_point_query.groovy index f552a86ed54d69..e756493a054bd5 100644 --- a/regression-test/suites/point_query_p0/test_point_query.groovy +++ b/regression-test/suites/point_query_p0/test_point_query.groovy @@ -61,7 +61,7 @@ suite("test_point_query", "nonConcurrent") { def nprep_sql = { sql_str -> def url_without_prep = "jdbc:mysql://" + sql_ip + ":" + sql_port + "/" + realDb - connect(user = user, password = password, url = url_without_prep) { + connect(user, password, url_without_prep) { // set to false to invalid cache correcly sql "set enable_memtable_on_sink_node = false" sql sql_str @@ -135,7 +135,7 @@ suite("test_point_query", "nonConcurrent") { sql """ INSERT INTO ${tableName} VALUES(252, 120939.11130, "${generateString(252)}", "laooq", "2030-01-02", "2020-01-01 12:36:38", 252, "7022-01-01 11:30:38", 0, 90696620686827832.374, [0], null) """ sql """ INSERT INTO ${tableName} VALUES(298, 120939.11130, "${generateString(298)}", "laooq", "2030-01-02", "2020-01-01 12:36:38", 298, "7022-01-01 11:30:38", 1, 90696620686827832.374, [], []) """ - def result1 = connect(user=user, password=password, url=prepare_url) { + def result1 = connect(user, password, prepare_url) { def stmt = prepareStatement "select /*+ SET_VAR(enable_nereids_planner=true) */ * from ${tableName} where k1 = ? and k2 = ? and k3 = ?" assertEquals(stmt.class, com.mysql.cj.jdbc.ServerPreparedStatement); stmt.setInt(1, 1231) @@ -221,7 +221,7 @@ suite("test_point_query", "nonConcurrent") { qe_point_select stmt } // disable useServerPrepStmts - def result2 = connect(user=user, password=password, url=context.config.jdbcUrl) { + def result2 = connect(user, password, context.config.jdbcUrl) { qt_sql """select /*+ SET_VAR(enable_nereids_planner=true) */ * from ${tableName} where k1 = 1231 and k2 = 119291.11 and k3 = 'ddd'""" qt_sql """select /*+ SET_VAR(enable_nereids_planner=true) */ * from ${tableName} where k1 = 1237 and k2 = 120939.11130 and k3 = 'a ddd'""" qt_sql """select /*+ SET_VAR(enable_nereids_planner=true) */ hex(k3), hex(k4), k7 + 10.1 from ${tableName} where k1 = 1237 and k2 = 120939.11130 and k3 = 'a ddd'""" diff --git a/regression-test/suites/point_query_p0/test_point_query_partition.groovy b/regression-test/suites/point_query_p0/test_point_query_partition.groovy index 5062677c842b29..848729b44232a7 100644 --- a/regression-test/suites/point_query_p0/test_point_query_partition.groovy +++ b/regression-test/suites/point_query_p0/test_point_query_partition.groovy @@ -48,7 +48,7 @@ suite("test_point_query_partition") { def nprep_sql = { sql_str -> def url_without_prep = "jdbc:mysql://" + sql_ip + ":" + sql_port + "/" + realDb - connect(user = user, password = password, url = url_without_prep) { + connect(user, password, url_without_prep) { sql sql_str } } @@ -85,7 +85,7 @@ suite("test_point_query_partition") { sql """INSERT INTO ${tableName} VALUES (33, 'f')""" sql """INSERT INTO ${tableName} VALUES (45, 'g')""" sql """INSERT INTO ${tableName} VALUES (999, 'h')""" - def result1 = connect(user=user, password=password, url=prepare_url) { + def result1 = connect(user, password, prepare_url) { def stmt = prepareStatement "select * from ${tableName} where k1 = ?" assertEquals(stmt.class, com.mysql.cj.jdbc.ServerPreparedStatement); stmt.setInt(1, 1) @@ -139,7 +139,7 @@ suite("test_point_query_partition") { """ sql """insert into regression_test_serving_p0.customer(customer_key, customer_value_0, customer_value_1) values(686612, "686612", "686612")""" sql """insert into regression_test_serving_p0.customer(customer_key, customer_value_0, customer_value_1) values(686613, "686613", "686613")""" - def result3 = connect(user=user, password=password, url=prepare_url) { + def result3 = connect(user, password, prepare_url) { def stmt = prepareStatement "select /*+ SET_VAR(enable_nereids_planner=true) */ * from regression_test_serving_p0.customer where customer_key = ?" stmt.setInt(1, 686612) qe_point_selectxxx stmt diff --git a/regression-test/suites/prepared_stmt_p0/prepared_stmt.groovy b/regression-test/suites/prepared_stmt_p0/prepared_stmt.groovy index a06e0e78cf2b98..a64bd017564522 100644 --- a/regression-test/suites/prepared_stmt_p0/prepared_stmt.groovy +++ b/regression-test/suites/prepared_stmt_p0/prepared_stmt.groovy @@ -24,7 +24,7 @@ suite("test_prepared_stmt", "nonConcurrent") { def password = context.config.jdbcPassword // def url = context.config.jdbcUrl + "&useServerPrepStmts=true&useCursorFetch=true" String url = getServerPrepareJdbcUrl(context.config.jdbcUrl, "regression_test_prepared_stmt_p0") - def result1 = connect(user=user, password=password, url=url) { + def result1 = connect(user, password, url) { sql """DROP TABLE IF EXISTS ${tableName} """ sql """ CREATE TABLE IF NOT EXISTS ${tableName} ( diff --git a/regression-test/suites/query_p0/system/test_partitions_schema.groovy b/regression-test/suites/query_p0/system/test_partitions_schema.groovy index 0cf83d67e66995..98b12c3705c777 100644 --- a/regression-test/suites/query_p0/system/test_partitions_schema.groovy +++ b/regression-test/suites/query_p0/system/test_partitions_schema.groovy @@ -184,17 +184,17 @@ suite("test_partitions_schema") { def tokens = context.config.jdbcUrl.split('/') def url=tokens[0] + "//" + tokens[2] + "/" + "information_schema" + "?" - connect(user=user, password='123abc!@#', url=url) { + connect(user, '123abc!@#', url) { order_qt_select_check_3 """select $listOfColum from information_schema.partitions where table_schema=\"${dbName}\"""" } sql "GRANT SELECT_PRIV ON ${dbName}.duplicate_table TO ${user}" - connect(user=user, password='123abc!@#', url=url) { + connect(user, '123abc!@#', url) { order_qt_select_check_4 """select TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,PARTITION_NAME from information_schema.partitions where table_schema=\"${dbName}\"""" } sql "REVOKE SELECT_PRIV ON ${dbName}.duplicate_table FROM ${user}" - connect(user=user, password='123abc!@#', url=url) { + connect(user, '123abc!@#', url) { order_qt_select_check_5 """select TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,PARTITION_NAME from information_schema.partitions where table_schema=\"${dbName}\"""" } diff --git a/regression-test/suites/query_p0/system/test_table_options.groovy b/regression-test/suites/query_p0/system/test_table_options.groovy index 9d2e99ab974413..fef118a82b280b 100644 --- a/regression-test/suites/query_p0/system/test_table_options.groovy +++ b/regression-test/suites/query_p0/system/test_table_options.groovy @@ -199,17 +199,17 @@ suite("test_table_options") { def tokens = context.config.jdbcUrl.split('/') def url=tokens[0] + "//" + tokens[2] + "/" + "information_schema" + "?" - connect(user=user, password='123abc!@#', url=url) { + connect(user, '123abc!@#', url) { qt_select_check_3 """select * from information_schema.table_options ORDER BY TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,TABLE_MODEL,TABLE_MODEL_KEY,DISTRIBUTE_KEY,DISTRIBUTE_TYPE,BUCKETS_NUM,PARTITION_NUM; """ } sql "GRANT SELECT_PRIV ON ${dbName}.duplicate_table TO ${user}" - connect(user=user, password='123abc!@#', url=url) { + connect(user, '123abc!@#', url) { qt_select_check_4 """select * from information_schema.table_options ORDER BY TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,TABLE_MODEL,TABLE_MODEL_KEY,DISTRIBUTE_KEY,DISTRIBUTE_TYPE,BUCKETS_NUM,PARTITION_NUM; """ } sql "REVOKE SELECT_PRIV ON ${dbName}.duplicate_table FROM ${user}" - connect(user=user, password='123abc!@#', url=url) { + connect(user, '123abc!@#', url) { qt_select_check_5 """select * from information_schema.table_options ORDER BY TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,TABLE_MODEL,TABLE_MODEL_KEY,DISTRIBUTE_KEY,DISTRIBUTE_TYPE,BUCKETS_NUM,PARTITION_NUM; """ } 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 3314975d689c0f..1861ae4d6280d6 100644 --- a/regression-test/suites/query_p0/system/test_table_properties.groovy +++ b/regression-test/suites/query_p0/system/test_table_properties.groovy @@ -105,17 +105,17 @@ suite("test_table_properties") { def tokens = context.config.jdbcUrl.split('/') def url=tokens[0] + "//" + tokens[2] + "/" + "information_schema" + "?" - connect(user=user, password='123abc!@#', url=url) { + connect(user, '123abc!@#', url) { 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) { + connect(user, '123abc!@#', url) { 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) { + connect(user, '123abc!@#', url) { 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""" } diff --git a/regression-test/suites/query_p0/test_row_policy.groovy b/regression-test/suites/query_p0/test_row_policy.groovy index 5866d89d96e6cd..371901704fbb1c 100644 --- a/regression-test/suites/query_p0/test_row_policy.groovy +++ b/regression-test/suites/query_p0/test_row_policy.groovy @@ -29,12 +29,12 @@ suite("test_row_policy") { sql """DROP ROW POLICY IF EXISTS policy_01 ON ${tableName} FOR ${user}""" sql """CREATE ROW POLICY IF NOT EXISTS policy_01 ON ${tableName} AS restrictive TO ${user} USING(id=1)""" - connect(user=user, password='123456', url=url) { + connect(user, '123456', url) { sql "set enable_nereids_planner = false" sql "SELECT * FROM ${tableName} a JOIN ${tableName} b ON a.id = b.id" } - connect(user=user, password='123456', url=url) { + connect(user, '123456', url) { sql "set enable_nereids_planner = true" sql "set enable_fallback_to_original_planner = false" sql "SELECT * FROM ${tableName} a JOIN ${tableName} b ON a.id = b.id" diff --git a/regression-test/suites/schema_change_p0/test_alter_table_column_rename.groovy b/regression-test/suites/schema_change_p0/test_alter_table_column_rename.groovy index 3650b93ccbb282..f2c2ae657913b3 100644 --- a/regression-test/suites/schema_change_p0/test_alter_table_column_rename.groovy +++ b/regression-test/suites/schema_change_p0/test_alter_table_column_rename.groovy @@ -39,7 +39,7 @@ suite("test_alter_table_column_rename") { for (row : result) { //println row String jdbcUrl = "jdbc:mysql://" + row[1] + ":" + row[4] - def result1 = connect(user = 'root', password = '', jdbcUrl) { + def result1 = connect('root', '', jdbcUrl) { sql """ SYNC """ sql """ use regression_test_schema_change_p0 """ sql """ select * from ${tbName} where new_col = 2 """ diff --git a/regression-test/suites/show_p0/test_show_backends.groovy b/regression-test/suites/show_p0/test_show_backends.groovy index 0c41cd68ec7ac2..7a503f09b3282b 100644 --- a/regression-test/suites/show_p0/test_show_backends.groovy +++ b/regression-test/suites/show_p0/test_show_backends.groovy @@ -23,11 +23,11 @@ suite("test_show_backends", "show") { sql """grant ADMIN_PRIV on *.*.* to test_show_backends_user1""" - def result1 = connect(user = 'test_show_backends_user1', password = '12345', url = context.config.jdbcUrl) { + def result1 = connect('test_show_backends_user1', '12345', context.config.jdbcUrl) { sql """ show backends """ } log.info(result1.toString()) - def result2 = connect(user = 'test_show_backends_user1', password = '12345', url = context.config.jdbcUrl) { + def result2 = connect('test_show_backends_user1', '12345', context.config.jdbcUrl) { sql """ show proc '/backends' """ } log.info(result2.toString()) diff --git a/regression-test/suites/show_p0/test_show_statistic_proc.groovy b/regression-test/suites/show_p0/test_show_statistic_proc.groovy index 50825868789bb4..4a37b92fc0f172 100644 --- a/regression-test/suites/show_p0/test_show_statistic_proc.groovy +++ b/regression-test/suites/show_p0/test_show_statistic_proc.groovy @@ -26,10 +26,10 @@ suite("test_show_statistic_proc", "nonConcurrent") { sql """drop database if exists test_statistic_proc_db""" sql """create database test_statistic_proc_db""" - def result1 = connect(user = 'test_show_statistic_proc_user1', password = '12345', url = context.config.jdbcUrl) { + def result1 = connect('test_show_statistic_proc_user1', '12345', context.config.jdbcUrl) { sql """ show proc '/statistic' """ } - def result2 = connect(user = 'test_show_statistic_proc_user1', password = '12345', url = context.config.jdbcUrl) { + def result2 = connect('test_show_statistic_proc_user1', '12345', context.config.jdbcUrl) { sql """ show databases """ } assertEquals(result1.size(), result2.size()) diff --git a/regression-test/suites/statistics/test_analyze_mtmv.groovy b/regression-test/suites/statistics/test_analyze_mtmv.groovy index 98e76a7914ffab..c252affb97fd65 100644 --- a/regression-test/suites/statistics/test_analyze_mtmv.groovy +++ b/regression-test/suites/statistics/test_analyze_mtmv.groovy @@ -31,7 +31,7 @@ suite("test_analyze_mtmv") { def tokens = context.config.jdbcUrl.split('/') def url=tokens[0] + "//" + host + ":" + port logger.info("Master url is " + url) - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url) { + connect(context.config.jdbcUser, context.config.jdbcPassword, url) { sql """use ${db}""" result = sql """show frontends;""" logger.info("show frontends result master: " + result) diff --git a/regression-test/suites/statistics/test_analyze_mv.groovy b/regression-test/suites/statistics/test_analyze_mv.groovy index f52295469db499..06a5de85befd14 100644 --- a/regression-test/suites/statistics/test_analyze_mv.groovy +++ b/regression-test/suites/statistics/test_analyze_mv.groovy @@ -49,7 +49,7 @@ suite("test_analyze_mv") { def tokens = context.config.jdbcUrl.split('/') def url=tokens[0] + "//" + host + ":" + port logger.info("Master url is " + url) - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url) { + connect(context.config.jdbcUser, context.config.jdbcPassword, url) { sql """use ${db}""" result = sql """show frontends;""" logger.info("show frontends result master: " + result) diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_mix_partial_update.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_mix_partial_update.groovy index 35b5e0cce81177..8e82e051562333 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_mix_partial_update.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_mix_partial_update.groovy @@ -23,7 +23,7 @@ suite('test_mix_partial_update') { for (def use_row_store : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" sql "set enable_nereids_planner=true" diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_new_partial_update_delete.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_new_partial_update_delete.groovy index 2157388c0f7ddc..154f5521727491 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_new_partial_update_delete.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_new_partial_update_delete.groovy @@ -23,7 +23,7 @@ suite('test_new_partial_update_delete') { for (def use_row_store : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" sql "set enable_nereids_planner=true" @@ -257,7 +257,7 @@ suite('test_new_partial_update_delete') { } } - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" try { def tableAggName = "test_new_partial_update_agg_delete" diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update.groovy index 9643f9501ed48a..5e91790baf932a 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update.groovy @@ -24,7 +24,7 @@ suite("test_primary_key_partial_update", "p0") { for (def use_row_store : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" def tableName = "test_primary_key_partial_update" // create table diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_2pc_schema_change.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_2pc_schema_change.groovy index 6f000786fa9cc1..9b323dec19c7a8 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_2pc_schema_change.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_2pc_schema_change.groovy @@ -42,7 +42,7 @@ suite("test_partial_update_2pc_schema_change", "p0") { for (def use_row_store : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" def tableName = "test_partial_update_2pc_schema_change" diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_after_delete.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_after_delete.groovy index 97a76567688b1e..7657318010227c 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_after_delete.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_after_delete.groovy @@ -23,7 +23,7 @@ suite("test_partial_update_after_delete", "p0") { for (def use_row_store : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" sql "SET enable_nereids_planner=true;" sql "SET enable_fallback_to_original_planner=false;" diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_auto_inc.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_auto_inc.groovy index 13d6fd269069d9..3405623ee2083e 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_auto_inc.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_auto_inc.groovy @@ -21,7 +21,7 @@ suite("test_partial_update_auto_inc") { for (def use_nereids_planner : [false, true]) { logger.info("current params: use_nereids_planner: ${use_nereids_planner}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect(context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" if (use_nereids_planner) { diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_case_insensitivity.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_case_insensitivity.groovy index c1828343f07e58..2d77df2ab45eb7 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_case_insensitivity.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_case_insensitivity.groovy @@ -23,7 +23,7 @@ suite("test_partial_update_case_insensitivity", "p0") { for (def use_row_store : [false, true]) { for (def use_nereids_planner : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}, use_nereids_planner: ${use_nereids_planner}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect(context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" if (use_nereids_planner) { sql """ set enable_nereids_dml = true; """ diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_complex_type.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_complex_type.groovy index ba13bfbeef9b13..ebd32310fd2b45 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_complex_type.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_complex_type.groovy @@ -24,7 +24,7 @@ suite("test_primary_key_partial_update_complex_type", "p0") { for (def use_row_store : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" def tableName = "test_primary_key_partial_update_complex_type" // NOTE: diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_complex_type_schema_change.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_complex_type_schema_change.groovy index 6604ced55bcad7..43e6a2a3f9de13 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_complex_type_schema_change.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_complex_type_schema_change.groovy @@ -24,7 +24,7 @@ suite("test_primary_key_partial_update_complex_type_schema_change", "p0") { for (def use_row_store : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" def tableName = "test_primary_key_partial_update_complex_type_schema_change" // create table diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_default_value.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_default_value.groovy index cacdc5113fd4fa..28d1d0ed42d556 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_default_value.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_default_value.groovy @@ -24,7 +24,7 @@ suite("test_primary_key_partial_update_default_value", "p0") { for (def use_row_store : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" def tableName = "test_primary_key_partial_update_default_value" diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_delete.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_delete.groovy index 66fc6b7e2fa457..31df2ce9032cb4 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_delete.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_delete.groovy @@ -23,7 +23,7 @@ suite('test_partial_update_delete') { for (def use_nereids : [true, false]) { for (def use_row_store : [false, true]) { logger.info("current params: use_nereids: ${use_nereids}, use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect(context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" if (use_nereids) { sql "set enable_nereids_planner=true" diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_delete_sign.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_delete_sign.groovy index f2d93d9d715413..c6ac7f501f1bb1 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_delete_sign.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_delete_sign.groovy @@ -23,7 +23,7 @@ suite('test_partial_update_delete_sign') { for (def use_row_store : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" def tableName1 = "test_partial_update_delete_sign1" diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_insert_light_schema_change.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_insert_light_schema_change.groovy index 4d09757122de4a..a11be42f38b3b5 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_insert_light_schema_change.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_insert_light_schema_change.groovy @@ -24,7 +24,7 @@ suite("test_partial_update_insert_light_schema_change", "p0") { for (def use_row_store : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" // ===== light schema change ===== diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_insert_seq_col.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_insert_seq_col.groovy index 4e00407f04eb1c..eb7ba31f49c8bc 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_insert_seq_col.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_insert_seq_col.groovy @@ -24,7 +24,7 @@ suite("test_partial_update_native_insert_seq_col", "p0") { for (def use_row_store : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" sql "sync;" diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_merge_type.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_merge_type.groovy index f1919e8b066a80..dfaa9aca3068f0 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_merge_type.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_merge_type.groovy @@ -34,7 +34,7 @@ suite("test_partial_update_merge_type", "p0") { for (def use_row_store : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" def tableName = "test_partial_update_merge_type" diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_native_insert_stmt.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_native_insert_stmt.groovy index f5b7a937bcd15b..e2737e1573acdf 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_native_insert_stmt.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_native_insert_stmt.groovy @@ -24,7 +24,7 @@ suite("test_partial_update_native_insert_stmt", "p0") { for (def use_row_store : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" sql "sync;" diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_native_insert_stmt_complex.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_native_insert_stmt_complex.groovy index 975f62a685fe44..8e6ef84c86b8e0 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_native_insert_stmt_complex.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_native_insert_stmt_complex.groovy @@ -23,7 +23,7 @@ suite("test_partial_update_native_insert_stmt_complex", "p0") { for (def use_row_store : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" sql "sync;" diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_only_keys.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_only_keys.groovy index 1f56643b6e8a93..328158324aa550 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_only_keys.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_only_keys.groovy @@ -24,7 +24,7 @@ suite("test_partial_update_only_keys", "p0") { for (def use_row_store : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" def tableName = "test_primary_key_partial_update" sql """ DROP TABLE IF EXISTS ${tableName} force""" diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_seq_col.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_seq_col.groovy index 111037ae18f6b8..ef71fa67070007 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_seq_col.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_seq_col.groovy @@ -24,7 +24,7 @@ suite("test_primary_key_partial_update_seq_col", "p0") { for (def use_row_store : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" def tableName = "test_primary_key_partial_update_seq_col" diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_seq_col_delete.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_seq_col_delete.groovy index dca646948b4951..4c3786bba114a1 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_seq_col_delete.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_seq_col_delete.groovy @@ -24,7 +24,7 @@ suite("test_primary_key_partial_update_seq_col_delete", "p0") { for (def use_row_store : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" def tableName = "test_primary_key_partial_update_seq_col_delete" diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_seq_type.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_seq_type.groovy index d7d55725df6a62..b3fbd2c85c3dce 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_seq_type.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_seq_type.groovy @@ -24,7 +24,7 @@ suite("test_primary_key_partial_update_seq_type", "p0") { for (def use_row_store : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" def tableName = "test_primary_key_partial_update_seq_type" diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_seq_type_delete.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_seq_type_delete.groovy index 6ad60e0cd75f31..c1409d28150d46 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_seq_type_delete.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_seq_type_delete.groovy @@ -24,7 +24,7 @@ suite("test_primary_key_partial_update_seq_type_delete", "p0") { for (def use_row_store : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" def tableName = "test_primary_key_partial_update_seq_type_delete" diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_strict_mode.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_strict_mode.groovy index fe47a5ebc89450..c4d26baee8f481 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_strict_mode.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_strict_mode.groovy @@ -24,7 +24,7 @@ suite("test_partial_update_strict_mode", "p0") { for (def use_row_store : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" def tableName = "test_partial_update_strict_mode" diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_upsert.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_upsert.groovy index 5e4a02f5407904..ad2e4b2f4ff229 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_upsert.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_upsert.groovy @@ -24,7 +24,7 @@ suite("test_partial_update_upsert", "p0") { for (def use_row_store : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" def tableName = "test_partial_update_upsert1" diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_with_delete_stmt.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_with_delete_stmt.groovy index b853ce2d328295..6dfd3bad4a5026 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_with_delete_stmt.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_with_delete_stmt.groovy @@ -24,7 +24,7 @@ suite("test_primary_key_partial_update_with_delete_stmt", "p0") { for (def use_row_store : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" def tableName = "test_primary_key_partial_update_with_delete_stmt" diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_with_update_stmt.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_with_update_stmt.groovy index c04c535c080d88..d597ff968ea6c0 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_with_update_stmt.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_with_update_stmt.groovy @@ -24,7 +24,7 @@ suite("test_primary_key_partial_update_with_update_stmt", "p0") { for (def use_row_store : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" def tableName = "test_primary_key_partial_update_with_update_stmt" diff --git a/regression-test/suites/unique_with_mow_p0/test_delete_sign.groovy b/regression-test/suites/unique_with_mow_p0/test_delete_sign.groovy index c067b757c091a2..94564b3409179e 100644 --- a/regression-test/suites/unique_with_mow_p0/test_delete_sign.groovy +++ b/regression-test/suites/unique_with_mow_p0/test_delete_sign.groovy @@ -24,7 +24,7 @@ suite("test_delete_sign", "p0") { for (def use_row_store : [false, true]) { logger.info("current params: use_row_store: ${use_row_store}") - connect(user = context.config.jdbcUser, password = context.config.jdbcPassword, url = context.config.jdbcUrl) { + connect( context.config.jdbcUser, context.config.jdbcPassword, context.config.jdbcUrl) { sql "use ${db};" def tableName = "test_delete_sign" // test delete sigin X sequence column diff --git a/regression-test/suites/variant_p0/variant_with_rowstore.groovy b/regression-test/suites/variant_p0/variant_with_rowstore.groovy index 87724f2c9e8434..2c9c1792ea1947 100644 --- a/regression-test/suites/variant_p0/variant_with_rowstore.groovy +++ b/regression-test/suites/variant_p0/variant_with_rowstore.groovy @@ -93,7 +93,7 @@ suite("regression_test_variant_rowstore", "variant_type"){ properties("replication_num" = "1", "disable_auto_compaction" = "false", "store_row_column" = "true", "enable_unique_key_merge_on_write" = "true"); """ sql """insert into ${table_name} select k, cast(v as string), cast(v as string) from var_rowstore""" - def result1 = connect(user=user, password=password, url=prepare_url) { + def result1 = connect(user, password, prepare_url) { def stmt = prepareStatement "select * from var_rs_pq where k = ?" assertEquals(stmt.class, com.mysql.cj.jdbc.ServerPreparedStatement); stmt.setInt(1, -3) diff --git a/regression-test/suites/workload_manager_p0/test_curd_wlg.groovy b/regression-test/suites/workload_manager_p0/test_curd_wlg.groovy index 43bffe614138e8..03ce18e1751e44 100644 --- a/regression-test/suites/workload_manager_p0/test_curd_wlg.groovy +++ b/regression-test/suites/workload_manager_p0/test_curd_wlg.groovy @@ -324,11 +324,11 @@ suite("test_crud_wlg") { sql """drop user if exists test_wlg_user""" sql "CREATE USER 'test_wlg_user'@'%' IDENTIFIED BY '12345';" sql """grant SELECT_PRIV on *.*.* to test_wlg_user;""" - connect(user = 'test_wlg_user', password = '12345', url = context.config.jdbcUrl) { + connect('test_wlg_user', '12345', context.config.jdbcUrl) { sql """ select count(1) from information_schema.backend_active_tasks; """ } - connect(user = 'test_wlg_user', password = '12345', url = context.config.jdbcUrl) { + connect('test_wlg_user', '12345', context.config.jdbcUrl) { sql """ set workload_group = test_group; """ test { sql """ select count(1) from information_schema.backend_active_tasks; """ @@ -338,7 +338,7 @@ suite("test_crud_wlg") { sql "GRANT USAGE_PRIV ON WORKLOAD GROUP 'test_group' TO 'test_wlg_user'@'%';" - connect(user = 'test_wlg_user', password = '12345', url = context.config.jdbcUrl) { + connect('test_wlg_user', '12345', context.config.jdbcUrl) { sql """ set workload_group = test_group; """ sql """ select count(1) from information_schema.backend_active_tasks; """ } @@ -707,7 +707,7 @@ suite("test_crud_wlg") { //4 test row filter sql "create user test_wg_priv_user2" sql "grant SELECT_PRIV on *.*.* to test_wg_priv_user2" - connect(user = 'test_wg_priv_user2', password = '', url = context.config.jdbcUrl) { + connect('test_wg_priv_user2', '', context.config.jdbcUrl) { qt_select_wgp_11 "select GRANTEE,WORKLOAD_GROUP_NAME,PRIVILEGE_TYPE,IS_GRANTABLE from information_schema.workload_group_privileges where grantee like '%test_wg_priv%' order by GRANTEE,WORKLOAD_GROUP_NAME,PRIVILEGE_TYPE,IS_GRANTABLE; " } diff --git a/regression-test/suites/workload_manager_p0/test_resource_tag.groovy b/regression-test/suites/workload_manager_p0/test_resource_tag.groovy index d6557645eb8759..529aba390b7605 100644 --- a/regression-test/suites/workload_manager_p0/test_resource_tag.groovy +++ b/regression-test/suites/workload_manager_p0/test_resource_tag.groovy @@ -29,7 +29,7 @@ suite("test_resource_tag") { } // test query - connect(user = 'test_rg', password = '', url = context.config.jdbcUrl) { + connect('test_rg', '', context.config.jdbcUrl) { sql "drop table if exists test_skip_rg_bad_replica_tab;" sql """ CREATE TABLE test_skip_rg_bad_replica_tab @@ -55,7 +55,7 @@ suite("test_resource_tag") { } sql "set property for test_rg 'allow_resource_tag_downgrade' = 'true';" - connect(user = 'test_rg', password = '', url = context.config.jdbcUrl) { + connect('test_rg', '', context.config.jdbcUrl) { sql "select count(1) as t2 from test_skip_rg_bad_replica_tab;" sql "drop table test_skip_rg_bad_replica_tab"; } diff --git a/regression-test/suites/workload_manager_p0/test_workload_sched_policy.groovy b/regression-test/suites/workload_manager_p0/test_workload_sched_policy.groovy index 2536b06ce7a5e5..deceb5d347908f 100644 --- a/regression-test/suites/workload_manager_p0/test_workload_sched_policy.groovy +++ b/regression-test/suites/workload_manager_p0/test_workload_sched_policy.groovy @@ -160,7 +160,7 @@ suite("test_workload_sched_policy") { sql "create workload policy test_set_var_policy conditions(username='test_workload_sched_user')" + "actions(set_session_variable 'workload_group=test_set_session_wg');" - def result1 = connect(user = 'test_workload_sched_user', password = '12345', url = context.config.jdbcUrl) { + def result1 = connect('test_workload_sched_user', '12345', context.config.jdbcUrl) { logger.info("begin sleep 15s to wait") Thread.sleep(15000) sql "show variables like 'workload_group';" @@ -171,7 +171,7 @@ suite("test_workload_sched_policy") { // 2 create test_set_var_policy2 with higher priority sql "create workload policy test_set_var_policy2 conditions(username='test_workload_sched_user') " + "actions(set_session_variable 'workload_group=test_set_session_wg2') properties('priority'='10');" - def result2 = connect(user = 'test_workload_sched_user', password = '12345', url = context.config.jdbcUrl) { + def result2 = connect('test_workload_sched_user', '12345', context.config.jdbcUrl) { Thread.sleep(3000) sql "show variables like 'workload_group';" } @@ -180,7 +180,7 @@ suite("test_workload_sched_policy") { // 3 disable test_set_var_policy2 sql "alter workload policy test_set_var_policy2 properties('enabled'='false');" - def result3 = connect(user = 'test_workload_sched_user', password = '12345', url = context.config.jdbcUrl) { + def result3 = connect('test_workload_sched_user', '12345', context.config.jdbcUrl) { Thread.sleep(3000) sql "show variables like 'workload_group';" } @@ -245,7 +245,7 @@ suite("test_workload_sched_policy") { def curTime = System.currentTimeMillis() def totalTime = 30 * 60 * 1000 // 30min - connect(user = 'test_policy_user', password = '12345', url = context.config.jdbcUrl) { + connect('test_policy_user', '12345', context.config.jdbcUrl) { sql "set workload_group=policy_group" boolean flag = false long lastTime = System.currentTimeMillis() @@ -253,13 +253,13 @@ suite("test_workload_sched_policy") { while (curTime - startTime <= totalTime) { if (curTime - lastTime > 20000) { if (flag) { - connect(user = 'root', password = '', url = context.config.jdbcUrl) { + connect('root', '', context.config.jdbcUrl) { sql "alter workload policy test_cancel_query_policy properties('workload_group'='policy_group2');" sql "alter workload policy test_cancel_query_policy2 properties('workload_group'='policy_group');" } flag = false } else { - connect(user = 'root', password = '', url = context.config.jdbcUrl) { + connect('root', '', context.config.jdbcUrl) { sql "alter workload policy test_cancel_query_policy properties('workload_group'='policy_group');" sql "alter workload policy test_cancel_query_policy2 properties('workload_group'='policy_group2');" }