From: drh Date: Thu, 9 Sep 2010 23:31:36 +0000 (+0000) Subject: The merge for check-in [415c448dc4] did not do exactly write, resulting in X-Git-Tag: mountain-lion~52 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b0fa210aa3f3e1994c19baf2160e27a9179fc6d1;p=thirdparty%2Fsqlite.git The merge for check-in [415c448dc4] did not do exactly write, resulting in a subtle bug in the SQLITE_FCNTL_SIZE_HINT logic. This check-in is the fix. FossilOrigin-Name: badaaa18fd4a4402add6ae1b3ecadbb79f91fe37 --- diff --git a/manifest b/manifest index 4cca668464..96e551aeba 100644 --- a/manifest +++ b/manifest @@ -1,8 +1,5 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -C Merge\sin\sthe\sR-tree\sfix\sfrom\sthe\strunk. -D 2010-08-24T01:51:07 +C The\smerge\sfor\scheck-in\s[415c448dc4]\sdid\snot\sdo\sexactly\swrite,\sresulting\sin\na\ssubtle\sbug\sin\sthe\sSQLITE_FCNTL_SIZE_HINT\slogic.\s\sThis\scheck-in\sis\sthe\nfix. +D 2010-09-09T23:31:37 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in c58f7d37ad0f9b28655ba4e28c6cb0f879569cd7 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -162,7 +159,7 @@ F src/os_common.h a8f95b81eca8a1ab8593d23e94f8a35f35d4078f F src/os_os2.c 72d0b2e562952a2464308c4ce5f7913ac10bef3e F src/os_unix.c 3853edc254c464c040232a0b422b8f513205399a F src/os_win.c 51cb62f76262d961ea4249489383d714501315a7 -F src/pager.c 8f6ff6ca8e7d478016fe1a28d270377066f4baf7 +F src/pager.c a5f5d9787b11dfb0b6082e6f5846d00b459a8e19 F src/pager.h ef8c8f71ab022cc2fff768a1175dd32355be9dcd F src/parse.y 12b7ebd61ea54f0e1b1083ff69cc2c8ce9353d58 F src/pcache.c 1e9aa2dbc0845b52e1b51cc39753b6d1e041cb07 @@ -854,14 +851,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f -P 415c448dc45a297bd1b0bbce25c4572eeab286f0 7f2f71cc9e3c39093f09231f448576cff6afb5fe -R a5989b39fa52f0620b0851b6f3c872a9 +P 02ee0bd5a305e3a6cd76f2e304f8a7effacd8433 +R e9511b8a271e179a742ba24baba54996 U drh -Z e8776a8fd86a44ef5757f798d9dc8b80 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.6 (GNU/Linux) - -iD8DBQFMcyWOoxKgR168RlERAqbDAJ45pfKsU4ofV34wUA8rb3Q7JjhdFACfWukV -aiZS9mIwn46DtBOb8pfJwlM= -=f9ny ------END PGP SIGNATURE----- +Z 2c112256f89d0489a6f7ef317020165a diff --git a/manifest.uuid b/manifest.uuid index ebdb7ce9b5..78f9c19075 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -02ee0bd5a305e3a6cd76f2e304f8a7effacd8433 \ No newline at end of file +badaaa18fd4a4402add6ae1b3ecadbb79f91fe37 \ No newline at end of file diff --git a/src/pager.c b/src/pager.c index a93dd7c261..f0b5b77544 100644 --- a/src/pager.c +++ b/src/pager.c @@ -3908,7 +3908,6 @@ static int pager_write_pagelist(Pager *pPager, PgHdr *pList){ rc = pagerOpentemp(pPager, pPager->fd, pPager->vfsFlags); } -#if 0 /* Before the first write, give the VFS a hint of what the final ** file size will be. */ @@ -3916,18 +3915,6 @@ static int pager_write_pagelist(Pager *pPager, PgHdr *pList){ if( rc==SQLITE_OK && pPager->dbSize>pPager->dbHintSize ){ sqlite3_int64 szFile = pPager->pageSize * (sqlite3_int64)pPager->dbSize; sqlite3OsFileControl(pPager->fd, SQLITE_FCNTL_SIZE_HINT, &szFile); - } -#endif - - /* 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); pPager->dbHintSize = pPager->dbSize; }