Commit 88012698 authored by unknown's avatar unknown

do not crash on myrg_rprev/myrg_rnext if no current table

(as when previous myrg_rkey failed, e.g. found nothing)

parent af68d3de
......@@ -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)))
{
......
......@@ -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)))
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment