1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug #6748 heap_rfirst() doesn't work (and never did!)

range for BETWEEN typo fixed
This commit is contained in:
serg@serg.mylan
2004-11-22 14:53:18 +01:00
parent 4e52cc2ded
commit 41c33c29a3
7 changed files with 26 additions and 5 deletions

View File

@ -953,8 +953,10 @@ int handler::read_first_row(byte * buf, uint primary_key)
/*
If there is very few deleted rows in the table, find the first row by
scanning the table.
TODO remove the test for HA_READ_ORDER
*/
if (deleted < 10 || primary_key >= MAX_KEY)
if (deleted < 10 || primary_key >= MAX_KEY ||
!(index_flags(primary_key, 0, 0) & HA_READ_ORDER))
{
(void) ha_rnd_init(1);
while ((error= rnd_next(buf)) == HA_ERR_RECORD_DELETED) ;