Joe Wilson <[EMAIL PROTECTED]> wrote: > > On Nov 29, 2007, at 9:19 PM, Mark Brown wrote: > > > I have finally tracked down a bug that has plagued by vxWorks > > > port. It > > > appears that our file system's implementation of ftruncate() does > > > not like > > > to "truncate" a file larger than its current size, and returns > > > EINVAL for > > > this operation. > > This is interesting - ftruncate's behavior is not defined by POSIX > in this case. SQLite shouldn't rely on the commonly implemented > zero-fill extension. >
It doesn't. In fact we didn't realize the ftruncate() was being called with values larger than the current file size. I have been looking into the problem. It apparently only occurs when you have autovacuum enabled. It looks like attempt to ftruncate() to a larger size can simply be ignored and everything continues to work. We will make sure that ftruncate() does not get called with a size larger than the current file size in future releaes. -- D. Richard Hipp <[EMAIL PROTECTED]> ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------