> in one case you do:

> select count(*) from feeds  where _id = '0';

> in the other you do:

> select count(*) from feeds  where _id = 0;  <--- note the missing quotes

> this shouldn't make a difference (since SQLite is typeless), but I wonder if
> it is in this case.
> what is the type of _id?

>can you run the query that DRH suggested?

>    SELECT _id, typeof(_id) FROM feeds;

integer type.. query below

sqlite> SELECT _id, typeof(_id) FROM feeds;
1|integer
2|integer
3|integer
4|integer
5|integer
6|integer
7|integer
8|integer
9|integer
10|integer
11|integer
0|integer
13|integer
14|integer

> -Shane



On Tue, Nov 17, 2009 at 8:57 PM, Vasu Nori <vnori at google.com
<http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users>> wrote:

>* if I vacuum it, database file sems to have correct data.*>* sqlite> 
>vacuum*>*   ...> ;*>* sqlite> select count(*) from feeds  where _id = '0';*>* 
>count(*)*>* ----------*>* 1*>**>**>* I can't tell if this is a bug in sqlite3 
>or if the database file is corrupt*>* but sqlite3 can't recognize it when I do 
>"pragma integrity_check".*>**>**>* On Tue, Nov 17, 2009 at 5:09 PM, Vasu Nori 
><vnori at google.com 
><http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users>> wrote:*>**>* > 
>hi all*>* >*>* > attached is a database file with a strange behavior.*>* > it 
>has a table "feeds". has the following data (just selected 2 columns*>* for*>* 
>> discussion purpose)*>* >*>* > sqlite> select _id, feed from feeds;*>* > _id  
>       feed*>* >*>* > ----------*>* >*>*  
>---------------------------------------------------------------------------------------------*>*
> >*>* > 1*>* >*>* 
>http://www.google.com/calendar/feeds/1acpbk5jj328tc9up029ml6nog%40group.calendar.google.com/private/full*>*
> > 2*>* >*>* 
>http://www.google.com/calendar/feeds/1hpeekrpepcq41if0r6cnrf3nc%40group.calendar.google.com/private/full*>*
> > 3*>* >*>* 
>http://www.google.com/calendar/feeds/43p69tkmn5k339b10e9f1rrqgo%40group.calendar.google.com/private/full*>*
> > 4*>* >*>* 
>http://www.google.com/calendar/feeds/9rdtjbibdsve143hvcbrf2ru1c%40group.calendar.google.com/private/full*>*
> > 5*>* >*>* 
>http://www.google.com/calendar/feeds/fpbubjo06bb9t86o2bm9c3456c%40group.calendar.google.com/private/full*>*
> > 6*>* >*>* 
>http://www.google.com/calendar/feeds/m76b3e2ssuos4qm6qijb7o2pak%40group.calendar.google.com/private/full*>*
> > 7*>* >*>* 
>http://www.google.com/calendar/feeds/tijtufmt5st0m4rnvjhug7f8r8%40group.calendar.google.com/private/full*>*
> > 8*>* >*>* 
>http://www.google.com/calendar/feeds/tomastaylor%40gmail.com/private/full*>* > 
>9*>* >*>* 
>http://www.google.com/calendar/feeds/ttevp5oljm14v1m176spijqiag%40group.calendar.google.com/private/full*>*
> > 10*>* >*>* 
>http://www.google.com/calendar/feeds/usa%40holiday.calendar.google.com/private/full*>*
> > 11*>* >*>* 
>http://www.google.com/calendar/feeds/uu7524qmpvorujaq6hnfnvfrtg%40group.calendar.google.com/private/full*>*
> > 0           https://mail.google.com/mail/g/?client=1256578631218*>* >*>* > 
>13*>* >*>* 
>http://www.google.com/m8/feeds/groups/tomastay...@gmail.com/base2_property-android?v=3.0*>*
> >*>* > database file doesn't 'seem' to be corrupt*>* >*>* > sqlite> pragma 
>integrity_check;*>* > integrity_check*>* > ---------------*>* > ok*>* >*>* 
>>*>* > but can't select the row _id = 0*>* >*>* > sqlite> select count(*) from 
>feeds  where _id = 0;*>* > count(*)*>* > ----------*>* > 0*>* >*>* > what 
>gives? any insights into this interesting behavior?*>* >*>* > thanks*>* >*>* 
>>*>* _______________________________________________*>* sqlite-users mailing 
>list*>* sqlite-users at sqlite.org 
><http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users>*>* 
>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users*>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to