From 831adb1e5cf5d283a5a727b396ecf75a5b207699 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Tue, 30 Mar 2021 09:38:34 +1100 Subject: MDEV-17239 default max_recursive_iterations 4G -> 1000 A default 4G max_recursive_iterations allows users to far to easily exhaust CPU, memory and time for a incorrect query. Reduce this value down to 1000 consistent with Oracle MySQL's cte_max_recursion_depth. --- sql/sys_vars.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql') diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 8b73484cb8a..b72d4a3c358 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -2457,7 +2457,7 @@ static Sys_var_ulong Sys_max_recursive_iterations( "max_recursive_iterations", "Maximum number of iterations when executing recursive queries", SESSION_VAR(max_recursive_iterations), CMD_LINE(OPT_ARG), - VALID_RANGE(0, UINT_MAX), DEFAULT(UINT_MAX), BLOCK_SIZE(1)); + VALID_RANGE(0, UINT_MAX), DEFAULT(1000), BLOCK_SIZE(1)); static Sys_var_ulong Sys_max_sort_length( "max_sort_length", -- cgit v1.2.1