File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -625,7 +625,14 @@ static int csReadManifest(ChunkStore *cs){
625625 magic = CS_READ_U32 (aBuf + 0 );
626626 version = CS_READ_U32 (aBuf + 4 );
627627 if ( magic != CHUNK_STORE_MAGIC ) return SQLITE_NOTADB ;
628- if ( version != CHUNK_STORE_VERSION ) return SQLITE_NOTADB ;
628+ if ( version != CHUNK_STORE_VERSION ){
629+ sqlite3_log (SQLITE_NOTADB ,
630+ "doltlite: chunk store format version %u, expected %u "
631+ "(database written by an incompatible doltlite version; "
632+ "this build refuses to open it to prevent corruption)" ,
633+ version , CHUNK_STORE_VERSION );
634+ return SQLITE_NOTADB ;
635+ }
629636
630637 cs -> nChunks = (int )CS_READ_U32 (aBuf + 28 );
631638 cs -> iIndexOffset = CS_READ_I64 (aBuf + 32 );
Original file line number Diff line number Diff line change 2525#include "prolly_hash.h"
2626
2727#define CHUNK_STORE_MAGIC 0x444C5443 /* "DLTC" little-endian */
28- #define CHUNK_STORE_VERSION 9
28+ #define CHUNK_STORE_VERSION 10
2929#define CHUNK_MANIFEST_SIZE 168
3030#define CHUNK_INDEX_ENTRY_SIZE 32 /* hash(20) + offset(8) + size(4) */
3131
You can’t perform that action at this time.
0 commit comments