Comment 5 for bug 562349

Revision history for this message
Monty Taylor (mordred) wrote : Re: [Bug 562349] Re: drizzle date and time functions corrupt blob data in pbxt engine

On 4/20/2010 3:56 PM, Paul McCullagh wrote:
> I looked into this before the conference as well. As far as I can tell
> the problem is that somewhere in Drizzle a zero terminator is being set
> in order to do the conversion of the 'text_fld' field to a HOUR value.
>
> So the zero terminator overwrites one byte in the buffer. In the case of
> PBXT this buffer is pointing directly into the PBXT sequential scan
> buffer cache.
>
> The byte happens to be the size of the second BLOB (blob_fld) which
> follow directly after text_fld. So the this overwrite set the size of
> the value in the blob_fld field to zero.
>
> And that is why the error occurs.
>
> I presume InnoDB returns a pointer to a copy of the data, and therefore
> this overwrite does not affect it.
>

Sigh.

(setting random \0 bytes in the middle of a buffer)--