bitmap_to_base64

description

Syntax

VARCHAR BITMAP_TO_BASE64(BITMAP input)

将一个bitmap转化成一个base64字符串。输入是null的话返回null。BE配置项enable_set_in_bitmap_value会改变bitmap值在内存中的具体格式,因此会影响此函数的结果。

example

  1. mysql> select bitmap_to_base64(null);
  2. +------------------------+
  3. | bitmap_to_base64(NULL) |
  4. +------------------------+
  5. | NULL |
  6. +------------------------+
  7. mysql> select bitmap_to_base64(bitmap_empty());
  8. +----------------------------------+
  9. | bitmap_to_base64(bitmap_empty()) |
  10. +----------------------------------+
  11. | AA== |
  12. +----------------------------------+
  13. mysql> select bitmap_to_base64(to_bitmap(1));
  14. +--------------------------------+
  15. | bitmap_to_base64(to_bitmap(1)) |
  16. +--------------------------------+
  17. | AQEAAAA= |
  18. +--------------------------------+
  19. mysql> select bitmap_to_base64(bitmap_from_string("1,9999999"));
  20. +---------------------------------------------------------+
  21. | bitmap_to_base64(bitmap_from_string("1,9999999")) |
  22. +---------------------------------------------------------+
  23. | AjowAAACAAAAAAAAAJgAAAAYAAAAGgAAAAEAf5Y= |
  24. +---------------------------------------------------------+

keywords

  1. BITMAP_TO_BASE64,BITMAP