1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-35253: xa_prepare_unlock_unmodified fails ... : part 2

instead of our own prev_bits(), make use of my_set_bits().
This commit is contained in:
Sergei Petrunia
2024-10-29 12:09:13 +02:00
parent d64034770e
commit 9bb95de186

View File

@ -2598,15 +2598,7 @@ void propagate_new_equalities(THD *thd, Item *cond,
COND_EQUAL *inherited,
bool *is_simplifiable_cond);
template<typename T> T prev_bits(T n_bits)
{
if (!n_bits)
return 0;
T tmp= ((T)1 << (n_bits - 1));
return (tmp - 1) | tmp;
}
// A wrapper for the above function:
#define PREV_BITS(type, A) prev_bits<type>(A)
#define PREV_BITS(type, N_BITS) ((type)my_set_bits(N_BITS))
#endif /* SQL_SELECT_INCLUDED */