List:Commits« Previous MessageNext Message »
From:vasil.dimov Date:February 7 2011 2:51pm
Subject:bzr push into mysql-trunk-innodb branch (vasil.dimov:3482 to 3483)
View as plain text  
 3483 Vasil Dimov	2011-02-07 [merge]
      Merge mysql-5.5-innodb -> mysql-trunk-innodb

 3482 Marko Mäkelä	2011-02-07
      WL#5458 clean-up and optimizations
      
      When releasing multiple mutexes, release the coarsest mutex first,
      hoping to help performance when a context switch occurs between the
      releases. That is, release lock_sys->mutex before trx_sys->lock before
      trx->mutex.
      
      Reduce the hold time of trx->mutex.
      
      Replace some if-else if-else checks with switch.
      
      Add UNIV_UNLIKELY hints to or assertion-like checks or tests for rare
      conditions.
      
      lock_grant(), lock_rec_cancel(): lock_reset_lock_and_trx_wait() does
      not need trx->mutex.
      
      lock_deadlock_occurs(): Remove unnecessary local variable ret. On
      LOCK_VICTIM_EXCEED_MAX_DEPTH, release trx->mutex immediately, because
      lock_deadlock_trx_print() does not need it.
      
      lock_print_info_all_transactions(): Remove a redundant goto statement.
      
      lock_rec_insert_check_and_lock(): Do not acquire trx->mutex except for
      the lock_rec_enqueue_waiting() call, because this code is invoked for
      a running transaction by its serving thread.
      
      lock_wait_table_reserve_slot(): Do not test twice for the end-of-loop
      condition. Fix some formatting.
      
      lock_wait_check_and_cancel(): Only acquire the mutexes when cancelling
      the lock request.
      
      que_thr_end_lock_wait(): Add an assertion and remove a redundant one.
      
      que_thr_stop(): Remove a local variable. Use direct return instead.
      
      row_search_for_mysql(): Replace if-else if-else with switch.
      
      trx_purge_sys_create(): Remove unnecessary acquisition of
      purge_sys->trx->mutex. The purge_sys is allocated in this function;
      therefore the mutex does not provide any protection.
      
      trx_purge_sys_close(): Assert that purge_sys->sess->trx == purge_sys->trx.
      
      trx_rollback_or_clean_recovered(): Correct a typo.
      
      trx_prepare(), trx_prepare_for_mysql(): Do not acquire or release
      trx->mutex. This code is supposed to be invoked on a running
      transaction by the serving thread. trx->state changes are protected by
      lock_sys->mutex. Add assertions.
      
      rb://546

    modified:
      storage/innobase/lock/lock0lock.c
      storage/innobase/lock/lock0wait.c
      storage/innobase/que/que0que.c
      storage/innobase/row/row0sel.c
      storage/innobase/trx/trx0purge.c
      storage/innobase/trx/trx0roll.c
      storage/innobase/trx/trx0trx.c
No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-innodb branch (vasil.dimov:3482 to 3483) vasil.dimov7 Feb