Giter Site home page Giter Site logo

ifsnop / damlev Goto Github PK

View Code? Open in Web Editor NEW
29.0 29.0 4.0 39 KB

Damerau-Levenshtein Distance UDF for MySQL - Supports upper bounding for fast searching and UTF-8 case insensitive throught iconv.

License: Other

Python 9.11% C 82.80% Shell 3.63% Makefile 4.46%

damlev's People

Contributors

ifsnop avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

damlev's Issues

Fail to change locale

Hello,

Tks for the post.

I made everything, but when I run:
"select damlevlim('coche', 'coche', 5);""
I got the message:
"Can't initialize function 'damlevlim'; DAMLEVLIM() failed to change locale"

Do you know how I can fix it?

Tks

Wrong calculations for russian UTF8

  1. select damlevlim('абвг', 'абде', 10); return 0 (must be 2)
  2. select damlevlim('абвг', 'абве', 10); return 0 (must be 1)
  3. select damlevlim('абвг', 'абд', 10); return 1 (must be 2)
  4. select damlevlim('абвг', 'де', 10); return 2 (must be 4)

All samples use rusisan chars in UTF-8. Mysql library compiled with locale 'ru_RU.utf8'.
As I see, it calculate different only in string length, and doesn't compare chars.
In sample 1: length 4, 2 chars are identical ('аб'), and 2 chars different.
In sample 2: length 4, 3 chars are identical ('абв'), and 1 char different.
In sample 3: length 4 left (3 right), 2 chars are identical ('аб'), and 2 left (3 right) chars different.
In sample 4: length 4 left (2 right), all chars not identical.

EAGAIN in setlocale

On Ubuntu LTS 14.04, I had a problem where the setlocale function was failing with EGAIN. I hacked in a quick loop to try upto 10 times, which worked ok.

Has anyone else seen this, or got a better fix?

m_ctype.h: No such file or directory

I have tried to compile on maridadb 10 having problem with m_ctype.h

gcc -m64 -Wall -fPIC -I/usr/local/include/mysql -L/usr/lib/mysql -L/usr/local/lib/mysql -I/usr/include/mysql -lmysqlclient -DMYSQL_DYNAMIC_PLUGIN -DDEBUG_MYSQL=0 -pipe -O3 -shared -o lib/mysqldamlevlim.so ./src/damlevlim.c In file included from ./src/damlevlim.h:26:0, from ./src/damlevlim.c:16: /usr/include/mysql/my_global.h:3:2: warning: #warning This file should not be included by clients, include only <mysql.h> [-Wcpp] #warning This file should not be included by clients, include only <mysql.h> ^ In file included from ./src/damlevlim.h:27:0, from ./src/damlevlim.c:16: /usr/include/mysql/my_sys.h:3:2: warning: #warning This file should not be included by clients, include only <mysql.h> [-Wcpp] #warning This file should not be included by clients, include only <mysql.h> ^ In file included from ./src/damlevlim.c:16:0: ./src/damlevlim.h:30:21: fatal error: m_ctype.h: No such file or directory #include <m_ctype.h>

above is the complete compile out. Any helps would be appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.