From 770804ffdca82552516ac9e7892c955d61dee1f3 Mon Sep 17 00:00:00 2001 From: Arthur Passos Date: Fri, 16 Aug 2024 08:57:11 -0300 Subject: [PATCH] change default setting value to 100 --- src/Core/ServerSettings.h | 2 +- .../test_max_authentication_methods_per_user/test.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Core/ServerSettings.h b/src/Core/ServerSettings.h index 887beba4b13..29a45d23163 100644 --- a/src/Core/ServerSettings.h +++ b/src/Core/ServerSettings.h @@ -116,7 +116,7 @@ namespace DB M(UInt64, max_part_num_to_warn, 100000lu, "If the number of parts is greater than this value, the server will create a warning that will displayed to user.", 0) \ M(UInt64, max_table_num_to_throw, 0lu, "If number of tables is greater than this value, server will throw an exception. 0 means no limitation. View, remote tables, dictionary, system tables are not counted. Only count table in Atomic/Ordinary/Replicated/Lazy database engine.", 0) \ M(UInt64, max_database_num_to_throw, 0lu, "If number of databases is greater than this value, server will throw an exception. 0 means no limitation.", 0) \ - M(UInt64, max_authentication_methods_per_user, 256, "The maximum number of authentication methods a user can be created with or altered. Changing this setting does not affect existing users.", 0) \ + M(UInt64, max_authentication_methods_per_user, 100, "The maximum number of authentication methods a user can be created with or altered. Changing this setting does not affect existing users.", 0) \ M(UInt64, concurrent_threads_soft_limit_num, 0, "Sets how many concurrent thread can be allocated before applying CPU pressure. Zero means unlimited.", 0) \ M(UInt64, concurrent_threads_soft_limit_ratio_to_cores, 0, "Same as concurrent_threads_soft_limit_num, but with ratio to cores.", 0) \ \ diff --git a/tests/integration/test_max_authentication_methods_per_user/test.py b/tests/integration/test_max_authentication_methods_per_user/test.py index fb02ef73bf6..0142c7db746 100644 --- a/tests/integration/test_max_authentication_methods_per_user/test.py +++ b/tests/integration/test_max_authentication_methods_per_user/test.py @@ -76,13 +76,13 @@ def test_create_default_setting(started_cluster): expected_error = "User can not be created/updated because it exceeds the allowed quantity of authentication methods per user" query_exceeds = get_query_with_multiple_identified_with( - "CREATE", "u_max_authentication_methods", 257 + "CREATE", "u_max_authentication_methods", 101 ) assert expected_error in default_node.query_and_get_error(query_exceeds) query_not_exceeds = get_query_with_multiple_identified_with( - "CREATE", "u_max_authentication_methods", 256 + "CREATE", "u_max_authentication_methods", 100 ) assert expected_error not in default_node.query_and_get_answer_with_error( @@ -96,19 +96,19 @@ def test_alter_default_setting(started_cluster): default_node.query("CREATE USER u_max_authentication_methods IDENTIFIED BY '1'") query_add_exceeds = get_query_with_multiple_identified_with( - "ALTER", "u_max_authentication_methods", 256, "ADD" + "ALTER", "u_max_authentication_methods", 100, "ADD" ) assert expected_error in default_node.query_and_get_error(query_add_exceeds) query_replace_exceeds = get_query_with_multiple_identified_with( - "ALTER", "u_max_authentication_methods", 257 + "ALTER", "u_max_authentication_methods", 101 ) assert expected_error in default_node.query_and_get_error(query_replace_exceeds) query_add_not_exceeds = get_query_with_multiple_identified_with( - "ALTER", "u_max_authentication_methods", 1, "ADD" + "ALTER", "u_max_authentication_methods", 99, "ADD" ) assert expected_error not in default_node.query_and_get_answer_with_error( @@ -116,7 +116,7 @@ def test_alter_default_setting(started_cluster): ) query_replace_not_exceeds = get_query_with_multiple_identified_with( - "ALTER", "u_max_authentication_methods", 2 + "ALTER", "u_max_authentication_methods", 100 ) assert expected_error not in default_node.query_and_get_answer_with_error(