Comment 16 for bug 1384568

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote : Re: EXPLAIN crashes server

Offset is OK. It is not offset within the buffer. It is offest to add to pointer for it to into another buffer after clone (memcpy) done.

The real reason for the crash is that outparam->record[0] is not initialized. It usually initialized later in JOIN::exec when records read from table or in many across the code with read_record to fill it with default values. JOIN::exec is too late for given SELECT query, because JOIN::prepare needs Field_blob::is_null which in case needs default values to be in place.