summaryrefslogtreecommitdiff
path: root/myisammrg/myrg_rnext.c
diff options
context:
space:
mode:
authorunknown <serg@sergbook.mysql.com>2002-07-04 12:25:13 +0200
committerunknown <serg@sergbook.mysql.com>2002-07-04 12:25:13 +0200
commit88012698db7988beba4ad39be5d68362c9f0d92c (patch)
tree636d4ee01a5844013a180612e8c8c5387ca5f3ad /myisammrg/myrg_rnext.c
parentaf68d3de879a94b2be47ed5e335d5c072692ea2b (diff)
downloadmariadb-git-88012698db7988beba4ad39be5d68362c9f0d92c.tar.gz
do not crash on myrg_rprev/myrg_rnext if no current table
(as when previous myrg_rkey failed, e.g. found nothing)
Diffstat (limited to 'myisammrg/myrg_rnext.c')
-rw-r--r--myisammrg/myrg_rnext.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/myisammrg/myrg_rnext.c b/myisammrg/myrg_rnext.c
index 5a3fbdfb299..703ca29632b 100644
--- a/myisammrg/myrg_rnext.c
+++ b/myisammrg/myrg_rnext.c
@@ -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)))
{