Bug #114370 xxhash functions
Submitted: 15 Mar 2024 14:12 Modified: 15 Mar 2024 14:37
Reporter: Ryan Brothers Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: General Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any

[15 Mar 2024 14:12] Ryan Brothers
Description:
This is a feature request.

Would it be possible to add functions to allow users to create hashes with xxhash (https://xxhash.com).  I believe xxhash is already used internally in MySQL.  In particular, I'm looking for xxh128.

Thank you for your help.

How to repeat:
.
[15 Mar 2024 14:37] MySQL Verification Team
Hi Mr. Brothers,

Thank you for your feature request.

However, sorry, but  we are afraid that we have no real justification to  implement an SQL function based on XXHASH algorithm.

First of all, we are implemented the functionality as based on SQL Standard and this function is not a part of it.

Second, we do not use XXHASH directly, but as a part of some compression algorithms that we use, like lz4, zstd etc ...

Third, there are several variants of this algorithm, mostly based on the width of the hash value desired.  Hence , we would have needed to have several functions added. 

Next, there are several hashing functions based on that algorithm, like update(), several variants of digest(), copy(), reset etc ...... Hence, it is not simple at all.

Next, we do not see any practical use for it in any of the SQL commands.

Last, but not least, there is absolutely no demand for such a string function.