-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-C Disable\sthe\scorruptE\stest\swhich\sSQLITE_OVERSIZE_CELL_CHECK\sis\senabled.\nThis\sis\sa\scherrypick\smerge\sfrom\scheck-in\s[1dc4f9fe9b83467ba].
-D 2010-05-19T20:30:16
+C Cherry-pick\sthe\sSQLITE_FCNTL_SIZE_HINT\spatch\s(check-in\s[2b7e3b4a30d6a7c4a8]\nand\sbump\sthe\sversion\snumber\sto\s3.6.23.2.
+D 2010-05-19T22:09:19
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 4f2f967b7e58a35bb74fb7ec8ae90e0f4ca7868b
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F Makefile.vxworks ab005d301296c40e021ccd0133ce49ca811e319f
F README cd04a36fbc7ea56932a4052d7d0b7f09f27c33d6
-F VERSION 09d2dfb6a4a47d07b3b2091e349eedef78fb0f77
+F VERSION e074e6c926531bc0ccf713d48465eb16807d7193
F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50
F addopcodes.awk 17dc593f791f874d2c23a0f9360850ded0286531
F art/2005osaward.gif 0d1851b2a7c1c9d0ccce545f3e14bca42d7fd248
F src/os.h 534b082c3cb349ad05fa6fa0b06087e022af282c
F src/os_common.h 240c88b163b02c21a9f21f87d49678a0aa21ff30
F src/os_os2.c 75a8c7b9a00a2cf1a65f9fa4afbc27d46634bb2f
-F src/os_unix.c 148d2f625db3727250c0b880481ae7630b6d0eb0
-F src/os_win.c 1c7453c2df4dab26d90ff6f91272aea18bcf7053
-F src/pager.c 1915e3ec1a2157d0c29086b7fc0c936a2d97029e
+F src/os_unix.c fdeb37c703243141470396acf32331674b905e55
+F src/os_win.c bc65553f911439a6b1aa3cf22f34e5ea1c4aa394
+F src/pager.c e39ac887694a6644135f5e4151fe293b5397dd64
F src/pager.h 1b32faf2e578ac3e7bcf9c9d11217128261c5c54
F src/parse.y ace5c7a125d9f2a410e431ee3209034105045f7e
F src/pcache.c 4956b41d6ba913f7a8a56fbf32be78caed0e45c2
F src/rowset.c 69afa95a97c524ba6faf3805e717b5b7ae85a697
F src/select.c 4113ef360430ed4e7533690ef46d06c20204adce
F src/shell.c c40427c7245535a04a9cb4a417b6cc05c022e6a4
-F src/sqlite.h.in 08a2d9a278ff0dfd65055a7ec9c599f7ae1a3c18
+F src/sqlite.h.in f9a9be1bce911669a259f7c747bf05635cb360b5
F src/sqlite3ext.h 69dfb8116af51b84a029cddb3b35062354270c89
F src/sqliteInt.h 6873f7f4c24fcdceece8777f2a1cbec049df77a0
F src/sqliteLimit.h 3afab2291762b5d09ae20c18feb8e9fa935a60a6
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P b51fcac9fb4207810ee8d33ead47886e9c46d224
-R 5026f362b493c0d77060cf3649122050
+P a40d080ca3c5f152f3296caf48f20728f61317de
+R 6b321985aaecd4ff831144c4a95fd584
U drh
-Z b66b4e4c871064b8805e5065bde070bc
+Z c0f8d3e720ac9f1021b4b9695ecbd8fd
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
-iD8DBQFL9EpboxKgR168RlERApFWAJ9PwVd2vtYYmrUVxPOHb8rjJua9iQCeKmI2
-LDgKLnQS+QE03MScalpbIxY=
-=ekzi
+iD8DBQFL9GGSoxKgR168RlERAnsLAJ9mAxq1HjJvHt5vClDz1V5oM9GOTwCgiKms
+ckp+G3lPReQ5n8ebpgNyR7c=
+=B53W
-----END PGP SIGNATURE-----
rc = pagerOpentemp(pPager, pPager->fd, pPager->vfsFlags);
}
+ /* Before the first write, give the VFS a hint of what the final
+ ** file size will be.
+ */
+ if( rc==SQLITE_OK
+ && pPager->dbSize>(pPager->dbFileSize+1)
+ && isOpen(pPager->fd)
+ ){
+ sqlite3_int64 szFile = pPager->pageSize * (sqlite3_int64)pPager->dbSize;
+ sqlite3OsFileControl(pPager->fd, SQLITE_FCNTL_SIZE_HINT, &szFile);
+ }
+
while( rc==SQLITE_OK && pList ){
Pgno pgno = pList->pgno;
sqlite3PagerUnref(pPage);
if( rc!=SQLITE_OK ) goto commit_phase_one_exit;
}
- }
+ }
pPager->dbSize = dbSize;
}
#endif
** into an integer that the pArg argument points to. This capability
** is used during testing and only needs to be supported when SQLITE_TEST
** is defined.
+**
+** The [SQLITE_FCNTL_SIZE_HINT] opcode is used by SQLite to give the VFS
+** layer a hint of how large the database file will grow to be during the
+** current transaction. This hint is not guaranteed to be accurate but it
+** is often close. The underlying VFS might choose to preallocate database
+** file space based on this hint in order to help writes to the database
+** file run faster.
*/
#define SQLITE_FCNTL_LOCKSTATE 1
#define SQLITE_GET_LOCKPROXYFILE 2
#define SQLITE_SET_LOCKPROXYFILE 3
#define SQLITE_LAST_ERRNO 4
+#define SQLITE_FCNTL_SIZE_HINT 5
/*
** CAPI3REF: Mutex Handle