• istruewing@chilla.local's avatar
    Bug#26827 - table->read_set is set incorrectly, · dc82068c
    istruewing@chilla.local authored
              causing update of a different column
    
    For efficiency some storage engines do not read a complete record
    for update, but only the columns required for selecting the rows.
    
    When updating a row of a partitioned table, modifying a column
    that is part of the partition or subpartition expression, then
    the row may need to move from one [sub]partition to another one.
    This is done by inserting the new row into the target
    [sub]partition and deleting the old row from the originating one.
    For the insert we need a complete record.
    
    If an above mentioned engine was used for a partitioned table, we
    did not have a complete record in update_row(). The implicitly
    executed write_row() got an incomplete record.
    
    This is solved by instructing the engine to read a complete record
    if one of the columns of the partition or subpartiton is to be
    updated.
    
    No testcase. This can be reproduced with Falcon only. The engines
    contained in standard 5.1 do always return complete records on
    update.
    dc82068c
sql_partition.cc 237 KB