xxhash_32

description

Syntax

INT XXHASH_32(VARCHAR input, ...)

Return the 32 bits xxhash of input string.

Note: When calculating hash values, it is more recommended to use xxhash_32 instead of murmur_hash3_32.

example

  1. mysql> select xxhash_32(NULL);
  2. +-----------------+
  3. | xxhash_32(NULL) |
  4. +-----------------+
  5. | NULL |
  6. +-----------------+
  7. mysql> select xxhash_32("hello");
  8. +--------------------+
  9. | xxhash_32('hello') |
  10. +--------------------+
  11. | -83855367 |
  12. +--------------------+
  13. mysql> select xxhash_32("hello", "world");
  14. +-----------------------------+
  15. | xxhash_32('hello', 'world') |
  16. +-----------------------------+
  17. | -920844969 |
  18. +-----------------------------+

keywords

XXHASH_32,HASH