#At file:///home/alik/MySQL/bzr/00.build/mysql-trunk-bugfixing/ based on revid:sven.sandberg@stripped
3461 Alexander Nozdrin 2010-12-21
A patch for Bug#59060 (Valgrind warning in Protocol_text::store()).
We should not assume to have zero-terminated strings.
modified:
sql/protocol.cc
=== modified file 'sql/protocol.cc'
--- a/sql/protocol.cc 2010-11-18 16:34:56 +0000
+++ b/sql/protocol.cc 2010-12-21 12:22:50 +0000
@@ -983,8 +983,8 @@ bool Protocol_text::store(const char *fr
{
CHARSET_INFO *tocs= this->thd->variables.character_set_results;
#ifndef DBUG_OFF
- DBUG_PRINT("info", ("Protocol_text::store field %u (%u): %s", field_pos,
- field_count, (length == 0? "" : from)));
+ DBUG_PRINT("info", ("Protocol_text::store field %u (%u): %.*s", field_pos,
+ field_count, (int) length, (length == 0 ? "" : from)));
DBUG_ASSERT(field_pos < field_count);
DBUG_ASSERT(field_types == 0 ||
field_types[field_pos] == MYSQL_TYPE_DECIMAL ||
Attachment: [text/bzr-bundle] bzr/alexander.nozdrin@oracle.com-20101221122250-z6sx0hkva2rkavcy.bundle
| Thread |
|---|
| • bzr commit into mysql-trunk-bugfixing branch (alexander.nozdrin:3461)Bug#59060 | Alexander Nozdrin | 21 Dec |