SQLite

Check-in [c6ab807b72]
Login

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

Overview
Comment:Strengthen the implementations of xShmMemoryBarrier on both the unix and windows VFSes, so that they likely work even if SQLITE_THREADSAFE=0 is used.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c6ab807b72ddfc1462f61aa91442b6fac04ace8a
User & Date: drh 2015-09-24 12:40:43.573
Context
2015-09-24
17:38
Fix over-length source code lines in where.c. No logic changes. (check-in: 1c8c5380a8 user: drh tags: trunk)
15:17
Merge all recent trunk enhancements and fixes into the begin-concurrent branch. (check-in: c63c1e15f8 user: drh tags: begin-concurrent)
15:06
Merge trunk changes into the cursor-hints branch. (check-in: fbe637620f user: drh tags: cursor-hints)
14:43
Merge recent trunk enhancements into the apple-osx branch. (check-in: 4dd06d8ba1 user: drh tags: apple-osx)
14:26
Merge all the latest trunk enhancements into the sessions branch. (check-in: c91065f8ed user: drh tags: sessions)
12:40
Strengthen the implementations of xShmMemoryBarrier on both the unix and windows VFSes, so that they likely work even if SQLITE_THREADSAFE=0 is used. (check-in: c6ab807b72 user: drh tags: trunk)
12:19
Make sure joins work correctly when both sides of the join are connected using indexed expressions. (check-in: c2fcb03299 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/os_unix.c.
4656
4657
4658
4659
4660
4661
4662

4663
4664
4665
4666
4667
4668
4669
4670
** All loads and stores begun before the barrier must complete before
** any load or store begun after the barrier.
*/
static void unixShmBarrier(
  sqlite3_file *fd                /* Database file holding the shared memory */
){
  UNUSED_PARAMETER(fd);

  unixEnterMutex();
  unixLeaveMutex();
}

/*
** Close a connection to shared-memory.  Delete the underlying 
** storage if deleteFlag is true.
**







>
|







4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
** All loads and stores begun before the barrier must complete before
** any load or store begun after the barrier.
*/
static void unixShmBarrier(
  sqlite3_file *fd                /* Database file holding the shared memory */
){
  UNUSED_PARAMETER(fd);
  sqlite3MemoryBarrier();         /* compiler-defined memory barrier */
  unixEnterMutex();               /* Also mutex, for redundancy */
  unixLeaveMutex();
}

/*
** Close a connection to shared-memory.  Delete the underlying 
** storage if deleteFlag is true.
**
Changes to src/os_win.c.
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
** All loads and stores begun before the barrier must complete before
** any load or store begun after the barrier.
*/
static void winShmBarrier(
  sqlite3_file *fd          /* Database holding the shared memory */
){
  UNUSED_PARAMETER(fd);
  /* MemoryBarrier(); // does not work -- do not know why not */
  winShmEnterMutex();
  winShmLeaveMutex();
}

/*
** This function is called to obtain a pointer to region iRegion of the
** shared-memory associated with the database file fd. Shared-memory regions
** are numbered starting from zero. Each shared-memory region is szRegion







|
|







3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
** All loads and stores begun before the barrier must complete before
** any load or store begun after the barrier.
*/
static void winShmBarrier(
  sqlite3_file *fd          /* Database holding the shared memory */
){
  UNUSED_PARAMETER(fd);
  sqlite3MemoryBarrier();   /* compiler-defined memory barrier */
  winShmEnterMutex();       /* Also mutex, for redundancy */
  winShmLeaveMutex();
}

/*
** This function is called to obtain a pointer to region iRegion of the
** shared-memory associated with the database file fd. Shared-memory regions
** are numbered starting from zero. Each shared-memory region is szRegion