/ Check-in [80151d7e]
Login

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

Overview
Comment:Remove an incorrect assert() from the deserialize in-memory database VFS.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 80151d7e3b9fd84086874a1cebed024b9e14005ea2d0108cf6efcd07373fcf51
User & Date: drh 2019-01-31 16:09:48
Context
2019-02-01
13:34
Fix another corrupt-database-handling problem in fts5. check-in: 9876ae1b user: dan tags: trunk
2019-01-31
16:09
Remove an incorrect assert() from the deserialize in-memory database VFS. check-in: 80151d7e user: drh tags: trunk
15:38
Add the SQLITE_CONFIG_MEMDB_MAXSIZE configuration option for configuring the default maximum size of an in-memory database created using sqlite3_deserialize(). This is necessary to make the interface reasonably testable. check-in: cb72ee04 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/memdb.c.

   302    302     sqlite3_file *pFile,
   303    303     sqlite3_int64 iOfst,
   304    304     int iAmt,
   305    305     void **pp
   306    306   ){
   307    307     MemFile *p = (MemFile *)pFile;
   308    308     if( iOfst+iAmt>p->sz ){
   309         -    assert( CORRUPT_DB );
   310    309       *pp = 0;
   311    310     }else{
   312    311       p->nMmap++;
   313    312       *pp = (void*)(p->aData + iOfst);
   314    313     }
   315    314     return SQLITE_OK;
   316    315   }