Re: [sqlite] Problem with FTS4 - Floating point error.

2011-10-25 Thread Mohd Radzi Ibrahim

On 25-Oct-2011, at 2:53 PM, Dan Kennedy wrote:

> This was fixed and then I forgot to follow up here. I should have.
> Sorry about that. It's fixed here:
> 
>  http://www.sqlite.org/src/ci/3126754c72?sbs=0
> 
> Either updating to the latest trunk or just applying the linked
> patch to fts3.c should fix your crash.
> 
> Dan.
> 

I've clone the fossil repository and tried to run make. I am having problem at 
linking stage with these errors:

/tmp/ccwXZcmF.o: In function `one_input_line':
/home/radzi/devtools/sqlite-canonical/bld/../src/shell.c:393: undefined 
reference to `readline'
/home/radzi/devtools/sqlite-canonical/bld/../src/shell.c:395: undefined 
reference to `add_history'
/tmp/ccwXZcmF.o: In function `main':
/home/radzi/devtools/sqlite-canonical/bld/../src/shell.c:2949: undefined 
reference to `read_history'
/home/radzi/devtools/sqlite-canonical/bld/../src/shell.c:2953: undefined 
reference to `stifle_history'
/home/radzi/devtools/sqlite-canonical/bld/../src/shell.c:2954: undefined 
reference to `write_history'

I am running on Ubuntu 10.10 and have installed readline6.2.

Any suggestion?

thanks.

best regards,
Radzi.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problem with FTS4 - Floating point error.

2011-10-25 Thread Dan Kennedy

On 10/25/2011 12:49 PM, Mohd Radzi Ibrahim wrote:


On 18-Oct-2011, at 6:52 PM, Dan Kennedy wrote:




On 10/18/2011 05:02 PM, Mohd Radzi Ibrahim wrote:

Hi,

This is my table schema:

CREATE VIRTUAL TABLE LocationFTS using FTS4
(
name text,
address text,
email text,
remark text,
telno text,
contact text,
isDeleted text
);

This select statement gives floating point error in both sqlite3.exe and also 
my program (both my Ubuntu and Windows versions failed) :

select docid, name, address, email, remark, telNo, contact
from locationFTS
where locationFTS match 'suai plantation sdn bhd, p.o.box 730 97008 bintulu 
swk, tel 2 07-6637460 ah leng   06-9766061 a3.0';

PharmacyServer.exe!GenericKedaiRuncitDB::GetLocationFTS(LocationRecord& 
  r)  Line 147 + 0x14 bytes C++
PharmacyServer.exe!wxSQLite3Statement::ExecuteQuery(bool 
transferStatementOwnership)  Line 1486 + 0xc bytes C++
PharmacyServer.exe!sqlite3_step(sqlite3_stmt * pStmt)  Line 62029 + 0x9 
bytes   C
PharmacyServer.exe!sqlite3Step(Vdbe * p)  Line 61954 + 0x9 bytes
C
PharmacyServer.exe!sqlite3VdbeExec(Vdbe * p)  Line 3856 + 0x30 bytes
C
PharmacyServer.exe!fts3FilterMethod(sqlite3_vtab_cursor * pCursor, int 
idxNum, const char * idxStr, int nVal, Mem * * apVal)  Line 51378 + 0x9 bytes   
 C
PharmacyServer.exe!fts3EvalStart(Fts3Cursor * pCsr)  Line 52714 + 0x13 
bytesC
PharmacyServer.exe!fts3EvalSelectDeferred(Fts3Cursor * pCsr, Fts3Expr * 
pRoot, Fts3TokenAndCost * aTC, int nTC)  Line 52634 + 0x2a bytesC

Does anybody know what's going on here?


Can you send me the database by email? Not via the list,
as it will strip the attachment.

Dan Kennedy.



Hi,

I've been chasing this bug and tried couple of options and found out that these 
issues fix my problem:

1. The number of words in match string is capped at 16.
2. These characters in the match string I replaced with spaces.
 case ',':
 case '.':
 case '/':
 case '-':
 case ':':
 case '\'':
 case '"':
 case '(':
 case ')':
 case '\\':
 case '@':

Was it a bug or was it the limitation? Or Perhaps I missed the documentation on 
FTS4.


This was fixed and then I forgot to follow up here. I should have.
Sorry about that. It's fixed here:

  http://www.sqlite.org/src/ci/3126754c72?sbs=0

Either updating to the latest trunk or just applying the linked
patch to fts3.c should fix your crash.

Dan.



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problem with FTS4 - Floating point error.

2011-10-24 Thread Mohd Radzi Ibrahim

On 18-Oct-2011, at 6:52 PM, Dan Kennedy wrote:

> 
> 
> On 10/18/2011 05:02 PM, Mohd Radzi Ibrahim wrote:
>> Hi,
>> 
>> This is my table schema:
>> 
>> CREATE VIRTUAL TABLE LocationFTS using FTS4
>> (
>>  name text,
>>  address text,
>>  email text,
>>  remark text,
>>  telno text,
>>  contact text,
>>  isDeleted text
>> );
>> 
>> This select statement gives floating point error in both sqlite3.exe and 
>> also my program (both my Ubuntu and Windows versions failed) :
>> 
>> select docid, name, address, email, remark, telNo, contact
>> from locationFTS
>> where locationFTS match 'suai plantation sdn bhd, p.o.box 730 97008 bintulu 
>> swk, tel 2 07-6637460 ah leng   06-9766061 a3.0';
>> 
>>  PharmacyServer.exe!GenericKedaiRuncitDB::GetLocationFTS(LocationRecord& 
>>  r)  Line 147 + 0x14 bytes  C++
>>  PharmacyServer.exe!wxSQLite3Statement::ExecuteQuery(bool 
>> transferStatementOwnership)  Line 1486 + 0xc bytes C++
>>  PharmacyServer.exe!sqlite3_step(sqlite3_stmt * pStmt)  Line 62029 + 0x9 
>> bytes   C
>>  PharmacyServer.exe!sqlite3Step(Vdbe * p)  Line 61954 + 0x9 bytes
>> C
>>  PharmacyServer.exe!sqlite3VdbeExec(Vdbe * p)  Line 3856 + 0x30 bytes
>> C
>>  PharmacyServer.exe!fts3FilterMethod(sqlite3_vtab_cursor * pCursor, int 
>> idxNum, const char * idxStr, int nVal, Mem * * apVal)  Line 51378 + 0x9 
>> bytesC
>>  PharmacyServer.exe!fts3EvalStart(Fts3Cursor * pCsr)  Line 52714 + 0x13 
>> bytesC
>>  PharmacyServer.exe!fts3EvalSelectDeferred(Fts3Cursor * pCsr, Fts3Expr * 
>> pRoot, Fts3TokenAndCost * aTC, int nTC)  Line 52634 + 0x2a bytesC
>> 
>> Does anybody know what's going on here?
> 
> Can you send me the database by email? Not via the list,
> as it will strip the attachment.
> 
> Dan Kennedy.
> 

Hi, 

I've been chasing this bug and tried couple of options and found out that these 
issues fix my problem:

1. The number of words in match string is capped at 16.
2. These characters in the match string I replaced with spaces.
case ',':
case '.':
case '/':
case '-':
case ':':
case '\'':
case '"':
case '(':
case ')':
case '\\':
case '@':

Was it a bug or was it the limitation? Or Perhaps I missed the documentation on 
FTS4. 

best regards,
Radzi.

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problem with FTS4 - Floating point error.

2011-10-18 Thread Dan Kennedy



On 10/18/2011 05:02 PM, Mohd Radzi Ibrahim wrote:

Hi,

This is my table schema:

CREATE VIRTUAL TABLE LocationFTS using FTS4
(
name text,
address text,
email text,
remark text,
telno text,
contact text,
isDeleted text
);

This select statement gives floating point error in both sqlite3.exe and also 
my program (both my Ubuntu and Windows versions failed) :

select docid, name, address, email, remark, telNo, contact
from locationFTS
where locationFTS match 'suai plantation sdn bhd, p.o.box 730 97008 bintulu 
swk, tel 2 07-6637460 ah leng   06-9766061 a3.0';

PharmacyServer.exe!GenericKedaiRuncitDB::GetLocationFTS(LocationRecord& 
 r)  Line 147 + 0x14 bytes  C++
PharmacyServer.exe!wxSQLite3Statement::ExecuteQuery(bool 
transferStatementOwnership)  Line 1486 + 0xc bytes C++
PharmacyServer.exe!sqlite3_step(sqlite3_stmt * pStmt)  Line 62029 + 0x9 
bytes   C
PharmacyServer.exe!sqlite3Step(Vdbe * p)  Line 61954 + 0x9 bytes
C
PharmacyServer.exe!sqlite3VdbeExec(Vdbe * p)  Line 3856 + 0x30 bytes
C
PharmacyServer.exe!fts3FilterMethod(sqlite3_vtab_cursor * pCursor, int 
idxNum, const char * idxStr, int nVal, Mem * * apVal)  Line 51378 + 0x9 bytes   
 C
PharmacyServer.exe!fts3EvalStart(Fts3Cursor * pCsr)  Line 52714 + 0x13 
bytesC
PharmacyServer.exe!fts3EvalSelectDeferred(Fts3Cursor * pCsr, Fts3Expr * 
pRoot, Fts3TokenAndCost * aTC, int nTC)  Line 52634 + 0x2a bytesC

Does anybody know what's going on here?


Can you send me the database by email? Not via the list,
as it will strip the attachment.

Dan Kennedy.


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Problem with FTS4 - Floating point error.

2011-10-18 Thread Mohd Radzi Ibrahim
Hi,

This is my table schema:

CREATE VIRTUAL TABLE LocationFTS using FTS4
(
name text, 
address text,
email text, 
remark text, 
telno text, 
contact text, 
isDeleted text
);

This select statement gives floating point error in both sqlite3.exe and also 
my program (both my Ubuntu and Windows versions failed) :

select docid, name, address, email, remark, telNo, contact 
from locationFTS 
where locationFTS match 'suai plantation sdn bhd, p.o.box 730 97008 bintulu 
swk, tel 2 07-6637460 ah leng   06-9766061 a3.0';


It runs OK without if nothing matches, but when I've populated the table with 
some 10,000 records, and this record is matching, the select statement failed. 
When I reduces the match string to 80, it's Ok. But it's not the length that 
causes it to fail, because there are other statement that has match string more 
that 100 characters.

On Windows (VS2010) I have this stack of calls that causes the error:

 
PharmacyServer.exe!GenericKedaiRuncitDB::GetLocationFTS(LocationRecord 
& r)  Line 147 + 0x14 bytes  C++
PharmacyServer.exe!wxSQLite3Statement::ExecuteQuery(bool 
transferStatementOwnership)  Line 1486 + 0xc bytes C++
PharmacyServer.exe!sqlite3_step(sqlite3_stmt * pStmt)  Line 62029 + 0x9 
bytes   C
PharmacyServer.exe!sqlite3Step(Vdbe * p)  Line 61954 + 0x9 bytes
C
PharmacyServer.exe!sqlite3VdbeExec(Vdbe * p)  Line 3856 + 0x30 bytes
C
PharmacyServer.exe!fts3FilterMethod(sqlite3_vtab_cursor * pCursor, int 
idxNum, const char * idxStr, int nVal, Mem * * apVal)  Line 51378 + 0x9 bytes   
 C
PharmacyServer.exe!fts3EvalStart(Fts3Cursor * pCsr)  Line 52714 + 0x13 
bytesC
PharmacyServer.exe!fts3EvalSelectDeferred(Fts3Cursor * pCsr, Fts3Expr * 
pRoot, Fts3TokenAndCost * aTC, int nTC)  Line 52634 + 0x2a bytesC

Does anybody know what's going on here?

Thanks.

Radzi.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users