• Nikita Malyavin's avatar
    MDEV-18875 Assertion `thd->transaction.stmt.ha_list == __null || trans ==... · 720e9bd5
    Nikita Malyavin authored
    MDEV-18875 Assertion `thd->transaction.stmt.ha_list == __null || trans == &thd->transaction.stmt' failed or bogus ER_DUP_ENTRY upon ALTER TABLE with versioning
    
    Cause:
    * when autocommit=0 (or transaction is issued by user),
     `ha_commit_trans` is called twice on ALTER TABLE, causing a duplicated
     insert into `transaction_registry` (ER_DUP_ENTRY).
    
    Solution:
    * ALTER TABLE makes an implicit commit by a second call. We actually
     need to make an insert only when it is a real commit. So is_real
     variable is additionally checked.
    720e9bd5
trx_id.result 15.8 KB