/ Check-in [ec65bbd0]
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:Make walIndexTryHdr() a private function. Fix an issue with SQLITE_MUTEX_NOOP.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ec65bbd06bdd3bf16a742c5bb1fab0dce756c01a
User & Date: drh 2010-06-26 22:16:03
Context
2010-06-28
10:15
Currently, if SQLite cannot find a table or index referred to by a query, it reloads the database schema from disk to see if the table or index has been added since the schema was cached in memory. Extend this behaviour to columns (which may have been added using ALTER TABLE) and fix some obscure cases related to tables and indexes (INDEXED BY, DROP TABLE etc.). check-in: 4932f228 user: dan tags: trunk
2010-06-26
22:16
Make walIndexTryHdr() a private function. Fix an issue with SQLITE_MUTEX_NOOP. check-in: ec65bbd0 user: drh tags: trunk
21:34
Suppress various compiler warnings. check-in: e82d008e user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/mutex_noop.c.

   196    196   
   197    197   /*
   198    198   ** If compiled with SQLITE_MUTEX_NOOP, then the no-op mutex implementation
   199    199   ** is used regardless of the run-time threadsafety setting.
   200    200   */
   201    201   #ifdef SQLITE_MUTEX_NOOP
   202    202   sqlite3_mutex_methods const *sqlite3DefaultMutex(void){
   203         -  return sqliteNoopMutex();
          203  +  return sqlite3NoopMutex();
   204    204   }
   205    205   #endif /* SQLITE_MUTEX_NOOP */
   206    206   #endif /* SQLITE_MUTEX_OMIT */

Changes to src/wal.c.

  1667   1667   ** If and only if the read is consistent and the header is different from
  1668   1668   ** pWal->hdr, then pWal->hdr is updated to the content of the new header
  1669   1669   ** and *pChanged is set to 1.
  1670   1670   **
  1671   1671   ** If the checksum cannot be verified return non-zero. If the header
  1672   1672   ** is read successfully and the checksum verified, return zero.
  1673   1673   */
  1674         -int walIndexTryHdr(Wal *pWal, int *pChanged){
         1674  +static int walIndexTryHdr(Wal *pWal, int *pChanged){
  1675   1675     u32 aCksum[2];                  /* Checksum on the header content */
  1676   1676     WalIndexHdr h1, h2;             /* Two copies of the header content */
  1677   1677     WalIndexHdr volatile *aHdr;     /* Header in shared memory */
  1678   1678   
  1679   1679     /* The first page of the wal-index must be mapped at this point. */
  1680   1680     assert( pWal->nWiData>0 && pWal->apWiData[0] );
  1681   1681