• Sergei Petrunia's avatar
    MDEV-16155: UPDATE on RocksDB table with unique constraint does not work · 21bcfeb9
    Sergei Petrunia authored
    RocksDB now supports "iterator bounds" which are min and max keys
    that an iterator is interested in.
    
    Iterator initialization function doesn't copy the keys, though, it keeps
    pointers to them.
    So if the buffer space for the keys is used for another iterator (the one
    for checking for UNIUQE constraint violation in ha_rocksdb::ha_update_row)
    then one can get incorrect query result.
    
    Fixed by using a separate buffer for iterator bounds in the unique constraint
    violation check.
    21bcfeb9
ha_rocksdb.cc 457 KB