Commit bfbdc273 authored by Sergei Golubchik's avatar Sergei Golubchik

my_errno can not be set to EE_ error numbers

EE_ numbers occupy the same range as OS Exxx errors and
my_errno is generally for OS errors. And for HA_ERR_ handler errors
which occupy a different range, so can be freely mixed with OS errors.
parent aebd1620
...@@ -88,7 +88,7 @@ static inline my_bool tmp_file_track(IO_CACHE *info, ulonglong file_size) ...@@ -88,7 +88,7 @@ static inline my_bool tmp_file_track(IO_CACHE *info, ulonglong file_size)
MY_TRACK_WITH_LIMIT)))) MY_TRACK_WITH_LIMIT))))
{ {
if (info->myflags & MY_WME) if (info->myflags & MY_WME)
my_error(my_errno, MYF(0)); my_error(error, MYF(0));
info->error= -1; info->error= -1;
return 1; return 1;
} }
......
...@@ -3804,7 +3804,7 @@ static int temp_file_size_cb_func(struct tmp_file_tracking *track, ...@@ -3804,7 +3804,7 @@ static int temp_file_size_cb_func(struct tmp_file_tracking *track,
global_max_tmp_space_usage) global_max_tmp_space_usage)
{ {
global_tmp_space_used-= size_change; global_tmp_space_used-= size_change;
error= my_errno= EE_GLOBAL_TMP_SPACE_FULL; error= EE_GLOBAL_TMP_SPACE_FULL;
goto exit; goto exit;
} }
if (thd->status_var.tmp_space_used + size_change > if (thd->status_var.tmp_space_used + size_change >
...@@ -3812,7 +3812,7 @@ static int temp_file_size_cb_func(struct tmp_file_tracking *track, ...@@ -3812,7 +3812,7 @@ static int temp_file_size_cb_func(struct tmp_file_tracking *track,
thd->variables.max_tmp_space_usage) thd->variables.max_tmp_space_usage)
{ {
global_tmp_space_used-= size_change; global_tmp_space_used-= size_change;
error= my_errno= EE_LOCAL_TMP_SPACE_FULL; error= EE_LOCAL_TMP_SPACE_FULL;
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);
......
...@@ -227,13 +227,13 @@ void _ma_set_fatal_error_with_share(MARIA_SHARE *share, int error) ...@@ -227,13 +227,13 @@ void _ma_set_fatal_error_with_share(MARIA_SHARE *share, int error)
int _ma_update_tmp_file_size(struct tmp_file_tracking *track, int _ma_update_tmp_file_size(struct tmp_file_tracking *track,
ulonglong file_size) ulonglong file_size)
{ {
int err;
if (track->file_size != file_size) if (track->file_size != file_size)
{ {
track->file_size= file_size; track->file_size= file_size;
if (update_tmp_file_size(track, 0)) if ((err= update_tmp_file_size(track, 0)))
{ {
my_errno= (HA_ERR_LOCAL_TMP_SPACE_FULL + my_errno= HA_ERR_LOCAL_TMP_SPACE_FULL + (err - EE_LOCAL_TMP_SPACE_FULL);
(my_errno - EE_LOCAL_TMP_SPACE_FULL));
return 1; return 1;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment