Merging from mysql-5.1 to mysql-5.5.
This commit is contained in:
commit
e231e7f8eb
@ -4655,7 +4655,19 @@ int handler::read_range_first(const key_range *start_key,
|
|||||||
? HA_ERR_END_OF_FILE
|
? HA_ERR_END_OF_FILE
|
||||||
: result);
|
: 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -4687,7 +4699,20 @@ int handler::read_range_next()
|
|||||||
result= index_next(table->record[0]);
|
result= index_next(table->record[0]);
|
||||||
if (result)
|
if (result)
|
||||||
DBUG_RETURN(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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user