File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -491,6 +491,11 @@ static int ceshimPagerLock(ceshim_file *p){
491491 }else {
492492 // restore some data
493493 rc = ceshimLoadHeader (p );
494+ if ( rc == SQLITE_OK && pInfo -> ceshimHeader .schema > CESHIM_FILE_SCHEMA_NO ){
495+ // The file schema# is larger than this version can handle.
496+ // A newer version is needed to read this file.
497+ rc = CESHIM_ERROR_EXT_VERSION_TOO_OLD ;
498+ }
494499 if ( rc == SQLITE_OK ) rc = ceshimLoadMMTbl (p );
495500 if ( rc == SQLITE_OK ) rc = ceshimLoadPagemapData (p , 0 );
496501 }
Original file line number Diff line number Diff line change 99#ifndef ceshim_h
1010#define ceshim_h
1111
12- #define CESHIM_ERROR 400
12+ #define CESHIM_ERROR 111
1313#define CESHIM_ERROR_PAGE_SIZE_TOO_SMALL (CESHIM_ERROR | (1<<8))
1414#define CESHIM_ERROR_MALFORMED_KEY (CESHIM_ERROR | (2<<8))
15+ #define CESHIM_ERROR_EXT_VERSION_TOO_OLD (CESHIM_ERROR | (3<<8))
1516
1617int ceshim_register (
1718 const char * zName , /* Name of the newly constructed VFS */
You can’t perform that action at this time.
0 commit comments