SQLite

Changes On Branch einval-from-fallocate
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Changes In Branch einval-from-fallocate Excluding Merge-Ins

This is equivalent to a diff from e336cf00 to ab3a5539

2018-06-02
19:01
Fix the usage of posix_fallocate() so that it correctly responds to EINVAL returns. (check-in: ce2c3e7a user: drh tags: trunk)
17:00
Update a test case in malloc5.test to take into account that malloc() sometimes returns slightly more space than requested. (check-in: 3d5eae1c user: dan tags: trunk)
16:32
Work around a sanitizer warning about a pointer being only 4-byte aligned instead of 8-byte aligned. (Closed-Leaf check-in: 1b807b51 user: drh tags: align8-fix)
14:37
Proposed fix for the use of posix_fallocate() so that it handles EINVAL returns correctly. (Closed-Leaf check-in: ab3a5539 user: drh tags: einval-from-fallocate)
12:05
Fix the CSV extension so that it works with single-column CSV files. (check-in: e336cf00 user: drh tags: trunk)
11:31
Ensure that sqlite3AuthRead() is only call for TK_COLUMN and TK_TRIGGER expression nodes. This fixes a harmless assert() identified by OSSFuzz. Move the assert() into a position where it is tested even if the authorizer is disabled. (check-in: d0c3beef user: drh tags: trunk)

Changes to src/os_unix.c.

3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
      /* The code below is handling the return value of osFallocate() 
      ** correctly. posix_fallocate() is defined to "returns zero on success, 
      ** or an error number on  failure". See the manpage for details. */
      int err;
      do{
        err = osFallocate(pFile->h, buf.st_size, nSize-buf.st_size);
      }while( err==EINTR );
      if( err ) return SQLITE_IOERR_WRITE;
#else
      /* If the OS does not have posix_fallocate(), fake it. Write a 
      ** single byte to the last byte in each block that falls entirely
      ** within the extended region. Then, if required, a single byte
      ** at offset (nSize-1), to set the size of the file correctly.
      ** This is a similar technique to that used by glibc on systems
      ** that do not have a real fallocate() call.







|







3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
      /* The code below is handling the return value of osFallocate() 
      ** correctly. posix_fallocate() is defined to "returns zero on success, 
      ** or an error number on  failure". See the manpage for details. */
      int err;
      do{
        err = osFallocate(pFile->h, buf.st_size, nSize-buf.st_size);
      }while( err==EINTR );
      if( err && err!=EINVAL ) return SQLITE_IOERR_WRITE;
#else
      /* If the OS does not have posix_fallocate(), fake it. Write a 
      ** single byte to the last byte in each block that falls entirely
      ** within the extended region. Then, if required, a single byte
      ** at offset (nSize-1), to set the size of the file correctly.
      ** This is a similar technique to that used by glibc on systems
      ** that do not have a real fallocate() call.