• Igor Babaev's avatar
    Fixed LP bug #675922. · ae4b5a32
    Igor Babaev authored
    The bug happened when BKA join algorithm used an incremental buffer
    and some of the fields over which access keys were constructed
    - were allocated in the previous join buffers
    - were non-nullable
    - belonged to inner tables of outer joins.
    For such fields an offset to the field value in the record is saved
    in the postfix of the record, and a zero offset indicates that the value 
    is null. Before the key using the field value is constructed the
    value is read into the corresponding field of the record buffer and
    the null bit is set for the field if the offset is 0. However if
    the field is non-nullable the table->null_row must be set to 1
    for null values and to 0 for non-null values  to ensure proper reading
    of the value from the record buffer.
    
    ae4b5a32
sql_join_cache.cc 131 KB