mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Backport a fix for Bug#59060 (Valgrind warning in Protocol_text::store()).
Original changeset: revision-id: alexander.nozdrin@oracle.com-20101221122349-6h8ammcro70a4pac parent: sven.sandberg@oracle.com-20101221121948-hnivuulyohzch1v4 committer: Alexander Nozdrin <alexander.nozdrin@oracle.com> branch nick: mysql-trunk-bugfixing timestamp: Tue 2010-12-21 15:23:49 +0300 message: A patch for Bug#59060 (Valgrind warning in Protocol_text::store()). We should not assume to have zero-terminated strings.
This commit is contained in:
@ -857,8 +857,8 @@ 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, (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 ||
|
||||
|
Reference in New Issue
Block a user