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
3460 Sven Sandberg 2010-12-21
Test if this fixes BUG#59063.
modified:
mysql-test/include/rpl_start_server.inc
mysql-test/include/rpl_stop_server.inc
=== 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 ||
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-trunk-bugfixing branch (alexander.nozdrin:3460 to 3461)Bug#59060 | Alexander Nozdrin | 21 Dec |