Merge lp:~akopytov/percona-server/bug1130655 into lp:percona-server/5.5

Proposed by Alexey Kopytov
Status: Merged
Approved by: Sergei Glushchenko
Approved revision: no longer in the source branch.
Merged at revision: 452
Proposed branch: lp:~akopytov/percona-server/bug1130655
Merge into: lp:percona-server/5.5
Diff against target: 20 lines (+3/-3)
1 file modified
Percona-Server/storage/innobase/row/row0sel.c (+3/-3)
To merge this branch: bzr merge lp:~akopytov/percona-server/bug1130655
Reviewer Review Type Date Requested Status
Sergei Glushchenko (community) g2 Approve
Review via email: mp+149819@code.launchpad.net

Description of the change

  Bug #1130655: Suboptimal code in row_search_for_mysql()

  Provide compiler with the branch prediction information similar to the original
  code replaced by innodb_adaptive_hash_index_partitions.patch.

To post a comment you must log in.
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Approve

review: Approve (g2)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Percona-Server/storage/innobase/row/row0sel.c'
--- Percona-Server/storage/innobase/row/row0sel.c 2013-01-09 23:45:25 +0000
+++ Percona-Server/storage/innobase/row/row0sel.c 2013-02-21 12:52:22 +0000
@@ -3520,13 +3520,13 @@
3520 should_release = 0;3520 should_release = 0;
3521 for (i = 0; i < btr_search_index_num; i++) {3521 for (i = 0; i < btr_search_index_num; i++) {
3522 /* we should check all latches (fix Bug#791030) */3522 /* we should check all latches (fix Bug#791030) */
3523 if (rw_lock_get_writer(btr_search_latch_part[i])3523 if (UNIV_UNLIKELY(rw_lock_get_writer(btr_search_latch_part[i])
3524 != RW_LOCK_NOT_LOCKED) {3524 != RW_LOCK_NOT_LOCKED)) {
3525 should_release |= ((ulint)1 << i);3525 should_release |= ((ulint)1 << i);
3526 }3526 }
3527 }3527 }
35283528
3529 if (should_release) {3529 if (UNIV_UNLIKELY(should_release)) {
35303530
3531 /* There is an x-latch request on the adaptive hash index:3531 /* There is an x-latch request on the adaptive hash index:
3532 release the s-latch to reduce starvation and wait for3532 release the s-latch to reduce starvation and wait for

Subscribers

People subscribed via source and target branches