Commit fcaba4f3 authored by Jon Olav Hauglid's avatar Jon Olav Hauglid

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.
parent 1c72d62c
...@@ -252,7 +252,7 @@ public: ...@@ -252,7 +252,7 @@ public:
character set is utf-8, we can safely assume that no character set is utf-8, we can safely assume that no
character starts with a zero byte. 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) MDL_key(const MDL_key *rhs)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment