On 12/15/2010 08:13 AM, Daogang Qu wrote:
> Hi Luis,
> Nice work. Patch approved.
> One suggestion:
> It's better to add the test case to the patch.
Hmm... The patch only fixes DBUG code, so I don't think
the test case is needed! If you don't mind, I'll not include
the test case.
> Best Regards,
> 2010-12-15 00:29, Luis Soares wrote:
> based onrevid:anitha.gopi@stripped
>> 3422 Luis Soares 2010-12-14
>> BUG#58129: Valgrind error when sanity check fails in read_log_event
>> The DBUG_DUMP instruction was being called with wrong pointer and
>> wrong length.
>> Fixed it by deploying two calls to DBUG_DUMP, one for the blob
>> field itself and another to print the blob value.
>> === modified file 'sql/field.cc'
>> --- a/sql/field.cc 2010-11-17 16:04:35 +0000
>> +++ b/sql/field.cc 2010-12-14 16:29:05 +0000
>> @@ -7813,7 +7813,12 @@ const uchar *Field_blob::unpack(uchar *t
>> bitmap_set_bit(table->write_set, field_index);
>> store(reinterpret_cast<const char*>(from) + master_packlength,
>> length, field_charset);
>> - DBUG_DUMP("record", to, table->s->reclength);
>> +#ifndef DBUG_OFF
>> + uchar *vptr;
>> + get_ptr(&vptr);
>> + DBUG_DUMP("field", ptr, pack_length() /* len bytes + ptr bytes */);
>> + DBUG_DUMP("value", vptr, length /* the blob value length */);
>> DBUG_RETURN(from + master_packlength + length);