/ Check-in [fadbc5e2]
Login

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

Overview
Comment:Mark an unreachable branch using NEVER().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | memdb
Files: files | file ages | folders
SHA3-256: fadbc5e23f93bedd705bdc83cd3781b3821a231034bae5b942c94da77227721c
User & Date: drh 2018-03-07 01:37:05
Context
2018-03-07
13:01
Add the sqlite3_serialize() and sqlite3_deserialize() interfaces, enabled when the -DSQLITE_ENABLE_DESERIALIZE compile-time option is used. check-in: fc42d31d user: drh tags: trunk
01:37
Mark an unreachable branch using NEVER(). Closed-Leaf check-in: fadbc5e2 user: drh tags: memdb
2018-03-06
21:43
Improved documentation for sqlite3_serialize() and sqlite3_deserialize(). Change the name of the compile-time option to enable these interfaces from SQLITE_ENABLE_MEMDB to SQLITE_ENABLE_DESERIALIZE. check-in: f07e97ae user: drh tags: memdb
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/memdb.c.

   560    560   ** This routine is called when the extension is loaded.
   561    561   ** Register the new VFS.
   562    562   */
   563    563   int sqlite3MemdbInit(void){
   564    564     sqlite3_vfs *pLower = sqlite3_vfs_find(0);
   565    565     int sz = pLower->szOsFile;
   566    566     memdb_vfs.pAppData = pLower;
   567         -  if( sz<sizeof(MemFile) ) sz = sizeof(MemFile);
          567  +  /* In all known configurations of SQLite, the size of a default
          568  +  ** sqlite3_file is greater than the size of a memdb sqlite3_file.
          569  +  ** Should that ever change, remove the following NEVER() */
          570  +  if( NEVER(sz<sizeof(MemFile)) ) sz = sizeof(MemFile);
   568    571     memdb_vfs.szOsFile = sz;
   569    572     return sqlite3_vfs_register(&memdb_vfs, 0);
   570    573   }
   571    574   #endif /* SQLITE_ENABLE_DESERIALIZE */