Doubt regarding sqlite3.amalgamation.c file in sqlite folder

Hi,

Just for the curiosity I want to know that, in file sqlite3.amalgamation.c file in fdbserver/sqlite folder there is a definition of #define SQLITE_FILE_HEADER “FoundationDB100”. Is there any specific reason for 100 behind the FoundationDB, because you represent like the length of the string should be 15 characters long. So you can represent any other than 100.

I would strongly assume that the “100” was just an arbitrary choice to bring the total length of the string up to 15, as required by the if( memcmp(page1, zMagicHeader, 16)!=0 ) check.

I thought 100 represents the version of foundationdb, anyway Thanks @alexmiller

I suppose it’s plausible that 100 meant 1.0.0, but it’s not a value that has (or ever will) change, as it’d break newer versions of FDB being able to read/load the file. Changes that we’ve done to the on-disk format use different file names or extensions to allow identifying the file type before opening the file.