summaryrefslogtreecommitdiff
path: root/sql/mdl.h
diff options
context:
space:
mode:
authorJon Olav Hauglid <jon.hauglid@oracle.com>2010-11-22 11:50:20 +0100
committerJon Olav Hauglid <jon.hauglid@oracle.com>2010-11-22 11:50:20 +0100
commit6cae1bb971e52b9acffc64fad2f514983a0ea291 (patch)
treeff179b1ea8c4dd03c20ccd8c8cd669a92afde944 /sql/mdl.h
parent4901b37e8dfdf5836dc9862176a8c86014a55cdb (diff)
downloadmariadb-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.h2
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)