Bogus UNIV_LIKELY/UNIV_UNLIKELY in fil_space_create by separate doublewrite patch

Bug #1078206 reported by Laurynas Biveinis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.1
Won't Fix
Low
Unassigned
5.5
Triaged
Low
Unassigned
5.6
Invalid
Undecided
Unassigned
5.7
Invalid
Undecided
Unassigned

Bug Description

The separate doublewrite patch introduced the following:

 if (UNIV_LIKELY(purpose == FIL_TABLESPACE && !recv_recovery_on)
     && UNIV_UNLIKELY(id < SRV_EXTRA_SYS_SPACE_FIRST_ID)
     && UNIV_UNLIKELY(id > fil_system->max_assigned_id)) {

Which is bogus. UNIV_LIKELY / UNLIKELY work best at the top level of boolean expression. Pushed down they are not useful, because:
UNIV_LIKELY(...) && UNIV_UNLIKELY(...)
still needs both subexpressions evaluated for the "likely" case.

Tags: xtradb
tags: added: xtradb
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-2834

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.