summaryrefslogtreecommitdiff
path: root/myisam/mi_search.c
diff options
context:
space:
mode:
Diffstat (limited to 'myisam/mi_search.c')
-rw-r--r--myisam/mi_search.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/myisam/mi_search.c b/myisam/mi_search.c
index 24f5db1401d..bc8be9c2732 100644
--- a/myisam/mi_search.c
+++ b/myisam/mi_search.c
@@ -451,9 +451,8 @@ int _mi_prefix_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
/* We have to compare k and vseg as if they where space extended */
for (end=vseg + (len-cmplen) ;
vseg < end && *vseg == (uchar) ' ';
- vseg++) ;
- if (vseg == end)
- goto cmp_rest; /* should never happen */
+ vseg++, matched++) ;
+ DBUG_ASSERT(vseg < end);
if (*vseg > (uchar) ' ')
{