Ensure that my_errno is set if tmp disk quota is reached

Storage engines generally expects that my_errno is set in case of errors
This commit is contained in:
Monty 2024-07-02 14:34:23 +03:00
parent 86770ada15
commit 63d70dcb16

View file

@ -3805,6 +3805,7 @@ static int temp_file_size_cb_func(struct tmp_file_tracking *track,
{ {
global_tmp_space_used-= size_change; global_tmp_space_used-= size_change;
error= EE_GLOBAL_TMP_SPACE_FULL; error= EE_GLOBAL_TMP_SPACE_FULL;
my_errno= ENOSPC;
goto exit; goto exit;
} }
if (thd->status_var.tmp_space_used + size_change > if (thd->status_var.tmp_space_used + size_change >
@ -3813,6 +3814,7 @@ static int temp_file_size_cb_func(struct tmp_file_tracking *track,
{ {
global_tmp_space_used-= size_change; global_tmp_space_used-= size_change;
error= EE_LOCAL_TMP_SPACE_FULL; error= EE_LOCAL_TMP_SPACE_FULL;
my_errno= ENOSPC;
goto exit; goto exit;
} }
set_if_bigger(global_status_var.max_tmp_space_used, cached_space); set_if_bigger(global_status_var.max_tmp_space_used, cached_space);