Skip to content
Permalink
Browse files

Fix debug assert post MDEV-10306

tmp variable now points to str->ptr() buffer, not tmp_value buffer.
Comparing pointers otherwise can lead to false assertion errors as we
don't know where buffers are allocated in respect to each other.
  • Loading branch information...
cvicentiu committed Jun 29, 2017
1 parent a02ba9c commit 5c89f23b4591db0c60eed34caaa28e1ba67bea63
Showing with 1 addition and 1 deletion.
  1. +1 −1 sql/item_strfunc.cc
@@ -1171,7 +1171,7 @@ String *Item_func_reverse::val_str(String *str)
if ((l= my_ismbchar(res->charset(),ptr,end)))
{
tmp-= l;
DBUG_ASSERT(tmp >= tmp_value.ptr());
DBUG_ASSERT(tmp >= str->ptr());
memcpy(tmp,ptr,l);
ptr+= l;
}

0 comments on commit 5c89f23

Please sign in to comment.
You can’t perform that action at this time.