From: Alexander Nozdrin Date: December 21 2010 12:24pm Subject: bzr push into mysql-trunk-bugfixing branch (alexander.nozdrin:3461 to 3462) Bug#59060 List-Archive: http://lists.mysql.com/commits/127409 X-Bug: 59060 Message-Id: <201012211224.oBLCGkbn022460@rcsinet13.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3462 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 3461 Sven Sandberg 2010-12-21 [merge] Merged fix for BUG#59084 from 5.5-bugteam to trunk-bugfixing modified: mysql-test/suite/rpl/r/rpl_do_grant.result mysql-test/suite/rpl/t/rpl_do_grant.test === modified file 'sql/protocol.cc' --- a/sql/protocol.cc 2010-11-18 16:34:56 +0000 +++ b/sql/protocol.cc 2010-12-21 12:23:49 +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 || No bundle (reason: useless for push emails).