Igor Tandetnik wrote:
> "B V, Phanisekhar" <[EMAIL PROTECTED]> wrote in
> message news:[EMAIL PROTECTED]
>> So is it possible
>> that SQLITE will give an error when attempting to insert a record even
>> if there are free ROWID's?
> 
> Yes, in theory. If you have close to 2^63-1 rows, probing at random for 
> a ROWID to reuse may just happen to keep hitting occupied ROWIDs. If I 
> remember correctly, after a certain number of unsuccessful attemps 
> SQLite gives up and returns an error.
> 
> Of course, it is highly unlikely that you will ever have anywhere close 
> to 2^63 rows. Storage requirements alone are prohibitive. The database 
> will likely become unusable long before that.
> 
> In fact, the only realistic way to take the highest possible ROWID, and 
> thus force SQLite into "pick at random" mode, is to explicitly specify 
> the large ROWID when inserting a record. So just don't do that.
> 

There is another possible error when inserting even if there are free 
rowids. That is the SQLITE_FULL error that can be generated if the 
AUTOINC keyword is used. See http://www.sqlite.org/autoinc.html for full 
details.

This keyword may be the solution to the OPs ocncerns as well.

HTH
Dennis Cote
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to