diff options
author | Andrei Elkin <aelkin@mysql.com> | 2010-03-23 17:00:50 +0200 |
---|---|---|
committer | Andrei Elkin <aelkin@mysql.com> | 2010-03-23 17:00:50 +0200 |
commit | 307fb75e68e854d721c6dbf12d1a066743ace5a5 (patch) | |
tree | bb7e116e3a64ea181be6c9b1c7d3da3a62415d22 /sql/protocol.cc | |
parent | a4332c256edded6a6d2378ad3edca945ea57a77f (diff) | |
download | mariadb-git-307fb75e68e854d721c6dbf12d1a066743ace5a5.tar.gz |
Bug #52304 valgrind does not like to print un-inited string in Protocol_text::store()
The reason of the failure was apparent flaw in that a pointer to an uninitialized buffer was
passed to DBUG_PRINT of Protocol_text::store().
Fixed with splitting the print-out into two branches:
one with length zero of the problematic arg and the rest.
Diffstat (limited to 'sql/protocol.cc')
-rw-r--r-- | sql/protocol.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/protocol.cc b/sql/protocol.cc index fad84f8be40..dc53e029647 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -850,7 +850,7 @@ bool Protocol_text::store(const char *from, size_t length, 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, from)); + field_count, (length == 0? "" : from))); DBUG_ASSERT(field_pos < field_count); DBUG_ASSERT(field_types == 0 || field_types[field_pos] == MYSQL_TYPE_DECIMAL || |