• Ming Lin's avatar
    MDEV-16703: Update AUTO_INCREMENT in the UPDATE statement · f7154242
    Ming Lin authored
    Currently RocksDB engine doesn't update AUTO_INCREMENT in the UPDATE statement.
    For example,
    
    CREATE TABLE t1 (pk INT AUTO_INCREMENT, a INT, PRIMARY KEY(pk)) ENGINE=RocksDB;
    INSERT INTO t1 (a) VALUES (1);
    UPDATE t1 SET pk = 3; ==> AUTO_INCREMENT should be updated to 4.
    
    Without this fix, it hits the Assertion `dd_val >= last_val' failed in
    myrocks::ha_rocksdb::load_auto_incr_value_from_index.
    f7154242
ha_rocksdb.cc 458 KB