• Sergei Golubchik's avatar
    bug: ha_heap was unilaterally increasing reclength · b80fa400
    Sergei Golubchik authored
    MEMORY engine needs the record length to be at least sizeof(void*),
    because it stores a pointer there (linking deleted records into a list).
    So when the reclength is less than sizeof(void*), it's set to sizeof(void*).
    That is done inside heap_create(), and the upper layer doesn't know
    that the engine writes beyond share->reclength.
    
    While it's usually safe (in-memory record size is rounded up to
    sizeof(double), so even if share->reclength is too small,
    share->rec_buff_len is not), it could cause problems in the code that
    copies records and expects them to fix in share->reclength,
    e.g. in partitioning.
    b80fa400
ha_heap.cc 22.7 KB