-C When\sloading\sstat4\sdata,\smake\sa\ssingle\slarge\sallocation\sfor\sall\sIndex.aSample[]\sarrays,\sinstead\sof\sa\sseparate\sallocation\sfor\seach.
-D 2024-12-20T19:37:41.637
+C Experimental:\sIf\sSQLite\sis\scompiled\swith\sSQLITE_WAL_BIGHASH\sdefined,\suse\shash\ntables\slarge\senough\sto\sfit\s128K,\sinstead\sof\s4K,\sentries\sin\sthe\s*-shm\sfile.
+D 2024-12-23T11:23:07.782
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
F src/vdbevtab.c fc46b9cbd759dc013f0b3724549cc0d71379183c667df3a5988f7e2f1bd485f3
F src/vtab.c 5fb499d20494b7eecaadb7584634af9afcb374cb0524912b475fcb1712458a1b
F src/vxworks.h d2988f4e5a61a4dfe82c6524dd3d6e4f2ce3cdb9
-F src/wal.c 9dc2b38da29d4aa24f0ce5610f36b6b911f152bc1af7ae09495d8bd57517d046
+F src/wal.c dcc414ebe459a3f1f4a843d504047cbae631886802a33287783fa1de19ab7e77
F src/wal.h 8c59ee7a835574396d7cbd04626d11fd849613e361a46e7e9519091ab03bdb29
F src/walker.c d5006d6b005e4ea7302ad390957a8d41ed83faa177e412f89bc5600a7462a014
F src/where.c c046dd58c3410f7b7528e1e6317cb876398557bad346d568ed8562321a7d002d
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P fa87355f6286be1e92f22a71cbfbfb13d1a478d5fb5b38abedbd78bf903171fa
-R 9097e0f64b77340a961f20f33cb504fb
+P b40cd7395c44b1f2d019d8e809e03de0e083c93693322a72ddb250a85640528f
+Q +0cb853ea1dece578ae8f336c7d003e618d94ba003e25e5f5f307d7424f31b53f
+R 0db94f9b5016d4409837d31c4cf69ba3
U dan
-Z f620b0a1456c2c860e9486abd7f7bdfb
+Z 036d387cdbb87985088d735f94a3d8ac
# Remove this line to create a well-formed Fossil manifest.
** version-2 ("journal_mode=wal2"). Legacy clients may support version-1
** only.
*/
-#define WAL_VERSION1 3007000 /* For "journal_mode=wal" */
-#define WAL_VERSION2 3021000 /* For "journal_mode=wal2" */
+#ifdef SQLITE_WAL_BIGHASH
+# define WAL_VERSION1 3007001 /* For "journal_mode=wal" */
+# define WAL_VERSION2 3021001 /* For "journal_mode=wal2" */
+#else
+# define WAL_VERSION1 3007000 /* For "journal_mode=wal" */
+# define WAL_VERSION2 3021000 /* For "journal_mode=wal2" */
+#endif
#define SQLITE_ENABLE_WAL2NOCKSUM 1
** Each page of the wal-index mapping contains a hash-table made up of
** an array of HASHTABLE_NSLOT elements of the following type.
*/
-typedef u16 ht_slot;
+#ifdef SQLITE_WAL_BIGHASH
+ typedef u32 ht_slot;
+#else
+ typedef u16 ht_slot;
+#endif
/*
** This structure is used to implement an iterator that loops through
** Changing any of these constants will alter the wal-index format and
** create incompatibilities.
*/
-#define HASHTABLE_NPAGE 4096 /* Must be power of 2 */
-#define HASHTABLE_HASH_1 383 /* Should be prime */
-#define HASHTABLE_NSLOT (HASHTABLE_NPAGE*2) /* Must be a power of 2 */
+#ifdef SQLITE_WAL_BIGHASH
+# define HASHTABLE_BITS 17 /* 128K frames per hash */
+#else
+# define HASHTABLE_BITS 12 /* 4K frames per hash */
+#endif
+# define HASHTABLE_NPAGE (1<<HASHTABLE_BITS) /* Must be power of 2 */
+# define HASHTABLE_HASH_1 383 /* Should be prime */
+# define HASHTABLE_NSLOT (HASHTABLE_NPAGE*2) /* Must be a power of 2 */
/*
** The block of page numbers associated with the first hash-table in a
assert( 40 == sizeof(WalCkptInfo) );
assert( 120 == WALINDEX_LOCK_OFFSET );
assert( 136 == WALINDEX_HDR_SIZE );
+#ifndef SQLITE_WAL_BIGHASH
assert( 4096 == HASHTABLE_NPAGE );
assert( 4062 == HASHTABLE_NPAGE_ONE );
assert( 8192 == HASHTABLE_NSLOT );
assert( 383 == HASHTABLE_HASH_1 );
assert( 32768 == WALINDEX_PGSZ );
+#endif
assert( 8 == SQLITE_SHM_NLOCK );
assert( 5 == WAL_NREADER );
assert( 24 == WAL_FRAME_HDRSIZE );
ht_slot *aMerge = 0; /* List to be merged */
int iList; /* Index into input list */
u32 iSub = 0; /* Index into aSub array */
- struct Sublist aSub[13]; /* Array of sub-lists */
+ struct Sublist aSub[HASHTABLE_BITS+1]; /* Array of sub-lists */
memset(aSub, 0, sizeof(aSub));
assert( nList<=HASHTABLE_NPAGE && nList>0 );