mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge MariaDB 5.1.66 -> 5.2 -> 5.3
This commit is contained in:
@@ -4488,7 +4488,20 @@ int handler::read_range_first(const key_range *start_key,
|
||||
DBUG_RETURN((result == HA_ERR_KEY_NOT_FOUND)
|
||||
? HA_ERR_END_OF_FILE
|
||||
: result);
|
||||
DBUG_RETURN (compare_key(end_range) <= 0 ? 0 : HA_ERR_END_OF_FILE);
|
||||
|
||||
if (compare_key(end_range) <= 0)
|
||||
{
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
The last read row does not fall in the range. So request
|
||||
storage engine to release row lock if possible.
|
||||
*/
|
||||
unlock_row();
|
||||
DBUG_RETURN(HA_ERR_END_OF_FILE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4520,7 +4533,20 @@ int handler::read_range_next()
|
||||
result= ha_index_next(table->record[0]);
|
||||
if (result)
|
||||
DBUG_RETURN(result);
|
||||
DBUG_RETURN(compare_key(end_range) <= 0 ? 0 : HA_ERR_END_OF_FILE);
|
||||
|
||||
if (compare_key(end_range) <= 0)
|
||||
{
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
The last read row does not fall in the range. So request
|
||||
storage engine to release row lock if possible.
|
||||
*/
|
||||
unlock_row();
|
||||
DBUG_RETURN(HA_ERR_END_OF_FILE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user