diff options
author | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2010-11-22 11:50:20 +0100 |
---|---|---|
committer | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2010-11-22 11:50:20 +0100 |
commit | 6cae1bb971e52b9acffc64fad2f514983a0ea291 (patch) | |
tree | ff179b1ea8c4dd03c20ccd8c8cd669a92afde944 /sql/mdl.h | |
parent | 4901b37e8dfdf5836dc9862176a8c86014a55cdb (diff) | |
download | mariadb-git-6cae1bb971e52b9acffc64fad2f514983a0ea291.tar.gz |
This patch fixes the bug which caused the funcs_1.storedproc
test case to give valgrind warnings.
The problem was that when comparing two MDL key buffers using
memcmp(), 1 was added to the buffer length. However, this was
no longer needed since the buffer length already included the
'\0' terminator.
Diffstat (limited to 'sql/mdl.h')
-rw-r--r-- | sql/mdl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/mdl.h b/sql/mdl.h index ff30746e739..4a9397fe215 100644 --- a/sql/mdl.h +++ b/sql/mdl.h @@ -252,7 +252,7 @@ public: character set is utf-8, we can safely assume that no character starts with a zero byte. */ - return memcmp(m_ptr, rhs->m_ptr, min(m_length, rhs->m_length)+1); + return memcmp(m_ptr, rhs->m_ptr, min(m_length, rhs->m_length)); } MDL_key(const MDL_key *rhs) |