Re: [sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-13 Thread ohadp
Glad I could help find something, hope I put you in the right direction with the source sample. In the meantime I've moved to standard tables due to other limitations imposed by FTS1/2. Scott Hess wrote: > > OK, there's definite meat, here. I have other reports of users seeing > this problem.

Re: [sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-12 Thread Scott Hess
OK, there's definite meat, here. I have other reports of users seeing this problem. It's specifically related to doing UPDATE against an fts1 or fts2 table. INSERT and DELETE both work fine. As far as I can tell, UPDATE may have never worked, or may have worked only in specific circumstances.

Re: [sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-12 Thread ohadp
looks like the file came in without CRLF, here goes: -- #include "../sqlite-3_3_8/sqlite3.h" #include static sqlite3* db; void exec_dml(const TCHAR* cmd) { sqlite3_stmt* vm;

Re: [sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-12 Thread ohadp
here's a file, plain.cpp, which demonstrates the problem. if you're compiling on linux and not windows you'll have to do a few trivial changes. _T("string") is used to define a unicode string TCHAR is WORD/SHORT/etc Scott Hess wrote: > > There haven't been any changes to the fts1 code! > >

Re: [sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-12 Thread Scott Hess
There haven't been any changes to the fts1 code! Your best bet is to put together a .c file with a main() which causes the problem. Or a tcl script, or anything that would allow someone to see things locally. The problem right now is that there's no particular way for any of us to find the

Re: [sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-12 Thread ohadp
it looks like fts1/2 return an ascii string in disguise of a unicode string after an update to the data. John Stanton wrote: > > In that case your problem will be in your code, specifically in the > function which gives you a pointer to the data. > > Show us your code. > > ohadp wrote: >>

Re: [sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-12 Thread ohadp
It returns 3 (text) both before and after the update. I bet someone who's familiar with fts1 code would immediately spot the change that caused this encoding bug Dan Kennedy-4 wrote: > > On Thu, 2007-01-11 at 15:00 -0800, ohadp wrote: >> here's the detailed description of the apparent bug: >>

Re: [sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-11 Thread Dan Kennedy
On Thu, 2007-01-11 at 15:00 -0800, ohadp wrote: > here's the detailed description of the apparent bug: > > i'm using the _16 versions for getting text from an fts1 table. > if i insert data and select, i get good data, meaning my call to > sqlite3_column_text16(..) returns a pointer to a UNICODE

Re: [sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-11 Thread ohadp
I'm not using the various 'bind' calls but simply executing SQL inserts/updates/querys with _sqlite3_prepare, _sqlite3_step. notice that the insert comes through as unicode, the update is recognized as unicode but stored as ascii. i looked into the code one level deeper and it looks like the

Re: [sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-11 Thread ohadp
This is happening only with FTS1. With a normal table everything comes back normally. ohadp wrote: > > here's the detailed description of the apparent bug: > > i'm using the _16 versions for getting text from an fts1 table. > if i insert data and select, i get good data, meaning my call to

Re: [sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-11 Thread Scott Hess
Are you absolutely, positively certain that you're calling sqlite3_bind_text16() when setting up the update? I ask because I recently spent a long afternoon tracking down that basic mistake :-). -scott On 1/11/07, ohadp <[EMAIL PROTECTED]> wrote: here's the detailed description of the

Re: [sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-11 Thread ohadp
here's the detailed description of the apparent bug: i'm using the _16 versions for getting text from an fts1 table. if i insert data and select, i get good data, meaning my call to sqlite3_column_text16(..) returns a pointer to a UNICODE string. if i update and then select, my call to

Re: [sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-11 Thread John Stanton
In that case your problem will be in your code, specifically in the function which gives you a pointer to the data. Show us your code. ohadp wrote: i'm linking with it and calling the api directly. i think that sqlite3.exe doesn't have fts1 support in it. John Stanton wrote: How are you

Re: [sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-11 Thread ohadp
i'm linking with it and calling the api directly. i think that sqlite3.exe doesn't have fts1 support in it. John Stanton wrote: > > How are you calling Sqlite? Have you tried sqlite3.exe? > > ohadp wrote: >> Scott Hess <[EMAIL PROTECTED]> writes: >> >> >> >>> CREATE VIRTUAL TABLE t USING

Re: [sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-11 Thread Scott Hess
On 1/11/07, ohadp <[EMAIL PROTECTED]> wrote: Scott Hess <[EMAIL PROTECTED]> writes: > CREATE VIRTUAL TABLE t USING fts1(content); > INSERT INTO t (rowid, content) VALUES (1, 'this is a test'); > UPDATE t SET content = 'that was a test' WHERE rowid = 1; > > -- The following is returning

Re: [sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-11 Thread John Stanton
How are you calling Sqlite? Have you tried sqlite3.exe? ohadp wrote: Scott Hess <[EMAIL PROTECTED]> writes: CREATE VIRTUAL TABLE t USING fts1(content); INSERT INTO t (rowid, content) VALUES (1, 'this is a test'); UPDATE t SET content = 'that was a test' WHERE rowid = 1; -- The

Re: [sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-11 Thread ohadp
Scott Hess <[EMAIL PROTECTED]> writes: > > CREATE VIRTUAL TABLE t USING fts1(content); > INSERT INTO t (rowid, content) VALUES (1, 'this is a test'); > UPDATE t SET content = 'that was a test' WHERE rowid = 1; > > -- The following is returning 'gibberish here' for me: > SELECT content

[sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-11 Thread Ohad Eder-Pressman
inserts work once i update my fts1 table and then select data from it, i get gibberish. anybody seen something like this ?