Suboptimal code in row_search_for_mysql()
Bug #1130655 reported by
Alexey Kopytov
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
Medium
|
Alexey Kopytov | ||
5.1 |
Won't Fix
|
Undecided
|
Unassigned | ||
5.5 |
Fix Released
|
Medium
|
Alexey Kopytov |
Bug Description
The fix for bug #791030 introduced a suboptimal code in row_search_
should_release = 0;
for (i = 0; i < btr_search_
/* we should check all latches (fix Bug#791030) */
if (rw_lock_
!= RW_LOCK_NOT_LOCKED) {
should_release |= ((ulint)1 << i);
}
}
(and a few other similar loops all in the same function).
According to profiling, this causes a rather high amount of branch mispredictions and resource stalls.
Related branches
lp://staging/~akopytov/percona-server/bug1130655
- Sergei Glushchenko (community): Approve (g2)
-
Diff: 20 lines (+3/-3)1 file modifiedPercona-Server/storage/innobase/row/row0sel.c (+3/-3)
To post a comment you must log in.
Percona now uses JIRA for bug reports so this bug report is migrated to: https:/ /jira.percona. com/browse/ PS-1318