[sqlite] Libstringmetrics

2015-03-12 Thread Andrea Peri
oops, sorry for wrong typo. "Hi Milan," is the correct. :) Again, A. 2015-03-12 9:08 GMT+01:00 Andrea Peri : > Hi Lina, > > I tested your patch and it resolve the crash. > > I submit the patch in the master and generate a new dll for windows. > > Thx for patching. > > A. > > > 2015-03-12 8:48

[sqlite] Libstringmetrics

2015-03-12 Thread Andrea Peri
Hi Lina, I tested your patch and it resolve the crash. I submit the patch in the master and generate a new dll for windows. Thx for patching. A. 2015-03-12 8:48 GMT+01:00 Andrea Peri : > Of course. > Thx for report and patch. > > However I will contact the original author of the simmetrics

[sqlite] Libstringmetrics

2015-03-12 Thread Andrea Peri
Of course. Thx for report and patch. However I will contact the original author of the simmetrics library https://github.com/jokillsya/libsimmetrics to report him this error and the patch. A. 2015-03-12 2:12 GMT+01:00 Milan Roubal : > Thank you very much for all feedback! the last example

[sqlite] Libstringmetrics

2015-03-12 Thread Milan Roubal
Thank you very much for all feedback! the last example crashed also so I have tried with try and error to trace it down into the library and it looks like the problem are this 2 lines in file src/libsimmetrics/simmetrics/tokenizer.c tmp = calloc((init_len + qtype->qgram_len),

[sqlite] Libstringmetrics

2015-03-12 Thread Milan Roubal
On 2015-03-12 00:33, Simon Slavin wrote: >> On 11 Mar 2015, at 10:54pm, Milan Roubal wrote: >> >> .load ./libstringmetrics.so >> select a.firstname, b.firstname, a.lastname, b.lastname, >> stringmetrics("qgrams_distance","similarity",a.firstname, >> b.firstname,"") first_dist, >>

[sqlite] Libstringmetrics

2015-03-12 Thread Simon Slavin
> On 11 Mar 2015, at 11:50pm, Milan Roubal wrote: > >> SELECT stringmetrics("qgrams_distance","similarity","Roubal", >> "RoubalRoubalRoubalRo",""); > crash Then that's the one to use for debugging. It is extremely simple and contains no database access at all so now you know the problem has

[sqlite] Libstringmetrics

2015-03-12 Thread Andrea Peri
Hi Milan, thx for your patch. SQLITE_STATIC --> SQLITE_TRANSIENT I try to apply it for testing: but seem nothing change . However I leave it in the code to allow you to test. I submit also a new dll. Regards, Andrea. 2015-03-11 16:07 GMT+01:00 Milan Roubal : > Dear Andrea, > thank you for the

[sqlite] Libstringmetrics

2015-03-12 Thread Milan Roubal
So I was able to identify the record doing the problem. I have tried to find what is so special on that record and it is size 20 characters. When I have this 3 examples with last name lenght 19, 20 and 21 characters only the size 20 crash. .load ./libstringmetrics.so select a.firstname,

[sqlite] Libstringmetrics

2015-03-12 Thread Simon Slavin
> On 11 Mar 2015, at 10:54pm, Milan Roubal wrote: > > .load ./libstringmetrics.so > select a.firstname, b.firstname, a.lastname, b.lastname, > stringmetrics("qgrams_distance","similarity",a.firstname, b.firstname,"") > first_dist, > stringmetrics("qgrams_distance","similarity",a.lastname,

[sqlite] Libstringmetrics

2015-03-12 Thread Milan Roubal
Your SQL pass, so it is somewhere in the library. The problem is how to find in the big data where exactly. I am now going one character by each other, because it is probably only one specific record kind doing that. I was able to compile the library under linux and running strace looks like

[sqlite] Libstringmetrics

2015-03-11 Thread Simon Slavin
> On 11 Mar 2015, at 4:56pm, Milan Roubal wrote: > > I am also facing problem with sqlite closed by windows because of crash. On > same data this query crash: > > select load_extension("libstringmetrics.dll"); > select a.vorname, b.vorname, a.nachname, b.nachname, >

[sqlite] Libstringmetrics

2015-03-11 Thread Milan Roubal
Dear Andrea, I am also facing problem with sqlite closed by windows because of crash. On same data this query crash: select load_extension("libstringmetrics.dll"); select a.vorname, b.vorname, a.nachname, b.nachname, stringmetrics("qgrams_distance","similarity",a.nachname, b.nachname, "")

[sqlite] Libstringmetrics

2015-03-11 Thread Milan Roubal
Dear Andrea, thank you for the answer. The only idea I have so far is the line 452 in file wrapper_functions.c sqlite3_result_text(context, metrics, strlen(metrics)+1, SQLITE_STATIC); I would change that to sqlite3_result_text(context, metrics, strlen(metrics)+1, SQLITE_TRANSIENT); but I don't

[sqlite] Libstringmetrics

2015-03-11 Thread aperi2007
Hi Milan, thx for your report. I try to see a check, and effectively I notice the problem is in the qgrams_distance when used the metrics option. As reported in the readme, the stringmetrics extension is based on the https://github.com/jokillsya/libsimmetrics library. The code on the metrics

[sqlite] Libstringmetrics

2015-03-06 Thread Milan Roubal
Dear all, I have some problems with https://github.com/aperi2007/libstringmetrics . For example: When I use "similarity" in qgrams_distance, I get good results. But when I use "metric", it works only if it is only once in the query. When there are 2 different usages, they somehow interfere