Please see https://github.com/Mikayex/transmission
See my blog post.
-- Levenshtein function | |
-- Source: https://openquery.com.au/blog/levenshtein-mysql-stored-function | |
-- Levenshtein reference: http://en.wikipedia.org/wiki/Levenshtein_distance | |
-- Arjen note: because the levenshtein value is encoded in a byte array, distance cannot exceed 255; | |
-- thus the maximum string length this implementation can handle is also limited to 255 characters. | |
DELIMITER $$ | |
DROP FUNCTION IF EXISTS LEVENSHTEIN $$ | |
CREATE FUNCTION LEVENSHTEIN(s1 VARCHAR(255) CHARACTER SET utf8, s2 VARCHAR(255) CHARACTER SET utf8) |
See my blog post.