Skip to content

Commit 9bb95de

Browse files
committed
MDEV-35253: xa_prepare_unlock_unmodified fails ... : part 2
instead of our own prev_bits(), make use of my_set_bits().
1 parent d640347 commit 9bb95de

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

sql/sql_select.h

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2598,15 +2598,7 @@ void propagate_new_equalities(THD *thd, Item *cond,
25982598
COND_EQUAL *inherited,
25992599
bool *is_simplifiable_cond);
26002600

2601-
template<typename T> T prev_bits(T n_bits)
2602-
{
2603-
if (!n_bits)
2604-
return 0;
2605-
T tmp= ((T)1 << (n_bits - 1));
2606-
return (tmp - 1) | tmp;
2607-
}
2608-
// A wrapper for the above function:
2609-
#define PREV_BITS(type, A) prev_bits<type>(A)
2601+
#define PREV_BITS(type, N_BITS) ((type)my_set_bits(N_BITS))
26102602

26112603

26122604
#endif /* SQL_SELECT_INCLUDED */

0 commit comments

Comments
 (0)