mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge with bugfix
sql/multi_range_read.cc: Added printing of error if something goes wrong in get_next() (Not critical for this bug fix, but this was something that I noticed while testing and found missing) storage/myisam/mi_rkey.c: Fixed wrong error number in mi_yield_and_check_if_killed()
This commit is contained in:
@ -316,6 +316,8 @@ int Mrr_simple_index_reader::get_next(char **range_info)
|
||||
!file->mrr_funcs.skip_index_tuple(file->mrr_iter, curr_range->ptr))
|
||||
break;
|
||||
}
|
||||
if (res && res != HA_ERR_END_OF_FILE && res != HA_ERR_KEY_NOT_FOUND)
|
||||
file->print_error(res, MYF(0)); // Fatal error
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -333,7 +335,7 @@ int Mrr_simple_index_reader::get_next(char **range_info)
|
||||
|
||||
@retval 0 OK, next record was successfully read
|
||||
@retval HA_ERR_END_OF_FILE End of records
|
||||
@retval Other Some other error
|
||||
@retval Other Some other error; Error is printed
|
||||
*/
|
||||
|
||||
int Mrr_ordered_index_reader::get_next(char **range_info)
|
||||
@ -349,7 +351,7 @@ int Mrr_ordered_index_reader::get_next(char **range_info)
|
||||
{
|
||||
if ((res != HA_ERR_KEY_NOT_FOUND && res != HA_ERR_END_OF_FILE))
|
||||
DBUG_RETURN(res); /* Some fatal error */
|
||||
|
||||
|
||||
if (key_buffer->is_empty())
|
||||
{
|
||||
DBUG_RETURN(HA_ERR_END_OF_FILE);
|
||||
@ -902,7 +904,7 @@ error:
|
||||
close_second_handler();
|
||||
/* Safety, not really needed but: */
|
||||
strategy= NULL;
|
||||
DBUG_RETURN(1);
|
||||
DBUG_RETURN(res);
|
||||
|
||||
use_default_impl:
|
||||
DBUG_ASSERT(primary_file->inited == handler::INDEX);
|
||||
|
Reference in New Issue
Block a user