/ Check-in [84aae3b0]
Login

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

Overview
Comment:Check the return code of full_fsync() when used to sync a directory fd. (CVS 2780)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 84aae3b0ae7381710ff0bc9881cbde3559bb580b
User & Date: danielk1977 2005-11-25 08:47:57
Context
2005-11-25
09:01
If SQLITE_DISABLE_LFS is defined, omit the bigfile tests. (CVS 2781) check-in: f882a516 user: danielk1977 tags: trunk
08:47
Check the return code of full_fsync() when used to sync a directory fd. (CVS 2780) check-in: 84aae3b0 user: danielk1977 tags: trunk
02:43
Preserve 64-bit last insert rowids across triggers. (CVS 2779) check-in: 4dd7cfaa user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/os_unix.c.

868
869
870
871
872
873
874
875


876
877
878
879
880
881
882
  SimulateIOError(SQLITE_IOERR);
  TRACE2("SYNC    %-3d\n", id->h);
  if( full_fsync(id->h, id->fullSync, dataOnly) ){
    return SQLITE_IOERR;
  }
  if( id->dirfd>=0 ){
    TRACE2("DIRSYNC %-3d\n", id->dirfd);
    full_fsync(id->dirfd, id->fullSync, 0);


    close(id->dirfd);  /* Only need to sync once, so close the directory */
    id->dirfd = -1;    /* when we are done. */
  }
  return SQLITE_OK;
}

/*







|
>
>







868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
  SimulateIOError(SQLITE_IOERR);
  TRACE2("SYNC    %-3d\n", id->h);
  if( full_fsync(id->h, id->fullSync, dataOnly) ){
    return SQLITE_IOERR;
  }
  if( id->dirfd>=0 ){
    TRACE2("DIRSYNC %-3d\n", id->dirfd);
    if( full_fsync(id->dirfd, id->fullSync, 0) ){
        return SQLITE_IOERR;
    }
    close(id->dirfd);  /* Only need to sync once, so close the directory */
    id->dirfd = -1;    /* when we are done. */
  }
  return SQLITE_OK;
}

/*