[android-developers] Issue with Full Text Search (FTS3) queries in SQL in Android 2.2 Froyo

198 views
Skip to first unread message

Luis Santos

unread,
May 23, 2010, 7:40:19 AM5/23/10
to Android Developers
Hi all,

I've updated my Nexus One to Android 2.2 Froyo to test one of my
Android apps, and i'm having some issues with FTS3 queries.
I use a virtual table created like this:

CREATE VIRTUAL TABLE table_lyrics USING FTS3( _id INTEGER PRIMARY KEY
AUTOINCREMENT, artist TEXT NOT NULL, title TEXT NOT NULL, lyrics TEXT
NOT NULL, path TEXT)

This is what the logcat says:

I/Database( 1385): sqlite returned: error code = 1, msg = prepared
statement aborts at 7: [SELECT lyrics, path FROM table_lyrics WHERE
table_lyrics MATCH 'artist:"radiohead" title:"paranoidandroid"']
W/dalvikvm( 1385): threadid=11: thread exiting with uncaught exception
(group=0x4001d7f0)
E/AndroidRuntime( 1385): FATAL EXCEPTION: Thread-16
E/AndroidRuntime( 1385): android.database.sqlite.SQLiteException: SQL
logic error or missing database
E/AndroidRuntime( 1385): at
android.database.sqlite.SQLiteQuery.native_fill_window(Native Method)
E/AndroidRuntime( 1385): at
android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:70)
E/AndroidRuntime( 1385): at
android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:283)
E/AndroidRuntime( 1385): at
android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:264)
E/AndroidRuntime( 1385): at
android.database.AbstractCursor.moveToPosition(AbstractCursor.java:
171)
E/AndroidRuntime( 1385): at
android.database.AbstractCursor.moveToFirst(AbstractCursor.java:248)
E/AndroidRuntime( 1385): at
com.spartancoders.golyrics.LyricsUtils.cacheSearch(LyricsUtils.java:
482)

I've tested other no-FTS SQL queries and all works fine, but every
MATCH query gives an error like the one above. All worked fine in
earlier versions of Android (1.5, 1.6, 2.0 and 2.1)

Any help will be much appreciated :)

Thanks in advance!

Luis.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-d...@googlegroups.com
To unsubscribe from this group, send email to
android-develop...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

yuku

unread,
Jul 12, 2010, 6:36:13 AM7/12/10
to Android Developers
Me too. And it happens on final build of 2.2, too :(

nobre

unread,
Jul 26, 2012, 12:52:32 PM7/26/12
to android-d...@googlegroups.com
I found a possible culprit: while using the optional 5th and 6th parameters of the snippet() function (related to the column index to obtain snippets from, and number of tokens to return), I get the crash on these android versions. If I use up to the 4th arguments, there is no issue. Why that happens with only these couple versions remains a question.

Rafael

Em quarta-feira, 25 de julho de 2012 14h46min58s UTC-3, nobre escreveu:
Hi! I'm experiencing this issue on Android 2.2 and 2.3.3. Emulators/devices with 2.1 or 4.0.3 , 4.1 works fine.
Is this a real deal breaker for FTS on these versions or is there any work-arounds known ?

Regards
Rafael
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
Reply all
Reply to author
Forward
0 new messages