• sunny's avatar
    branches/zip: · cb290201
    sunny authored
      1. We add a vector of locks to trx_t. This array contains the autoinc
      locks granted to a transaction. There is one per table.
    
      2. We enforce releasing of these locks in the reverse order from the
      one in which they are acquired. The assumption is that since the
      AUTOINC locks are statement level locks. Nested statements introduced
      by triggers are stacked it should hold.
    
    There was some cleanup done to the vector code too by adding const and
    some new functions. Rename dict_table_t::auto_inc_lock to autoinc_lock.
    
    Fix Bug#26316 Triggers create duplicate entries on auto-increment columns
    rb://22
    cb290201
lock0lock.c 152 KB