1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Avoid reading or writing the 32 locking bytes at the end of the first

meta-page of an LSM database.

FossilOrigin-Name: 2b5df3e8a80ae5c0415081dd9b29acaad1464be2e7971399e52c1c98408322d9
This commit is contained in:
dan
2017-06-29 20:13:44 +00:00
parent 97e8b3ea32
commit 28508ddb42
5 changed files with 38 additions and 22 deletions

View File

@ -65,8 +65,6 @@
#define LSM_CKSUM0_INIT 42
#define LSM_CKSUM1_INIT 42
#define LSM_META_PAGE_SIZE 4096
/* "mmap" mode is currently only used in environments with 64-bit address
** spaces. The following macro is used to test for this. */
#define LSM_IS_64_BIT (sizeof(void*)==8)
@ -154,6 +152,15 @@ int lsmErrorBkpt(int);
#define LSM_LOCK_READER(i) ((i) + LSM_LOCK_ROTRANS + 1)
#define LSM_LOCK_RWCLIENT(i) ((i) + LSM_LOCK_READER(LSM_LOCK_NREADER))
#define LSM_N_LOCK LSM_LOCK_RWCLIENT(LSM_LOCK_NRWCLIENT)
/*
** Meta-page size and usable size.
*/
#define LSM_META_PAGE_SIZE 4096
#define LSM_META_RW_PAGE_SIZE (LSM_META_PAGE_SIZE - LSM_N_LOCK)
/*
** Hard limit on the number of free-list entries that may be stored in
** a checkpoint (the remainder are stored as a system record in the LSM).