• Jan Lindström's avatar
    MDEV-7942: InnoDB: abuse of UNIV_LIKELY()/UNIV_UNLIKELY() · 58e8db2e
    Jan Lindström authored
    UNIV_LIKELY()/UNIV_UNLIKELY() hints are supposed to improve branch prediction.
    Currently, they're expected to work only if cond evaluates to TRUE or FALSE.
    
    However there're a few conditions that may evaluate to different values, e.g.:
    
    page/page0zip.cc:		if (UNIV_LIKELY(c_stream->avail_in)) {
    page/page0zip.cc:			if (UNIV_LIKELY(c_stream->avail_in)) {
    dict/dict0mem.cc:		if (UNIV_LIKELY(i) && UNIV_UNLIKELY(!table->col_names)) {
    
    Fixed these conditions so that they evaluate TRUE/FALSE.
    58e8db2e
dict0mem.cc 22.1 KB