/ 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 Unified Diffs Ignore Whitespace Patch

Changes to src/memdb.c.

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







<







302
303
304
305
306
307
308

309
310
311
312
313
314
315
  sqlite3_file *pFile,
  sqlite3_int64 iOfst,
  int iAmt,
  void **pp
){
  MemFile *p = (MemFile *)pFile;
  if( iOfst+iAmt>p->sz ){

    *pp = 0;
  }else{
    p->nMmap++;
    *pp = (void*)(p->aData + iOfst);
  }
  return SQLITE_OK;
}