bitmap_xor_count
description
Syntax
BIGINT BITMAP_XOR_COUNT(BITMAP lhs, BITMAP rhs, ...)
XOR two or more bitmap sets and return the size of the result set.
example
1. mysql> select bitmap_xor_count(bitmap_from_string('1,2,3'),bitmap_from_string('3,4,5'));
2. +----------------------------------------------------------------------------+
3. | bitmap_xor_count(bitmap_from_string('1,2,3'), bitmap_from_string('3,4,5')) |
4. +----------------------------------------------------------------------------+
5. | 4 |
6. +----------------------------------------------------------------------------+
8. mysql> select bitmap_xor_count(bitmap_from_string('1,2,3'),bitmap_from_string('1,2,3'));
9. +----------------------------------------------------------------------------+
10. | bitmap_xor_count(bitmap_from_string('1,2,3'), bitmap_from_string('1,2,3')) |
11. +----------------------------------------------------------------------------+
12. | 0 |
13. +----------------------------------------------------------------------------+
15. mysql> select bitmap_xor_count(bitmap_from_string('1,2,3'),bitmap_from_string('4,5,6'));
16. +----------------------------------------------------------------------------+
17. | bitmap_xor_count(bitmap_from_string('1,2,3'), bitmap_from_string('4,5,6')) |
18. +----------------------------------------------------------------------------+
19. | 6 |
20. +----------------------------------------------------------------------------+
22. MySQL> select (bitmap_xor_count(bitmap_from_string('2,3'),bitmap_from_string('1,2,3,4'),bitmap_from_string('3,4,5')));
23. +-----------------------------------------------------------------------------------------------------------+
24. | (bitmap_xor_count(bitmap_from_string('2,3'), bitmap_from_string('1,2,3,4'), bitmap_from_string('3,4,5'))) |
25. +-----------------------------------------------------------------------------------------------------------+
26. | 3 |
27. +-----------------------------------------------------------------------------------------------------------+
29. MySQL> select (bitmap_xor_count(bitmap_from_string('2,3'),bitmap_from_string('1,2,3,4'),bitmap_from_string('3,4,5'),bitmap_empty()));
30. +---------------------------------------------------------------------------------------------------------------------------+
31. | (bitmap_xor_count(bitmap_from_string('2,3'), bitmap_from_string('1,2,3,4'), bitmap_from_string('3,4,5'), bitmap_empty())) |
32. +---------------------------------------------------------------------------------------------------------------------------+
33. | 3 |
34. +---------------------------------------------------------------------------------------------------------------------------+
36. MySQL> select (bitmap_xor_count(bitmap_from_string('2,3'),bitmap_from_string('1,2,3,4'),bitmap_from_string('3,4,5'),NULL));
37. +-----------------------------------------------------------------------------------------------------------------+
38. | (bitmap_xor_count(bitmap_from_string('2,3'), bitmap_from_string('1,2,3,4'), bitmap_from_string('3,4,5'), NULL)) |
39. +-----------------------------------------------------------------------------------------------------------------+
40. | NULL |
41. +-----------------------------------------------------------------------------------------------------------------+
keywords
1. BITMAP_XOR_COUNT,BITMAP
