summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorserg@serg.mylan <>2004-08-30 16:12:53 +0200
committerserg@serg.mylan <>2004-08-30 16:12:53 +0200
commit994d648dda66a1f35daefc3989648a0966894815 (patch)
tree2b89c53b35971692a295d551d515400f65255c72 /myisam
parentb60713c0339c951aed48343c88d996921d2928f4 (diff)
downloadmariadb-git-994d648dda66a1f35daefc3989648a0966894815.tar.gz
space-stripping in _mi_prefix_search: BUG#5284
Diffstat (limited to 'myisam')
-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) ' ')
{