Commit graph

2 commits

Author SHA1 Message Date
Satya B
c64b76edeb Applying InnoDB snapshot 5.1-ss5488,part 2. Fixes BUG#45749
BUG#45749 - Race condition in SET GLOBAL innodb_commit_concurrency=DEFAULT

Detailed revision comments:

r5419 | marko | 2009-06-25 16:11:57 +0300 (Thu, 25 Jun 2009) | 18 lines
branches/5.1: Merge r5418 from branches/zip:

  ------------------------------------------------------------------------
  r5418 | marko | 2009-06-25 15:55:52 +0300 (Thu, 25 Jun 2009) | 5 lines
  Changed paths:
     M /branches/zip/ChangeLog
     M /branches/zip/handler/ha_innodb.cc
     M /branches/zip/mysql-test/innodb_bug42101-nonzero.result
     M /branches/zip/mysql-test/innodb_bug42101-nonzero.test
     M /branches/zip/mysql-test/innodb_bug42101.result
     M /branches/zip/mysql-test/innodb_bug42101.test
  
  branches/zip: Fix a race condition caused by
  SET GLOBAL innodb_commit_concurrency=DEFAULT. (Bug #45749)
  When innodb_commit_concurrency is initially set nonzero,
  DEFAULT would change it back to 0, triggering Bug #42101.
  rb://139 approved by Heikki Tuuri.
  ------------------------------------------------------------------------
2009-07-10 16:06:07 +05:30
Satya B
07b9358860 Applying InnoDB snashot 5.1-ss5024,part 3. Fixes BUG#42101
BUG#42101 - Race condition in innodb_commit_concurrency

Detailed revision comments:

r4994 | marko | 2009-05-14 15:04:55 +0300 (Thu, 14 May 2009) | 18 lines
branches/5.1: Prevent a race condition in innobase_commit() by ensuring
that innodb_commit_concurrency>0 remains constant at run time. (Bug #42101)

srv_commit_concurrency: Make this a static variable in ha_innodb.cc.

innobase_commit_concurrency_validate(): Check that innodb_commit_concurrency
is not changed from or to 0 at run time.  This is needed, because
innobase_commit() assumes that innodb_commit_concurrency>0 remains constant.
Without this limitation, the checks for innodb_commit_concurrency>0
in innobase_commit() should be removed and that function would have to
acquire and release commit_cond_m at least twice per invocation.
Normally, innodb_commit_concurrency=0, and introducing the mutex operations
would mean significant overhead.

innodb_bug42101.test, innodb_bug42101-nonzero.test: Test cases.

rb://123 approved by Heikki Tuuri
2009-05-19 13:50:28 +05:30