/ Check-in [10a6e510]
Login

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

Overview
Comment:Disable shared memory operations using the unix-nolock VFS.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 10a6e510497b471d67ac3dfb19ff256a7d18adf4
User & Date: drh 2014-09-22 03:22:27
Context
2014-09-22
14:30
Tune the query planner to be more aggressive about using automatic indexes on views and subqueries for which there is not opportunity to declare a persistent schema index. check-in: 41de1643 user: drh tags: trunk
03:22
Disable shared memory operations using the unix-nolock VFS. check-in: 10a6e510 user: drh tags: trunk
2014-09-21
22:31
Correctly handle an ORDER BY clause on an outer query when applying the compound-subquery flattening optimization. Ticket [d11a6e908f]. Also add the SQLITE_ENABLE_SELECTTRACE option for additional debugging and analysis information about select statement processing. check-in: d5880abd user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/os_unix.c.

  4947   4947   **
  4948   4948   **   *  A constant sqlite3_io_methods object call METHOD that has locking
  4949   4949   **      methods CLOSE, LOCK, UNLOCK, CKRESLOCK.
  4950   4950   **
  4951   4951   **   *  An I/O method finder function called FINDER that returns a pointer
  4952   4952   **      to the METHOD object in the previous bullet.
  4953   4953   */
  4954         -#define IOMETHODS(FINDER, METHOD, VERSION, CLOSE, LOCK, UNLOCK, CKLOCK)      \
         4954  +#define IOMETHODS(FINDER, METHOD, VERSION, CLOSE, LOCK, UNLOCK, CKLOCK, SHMMAP) \
  4955   4955   static const sqlite3_io_methods METHOD = {                                   \
  4956   4956      VERSION,                    /* iVersion */                                \
  4957   4957      CLOSE,                      /* xClose */                                  \
  4958   4958      unixRead,                   /* xRead */                                   \
  4959   4959      unixWrite,                  /* xWrite */                                  \
  4960   4960      unixTruncate,               /* xTruncate */                               \
  4961   4961      unixSync,                   /* xSync */                                   \
................................................................................
  4962   4962      unixFileSize,               /* xFileSize */                               \
  4963   4963      LOCK,                       /* xLock */                                   \
  4964   4964      UNLOCK,                     /* xUnlock */                                 \
  4965   4965      CKLOCK,                     /* xCheckReservedLock */                      \
  4966   4966      unixFileControl,            /* xFileControl */                            \
  4967   4967      unixSectorSize,             /* xSectorSize */                             \
  4968   4968      unixDeviceCharacteristics,  /* xDeviceCapabilities */                     \
  4969         -   unixShmMap,                 /* xShmMap */                                 \
         4969  +   SHMMAP,                     /* xShmMap */                                 \
  4970   4970      unixShmLock,                /* xShmLock */                                \
  4971   4971      unixShmBarrier,             /* xShmBarrier */                             \
  4972   4972      unixShmUnmap,               /* xShmUnmap */                               \
  4973   4973      unixFetch,                  /* xFetch */                                  \
  4974   4974      unixUnfetch,                /* xUnfetch */                                \
  4975   4975   };                                                                           \
  4976   4976   static const sqlite3_io_methods *FINDER##Impl(const char *z, unixFile *p){   \
