Bug #57627 Use atomic memory access instead of mutexes for updating counters
Submitted: 21 Oct 2010 12:45 Modified: 12 Jan 2011 22:08
Reporter: Jimmy Yang Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:5.6 OS:Any
Assigned to: Jimmy Yang CPU Architecture:Any

[21 Oct 2010 12:45] Jimmy Yang
Description:
This is to update certain counters with atomic operation instead of doing so with mutex protection:

Added generic counter operation to increment/decrement following counters atomically if HAVE_ATOMIC_BUILTINS is defined:
 a) ios
 b) dict_table_t::n_foreign_key_checks_running
 c) trx_sys->rseg_history_len

We will fall back to mutex protection for "n_foreign_key_checks_running" and "rseg_history_len" if  HAVE_ATOMIC_BUILTINS not defined.

How to repeat:
Go through corresponding code.
[13 Nov 2010 16:10] Bugs System
Pushed into mysql-trunk 5.6.99-m5 (revid:alexander.nozdrin@oracle.com-20101113155825-czmva9kg4n31anmu) (version source revid:alexander.nozdrin@oracle.com-20101113152450-2zzcm50e7i4j35v7) (merge vers: 5.6.1-m4) (pib:21)
[13 Nov 2010 16:42] Bugs System
Pushed into mysql-next-mr (revid:alexander.nozdrin@oracle.com-20101113160336-atmtmfb3mzm4pz4i) (version source revid:alexander.nozdrin@oracle.com-20101113152540-gxro4g0v29l27f5x) (pib:21)