开发者

Sqlite and FTS tables with ICU tokenizer bug or not?

I have a strange problem with an FTS table in my sqlite database. I am creating a table like this:

CREATE VIRTUAL TABLE table01 USING fts4(name, content, tokenize=icu ru_RU);

Then inserting two rows, one with name and content and one only with name.

INSERT INTO table01(name, content) VALUES('Abc1', 'asdasd');
INSERT INTO table01(name) VALUES('Abc2');

And when I am trying to update or delete row with only name column filled I am getting an error "Access violation at address 7244CF96 in module 'sqlite3.dll'. Read of address 00000000.". There is all ok with other row, I can update it or delete as usual. It doesn't matter what locale do I use, I've tried en_US and many others. And there is no difference between fts3 and fts4. It seems like ICU bug, because there is no problem with built-in tokenizers of sqlite. Is it ICU or sqlite bug, or I am doing something wrong? I've tried this on SQLite Expert and in my project with all required compile options and all libraries included.


Latest in the stack frame:

msvcr100d.dll!strlen(unsigned char * buf)  Line 81  Asm
my_prog.exe!icuOpen(sqlite3_tokenizer * pTokenizer, const char * zInput, int nInput, sqlite3_tokenizer_cursor * * ppCursor)  Line 60276 + 0x9 bytes
my_prog.exe!fts3PendingTermsAdd(Fts3Table * p, const char * zText, int iCol, unsigned int * pnWord)  Line 52616 + 0x18 bytes    C
my_prog.exe!fts3DeleteTerms(int * pRC, Fts3Table * p, Mem * * apVal, unsig开发者_如何转开发ned int * aSz)  Line 52828 + 0x1a bytes   C

fts3DeleteTerms is getting null pointer instead of string and passing it down. I cannot debug it step-by-step right now (I am using amalgamation and VS 2010 cannot debug more than 65535 lines code).


Address 00000000 is, of course, a null pointer. Sounds like an sqlite3 bug (at least in the fts4/icu glue) if it is trying to pass null to the ICU tokenizer. Can you build everything in debug mode and find out who is getting the access violation?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