Substitute of MySQL FIND_IN_SET(str,strlist)

Hi
I am looking for substitue of FIND_IN_SET(str,strlist) function

Returns a value in the range of 1 to N if the string str is in the string list strlist consisting of N substrings. A string list is a string composed of substrings separated by , characters. If the first argument is a constant string and the second is a column of type SET, the FIND_IN_SET() function is optimized to use bit arithmetic. Returns 0 if str is not in strlist or if strlist is the empty string. Returns NULL if either argument is NULL . This function does not work properly if the first argument contains a comma (, ) character.

Hi Dominik,

I see you opened several items regarding MySQL-compatible functions. I don’t have time to answer all these right now. If you have a lot of code and don’t want to change your SQL, your best bet would be to implement all these functions in MPSQL or Wasm (if they are scalar functions). E.g. in Wasm you could import a compression library in Rust and probably write compress/uncompress in a few lines of code.

Eric

See also this post on workarounds for find_in_set: