summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-08-30 16:12:53 +0200
committerunknown <serg@serg.mylan>2004-08-30 16:12:53 +0200
commit798218747683359197e517513d367a57f67f0326 (patch)
tree2b89c53b35971692a295d551d515400f65255c72 /myisam
parentd8f416a26c1c69b1a1a7130b0d31a7e92b825408 (diff)
downloadmariadb-git-798218747683359197e517513d367a57f67f0326.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) ' ')
{