Details
-
Task
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
None
Description
A command like
SET @@GLOBAL.key_buffer_size=10000000000000000000; |
Cannot possibly succeed when a limited amount of free memory is available.
However, both optimized and debug builds will immediately commence executing the command and attempt memory allocation, thereby quickly and needlessly filling up all available memory, leading to OOM termination by the kernel of either this process or any other running on the server, and all consequences thereof.
This feature request for a simple pre-flight check. Pseudo code:
IF requested_alloc_amount > (free_mem * 1.3) THEN print_error AND do_not_execute_request;
|
ELSEIF requested_alloc_amount > (free_mem * 0.87) THEN print_warning AND execute_request;
|
ELSE execute_request;
|