List:Commits« Previous MessageNext Message »
From:Alexander Nozdrin Date:December 21 2010 12:23pm
Subject:bzr commit into mysql-trunk-bugfixing branch (alexander.nozdrin:3462)
Bug#59060
View as plain text  
#At file:///home/alik/MySQL/bzr/mysql-trunk-bugfixing/ based on revid:sven.sandberg@stripped

 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
=== 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 ||


Attachment: [text/bzr-bundle] bzr/alexander.nozdrin@oracle.com-20101221122349-6h8ammcro70a4pac.bundle
Thread
bzr commit into mysql-trunk-bugfixing branch (alexander.nozdrin:3462)Bug#59060Alexander Nozdrin21 Dec