Merge lp://staging/~sergei.glushchenko/percona-server/ps51-bug903617 into lp://staging/percona-server/5.1
Proposed by
Sergei Glushchenko
Status: | Merged |
---|---|
Approved by: | Alexey Kopytov |
Approved revision: | no longer in the source branch. |
Merged at revision: | 429 |
Proposed branch: | lp://staging/~sergei.glushchenko/percona-server/ps51-bug903617 |
Merge into: | lp://staging/percona-server/5.1 |
Diff against target: |
76 lines (+37/-2) 1 file modified
Percona-Server/storage/innodb_plugin/dict/dict0dict.c (+37/-2) |
To merge this branch: | bzr merge lp://staging/~sergei.glushchenko/percona-server/ps51-bug903617 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alexey Kopytov (community) | Approve | ||
Review via email: mp+94741@code.staging.launchpad.net |
Description of the change
Bug903617
Deadlock or crash on concurrent
TRUNCATE TABLE testdb.t
and
SELECT * FROM information_
WHERE table_schema=
dict_stats_latches array of RW-locks is used for locking dict
statisctics. Latch to lock is picked by table->id. TRUNCATE TABLE changes
table->id without locking any latches.
Solution is to lock the latch in exclusive mode before changing
table->id. The fact that table->id could change also taken to account
in the latch locking algorithm.
http://
To post a comment you must log in.
Sergei,
The patch looks good to me, but please add short comments before the for loops and the call to dict_table_ stats_lock( ) explaining why it's being done, as it may not be obvious without knowing the bug context. Please also add the upstream bug number to commit message when you have it.