Server System Variables SET_VAR  Hint Applies Yes Type Integer Default Value 1024 Minimum Value 4 Maximum Value 8388608 Command-Line Format --max-sp-recursion-depth[=#] System Variable max_sp_recursion_depth Scope Global, Session Dynamic Yes SET_VAR  Hint Applies No Type Integer Default Value 0 Maximum Value 255 Command-Line Format --max-user-connections=# System Variable max_user_connections Scope Global, Session Dynamic Yes SET_VAR  Hint Applies No Type Integer Default Value 0 Minimum Value 0 835 • max_user_connections The number of times that any given stored procedure may be called recursively. The default value for this option is 0, which completely disables recursion in stored procedures. The maximum value is 255. Stored procedure recursion increases the demand on thread stack space. If you increase the value of max_sp_recursion_depth , it may be necessary to increase thread stack size by increasing the value of  thread_stack  at server startup. The number of bytes to use when sorting data values. The server uses only the first  max_sort_length bytes of each value and ignores the rest. Consequently, values that differ only after the first max_sort_length  bytes compare as equal for  GROUP BY ,  ORDER BY , and  DISTINCT  operations. Increasing the value of  max_sort_length  may require increasing the value of  sort_buffer_size  as well. For details, see Section 8.2.1.16, “ORDER BY Optimization” • max_sp_recursion_depth