/ Check-in [82c4c4e2]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Incremental merge to prevent a huge pileup of merge conflicts resulting from editing the same code in two different branches.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | apple-osx
Files: files | file ages | folders
SHA1: 82c4c4e248bfca38bc3285d5a8414f7180c2eab5
User & Date: drh 2015-02-19 15:56:27
Context
2015-02-21
01:03
Merge trunk changes into the apple-osx branch. check-in: 3896e233 user: drh tags: apple-osx
2015-02-19
15:56
Incremental merge to prevent a huge pileup of merge conflicts resulting from editing the same code in two different branches. check-in: 82c4c4e2 user: drh tags: apple-osx
02:43
Move the os_unix.c file closer to trunk. check-in: 57d70240 user: drh tags: apple-osx
02:43
Move the os_unix.c file closer to apple-osx. check-in: 81f242e3 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/func.c.

   288    288       if( p1<0 ){
   289    289         for(z2=z; *z2; len++){
   290    290           SQLITE_SKIP_UTF8(z2);
   291    291         }
   292    292       }
   293    293     }
   294    294   #ifdef SQLITE_SUBSTR_COMPATIBILITY
          295  +  /* If SUBSTR_COMPATIBILITY is defined then substr(X,0,N) work the same as
          296  +  ** as substr(X,1,N) - it returns the first N characters of X.  This
          297  +  ** is essentially a back-out of the bug-fix in check-in [5fc125d362df4b8]
          298  +  ** from 2009-02-02 for compatibility of applications that exploited the
          299  +  ** old buggy behavior. */
   295    300     if( p1==0 ) p1 = 1; /* <rdar://problem/6778339> */
   296    301   #endif
   297    302     if( argc==3 ){
   298    303       p2 = sqlite3_value_int(argv[2]);
   299    304       if( p2<0 ){
   300    305         p2 = -p2;
   301    306         negP2 = 1;

Changes to src/os_unix.c.

  3541   3541       }
  3542   3542       got = osRead(id->h, pBuf, cnt);
  3543   3543   #endif
  3544   3544       if( got==cnt ) break;
  3545   3545       if( got<0 ){
  3546   3546         if( errno==EINTR ){ got = 1; continue; }
  3547   3547         prior = 0;
  3548         -      storeLastErrno((unixFile*)id, errno);
         3548  +      storeLastErrno((unixFile*)id,  errno);
  3549   3549         break;
  3550   3550       }else if( got>0 ){
  3551   3551         cnt -= got;
  3552   3552         offset += got;
  3553   3553         prior += got;
  3554   3554         pBuf = (void*)(got + (char*)pBuf);
  3555   3555       }
................................................................................
  5449   5449       if( deleteFlag && pShmNode->h>=0 ) {
  5450   5450         if (deleteFlag == 1) { 
  5451   5451           osUnlink(pShmNode->zFilename);
  5452   5452         } else if (deleteFlag == 2) {
  5453   5453           /* ftruncate(pShmNode->h, 32 * 1024); */
  5454   5454         }
  5455   5455       }
  5456         -    
  5457   5456       unixShmPurge(pDbFd);
  5458   5457     }
  5459   5458     unixLeaveMutex();
  5460   5459   
  5461   5460     return SQLITE_OK;
  5462   5461   }
  5463   5462   

Changes to src/sqlite.h.in.

   962    962   #define SQLITE_FCNTL_TEMPFILENAME           16
   963    963   #define SQLITE_FCNTL_MMAP_SIZE              18
   964    964   #define SQLITE_FCNTL_TRACE                  19
   965    965   #define SQLITE_FCNTL_HAS_MOVED              20
   966    966   #define SQLITE_FCNTL_SYNC                   21
   967    967   #define SQLITE_FCNTL_COMMIT_PHASETWO        22
   968    968   #define SQLITE_FCNTL_WIN32_SET_HANDLE       23
          969  +
   969    970   /* deprecated names */
   970    971   #define SQLITE_GET_LOCKPROXYFILE      SQLITE_FCNTL_GET_LOCKPROXYFILE
   971    972   #define SQLITE_SET_LOCKPROXYFILE      SQLITE_FCNTL_SET_LOCKPROXYFILE
   972    973   #define SQLITE_LAST_ERRNO             SQLITE_FCNTL_LAST_ERRNO
          974  +
   973    975   
   974    976   /*
   975    977   ** CAPI3REF: Mutex Handle
   976    978   **
   977    979   ** The mutex module within SQLite defines [sqlite3_mutex] to be an
   978    980   ** abstract type for a mutex object.  The SQLite core never looks
   979    981   ** at the internal representation of an [sqlite3_mutex].  It only
................................................................................
  5062   5064   ** ^(This routine returns [SQLITE_OK] if shared cache was enabled or disabled
  5063   5065   ** successfully.  An [error code] is returned otherwise.)^
  5064   5066   **
  5065   5067   ** ^Shared cache is disabled by default. But this might change in
  5066   5068   ** future releases of SQLite.  Applications that care about shared
  5067   5069   ** cache setting should set it explicitly.
  5068   5070   **
  5069         -** ^Note: This method is deprecated on MacOS X 10.7 and iOS version 5.0
  5070         -** and will always return SQLITE_MISUSE, instead of calling this function
         5071  +** Note: This method is disabled on MacOS X 10.7 and iOS version 5.0
         5072  +** and will always return SQLITE_MISUSE. On those systems, 
  5071   5073   ** shared cache mode should be enabled per-database connection via 
  5072         -** sqlite3_open_v2 with SQLITE_OPEN_SHAREDCACHE instead.
         5074  +** [sqlite3_open_v2()] with [SQLITE_OPEN_SHAREDCACHE].
  5073   5075   **
  5074   5076   ** This interface is threadsafe on processors where writing a
  5075   5077   ** 32-bit integer is atomic.
  5076   5078   **
  5077   5079   ** See Also:  [SQLite Shared-Cache Mode]
  5078   5080   */
  5079   5081   int sqlite3_enable_shared_cache(int);

Changes to src/test_demovfs.c.

   111    111   **
   112    112   **   Much more efficient if the underlying OS is not caching write 
   113    113   **   operations.
   114    114   */
   115    115   
   116    116   #if !defined(SQLITE_TEST) || SQLITE_OS_UNIX
   117    117   
   118         -#include <sqlite3.h>
          118  +#include "sqlite3.h"
   119    119   
   120    120   #include <assert.h>
   121    121   #include <string.h>
   122    122   #include <sys/types.h>
   123    123   #include <sys/stat.h>
   124    124   #include <sys/file.h>
   125    125   #include <sys/param.h>