On 4/4/19 11:35 PM, Simon Slavin wrote: > On 5 Apr 2019, at 4:14am, Richard Damon <[email protected]> wrote: > >> I think is logic is to attempt to insert a row, and if rather than >> inserting it, the call returns the error condition, 'Database Full' > Okay. So now we understand what OP meant by the database being full. > > SQLITE_FULL does not mean 'Database Full'. What's full is the volume the > database is stored on. And the problem is worse than it might appear because > if the volume is full you can't reliably do anything to the database. > Because even if your next SQL command is DELETE, the first thing that'll > happen is that SQLite will try to write to the journal file. And that may > fail, because there's no room for the journal file to get bigger. > > In other words, if your database ever gets this big, you need a human to come > sort things out. > > So don't do that. Don't let your database get that big. Monitor the free > space and start deleting stuff if free space gets below a certain amount. > Leave yourself 5Meg of space free or something. > > Simon. Yes, if the error is the SQLite error from the OS saying the disk is full, then you are in big trouble as you can't expect to be able to do anything. If perhaps you have some hooks at the file system level that return that error if this one file hits a certain size and doesn't allow it to get bigger, but there is still space for the journal file, you might get the sort of behavior described.
-- Richard Damon _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

