do not crash on myrg_rprev/myrg_rnext if no current table

(as when previous myrg_rkey failed, e.g. found nothing)
This commit is contained in:
unknown 2002-07-04 12:25:13 +02:00
parent af68d3de87
commit 88012698db
2 changed files with 6 additions and 0 deletions

View File

@ -25,6 +25,9 @@ int myrg_rnext(MYRG_INFO *info, byte *buf, int inx)
int err;
MI_INFO *mi;
if (!info->current_table)
return (HA_ERR_KEY_NOT_FOUND);
/* at first, do rnext for the table found before */
if ((err=mi_rnext(info->current_table->table,NULL,inx)))
{

View File

@ -25,6 +25,9 @@ int myrg_rprev(MYRG_INFO *info, byte *buf, int inx)
int err;
MI_INFO *mi;
if (!info->current_table)
return (HA_ERR_KEY_NOT_FOUND);
/* at first, do rprev for the table found before */
if ((err=mi_rprev(info->current_table->table,NULL,inx)))
{