summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <vicentiu@mariadb.org>2017-06-29 21:27:05 +0300
committerVicențiu Ciorbaru <vicentiu@mariadb.org>2017-06-29 21:34:37 +0300
commit5c89f23b4591db0c60eed34caaa28e1ba67bea63 (patch)
tree013eb8a811879a0b7a77f406851c35c18b0248c7 /sql
parenta02ba9c1c96f8245b2fd5c8b555c74204af421e3 (diff)
downloadmariadb-git-5c89f23b4591db0c60eed34caaa28e1ba67bea63.tar.gz
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.
Diffstat (limited to 'sql')
-rw-r--r--sql/item_strfunc.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index f559677051b..22e13bf6c38 100644
--- a/sql/item_strfunc.cc
+++ b/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;
}