[EMAIL PROTECTED] wrote:

Hmmm... In the later versions of sqlite with 64-bit ROWID values, doesn't it
treat them as unsigned?  It sure seems that autoincremented rowid values
should always be positive...???

No, SQLite treats them as 64 bit signed integers. The first 2^63 values are positive, the next 2^63 values are negative. The problem I was alluding to is, that the code that is extracting the range limited values from SQLite into its own 32 integer values may treat those values as signed 32 bit integers which will wrap to negative values after 2^31 rows are inserted. if you are sorting by this id number, suddenly the newest row has the lowest id not the largest id. SQLite itself will have the same problem but only after 2^63 rows are inserted (and we don't have enough time to wait for that to ever happen, its just too large a number).

Dennis Cote

Reply via email to