................................................................................
  4988   4988   IOMETHODS(
  4989   4989     posixIoFinder,            /* Finder function name */
  4990   4990     posixIoMethods,           /* sqlite3_io_methods object name */
  4991   4991     3,                        /* shared memory and mmap are enabled */
  4992   4992     unixClose,                /* xClose method */
  4993   4993     unixLock,                 /* xLock method */
  4994   4994     unixUnlock,               /* xUnlock method */
  4995         -  unixCheckReservedLock     /* xCheckReservedLock method */
         4995  +  unixCheckReservedLock,    /* xCheckReservedLock method */
         4996  +  unixShmMap                /* xShmMap method */
  4996   4997   )
  4997   4998   IOMETHODS(
  4998   4999     nolockIoFinder,           /* Finder function name */
  4999   5000     nolockIoMethods,          /* sqlite3_io_methods object name */
  5000   5001     3,                        /* shared memory is disabled */
  5001   5002     nolockClose,              /* xClose method */
  5002   5003     nolockLock,               /* xLock method */
  5003   5004     nolockUnlock,             /* xUnlock method */
  5004         -  nolockCheckReservedLock   /* xCheckReservedLock method */
         5005  +  nolockCheckReservedLock,  /* xCheckReservedLock method */
         5006  +  0                         /* xShmMap method */
  5005   5007   )
  5006   5008   IOMETHODS(
  5007   5009     dotlockIoFinder,          /* Finder function name */
  5008   5010     dotlockIoMethods,         /* sqlite3_io_methods object name */
  5009   5011     1,                        /* shared memory is disabled */
  5010   5012     dotlockClose,             /* xClose method */
  5011   5013     dotlockLock,              /* xLock method */
  5012   5014     dotlockUnlock,            /* xUnlock method */
  5013         -  dotlockCheckReservedLock  /* xCheckReservedLock method */
         5015  +  dotlockCheckReservedLock, /* xCheckReservedLock method */
         5016  +  0                         /* xShmMap method */
  5014   5017   )
  5015   5018   
  5016   5019   #if SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS
  5017   5020   IOMETHODS(
  5018   5021     flockIoFinder,            /* Finder function name */
  5019   5022     flockIoMethods,           /* sqlite3_io_methods object name */
  5020   5023     1,                        /* shared memory is disabled */
  5021   5024     flockClose,               /* xClose method */
  5022   5025     flockLock,                /* xLock method */
  5023   5026     flockUnlock,              /* xUnlock method */
  5024         -  flockCheckReservedLock    /* xCheckReservedLock method */
         5027  +  flockCheckReservedLock,   /* xCheckReservedLock method */
         5028  +  0                         /* xShmMap method */
  5025   5029   )
  5026   5030   #endif
  5027   5031   
  5028   5032   #if OS_VXWORKS
  5029   5033   IOMETHODS(
  5030   5034     semIoFinder,              /* Finder function name */
  5031   5035     semIoMethods,             /* sqlite3_io_methods object name */
  5032   5036     1,                        /* shared memory is disabled */
  5033   5037     semClose,                 /* xClose method */
  5034   5038     semLock,                  /* xLock method */
  5035   5039     semUnlock,                /* xUnlock method */
  5036         -  semCheckReservedLock      /* xCheckReservedLock method */
         5040  +  semCheckReservedLock,     /* xCheckReservedLock method */
         5041  +  0                         /* xShmMap method */
  5037   5042   )
  5038   5043   #endif
  5039   5044   
  5040   5045   #if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE
  5041   5046   IOMETHODS(
  5042   5047     afpIoFinder,              /* Finder function name */
  5043   5048     afpIoMethods,             /* sqlite3_io_methods object name */
  5044   5049     1,                        /* shared memory is disabled */
  5045   5050     afpClose,                 /* xClose method */
  5046   5051     afpLock,                  /* xLock method */
  5047   5052     afpUnlock,                /* xUnlock method */
  5048         -  afpCheckReservedLock      /* xCheckReservedLock method */
         5053  +  afpCheckReservedLock,     /* xCheckReservedLock method */
         5054  +  0                         /* xShmMap method */
  5049   5055   )
  5050   5056   #endif
  5051   5057   
  5052   5058   /*
  5053   5059   ** The proxy locking method is a "super-method" in the sense that it
  5054   5060   ** opens secondary file descriptors for the conch and lock files and
  5055   5061   ** it uses proxy, dot-file, AFP, and flock() locking methods on those
................................................................................
  5066   5072   IOMETHODS(
  5067   5073     proxyIoFinder,            /* Finder function name */
  5068   5074     proxyIoMethods,           /* sqlite3_io_methods object name */
  5069   5075     1,                        /* shared memory is disabled */
  5070   5076     proxyClose,               /* xClose method */
  5071   5077     proxyLock,                /* xLock method */
  5072   5078     proxyUnlock,              /* xUnlock method */
  5073         -  proxyCheckReservedLock    /* xCheckReservedLock method */
         5079  +  proxyCheckReservedLock,   /* xCheckReservedLock method */
         5080  +  0                         /* xShmMap method */
  5074   5081   )
  5075   5082   #endif
  5076   5083   
  5077   5084   /* nfs lockd on OSX 10.3+ doesn't clear write locks when a read lock is set */
  5078   5085   #if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE
  5079   5086   IOMETHODS(
  5080   5087     nfsIoFinder,               /* Finder function name */
  5081   5088     nfsIoMethods,              /* sqlite3_io_methods object name */
  5082   5089     1,                         /* shared memory is disabled */
  5083   5090     unixClose,                 /* xClose method */
  5084   5091     unixLock,                  /* xLock method */
  5085   5092     nfsUnlock,                 /* xUnlock method */
  5086         -  unixCheckReservedLock      /* xCheckReservedLock method */
         5093  +  unixCheckReservedLock,     /* xCheckReservedLock method */
         5094  +  0                          /* xShmMap method */
  5087   5095   )
  5088   5096   #endif
  5089   5097   
  5090   5098   #if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE
  5091   5099   /* 
  5092   5100   ** This "finder" function attempts to determine the best locking strategy 
  5093   5101   ** for the database file "filePath".  It then returns the sqlite3_io_methods