-C Tweaks\sto\sthe\sway\smultiplexSubOpen()\sworks,\sfor\sbackwards\scompatibility.
-D 2011-12-16T05:50:39.331
+C Cherry-pick\sthe\sSQLITE_DIRECT_OVERFLOW_READ\sfix\sfor\sticket\n[ac0ff496b7e3]\sof\schanges\s[c5256b59ad]\sand\s[c723e3e18a]\s\ninto\sthe\snx-devkit\sbranch.
+D 2011-12-21T23:38:21.467
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 5b4a3e12a850b021547e43daf886b25133b44c07
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F src/backup.c 4368158da74d4711888e03264105c5c527d76caf
F src/bitvec.c af50f1c8c0ff54d6bdb7a80e2fceca5a93670bef
F src/btmutex.c 976f45a12e37293e32cae0281b15a21d48a8aaa7
-F src/btree.c 80ea65224512884bb72976c93810d2dcaecc1353
+F src/btree.c 2fdde7d16c80bd4e8a0913038e766c4297818f6f
F src/btree.h f5d775cd6cfc7ac32a2535b70e8d2af48ef5f2ce
F src/btreeInt.h ea863a819224d3e6845ad1e39954d41558b8cd8b
F src/build.c 8915bb6d72ead998f94c2756ea8d143c77709b70
F src/os_os2.c 4a75888ba3dfc820ad5e8177025972d74d7f2440
F src/os_unix.c baad28b27adc563579170b6d765af0b0cc1d98c8
F src/os_win.c 823f55855ceb062d72231409b828d0486f09125f
-F src/pager.c d981f3bfcc0e4460537d983899620700ccf8f539
+F src/pager.c 6277bebe07ac45bc99fb912ec105f913be804a83
F src/pager.h 5cd760857707529b403837d813d86b68938d6183
F src/parse.y 12b7ebd61ea54f0e1b1083ff69cc2c8ce9353d58
F src/pcache.c 1fdd77978c1525d1ca4b9ef48eb80abca710cb4c
F src/test_init.c 3cbad7ce525aec925f8fda2192d576d47f0d478a
F src/test_intarray.c d879bbf8e4ce085ab966d1f3c896a7c8b4f5fc99
F src/test_intarray.h 489edb9068bb926583445cb02589344961054207
-F src/test_journal.c 03313c693cca72959dcaaf79f8d76f21c01e19ff
+F src/test_journal.c 2c06e4be6584d51b935dc8b353980a9388de62ef
F src/test_loadext.c df586c27176e3c2cb2e099c78da67bf14379a56e
F src/test_malloc.c 8d416f29ad8573f32601f6056c9d2b17472e9ad5
F src/test_multiplex.c 6e07b94e2fe430f7f4f0d7d67b5e58f504dea655
F src/test_rtree.c 6d06306e29946dc36f528a3a2cdc3add794656f1
F src/test_schema.c 8c06ef9ddb240c7a0fcd31bc221a6a2aade58bf0
F src/test_server.c 2f99eb2837dfa06a4aacf24af24c6affdf66a84f
-F src/test_stat.c 69de4361c7a69fc1136d31ab7144408cd00805c7
+F src/test_stat.c 80271ad7d776a79babe0e025bb3a1bfcd3a3cfb1
F src/test_superlock.c 2b97936ca127d13962c3605dbc9a4ef269c424cd
F src/test_syscall.c a992d8c80ea91fbf21fb2dd570db40e77dd7e6ae
F src/test_tclvar.c f4dc67d5f780707210d6bb0eb6016a431c04c7fa
F test/badutf2.test f5bc7f2d280670ecd79b9cf4f0f1760c607fe51f
F test/between.test 16b1776c6323faadb097a52d673e8e3d8be7d070
F test/bigfile.test a8ec8073a20207456dab01a29ad9cde42b0dd103
+F test/bigfile2.test f8e83eca9abef60692a34255a2ebcb96aff897fc
F test/bigrow.test f0aeb7573dcb8caaafea76454be3ade29b7fc747
F test/bind.test 3c7b320969000c441a70952b0b15938fbb66237c
F test/bindxfer.test efecd12c580c14df5f4ad3b3e83c667744a4f7e0
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
F tool/warnings-clang.sh 9f406d66e750e8ac031c63a9ef3248aaa347ef2a
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
-P 022bf427c2edfe494ec7c222f436953ff56574a6
-R 29ea54dcd671c93952fcbf93e86a1060
+P bb40338887c912be70cb6fe3b760d87c14bb88a5
+R 041cbd9cee36a582791819872d3229da
U drh
-Z b9fbbc1fe20301c015fc0588c12a3621
+Z f97894b580cddabcc04be599aee7b3e7
-bb40338887c912be70cb6fe3b760d87c14bb88a5
\ No newline at end of file
+42f31f190a0ac971fa0ee361fe4c175f479c75e3
\ No newline at end of file
u8 aSave[4];
u8 *aWrite = &pBuf[-4];
memcpy(aSave, aWrite, 4);
- rc = sqlite3OsRead(fd, aWrite, a+4, pBt->pageSize * (nextPage-1));
+ rc = sqlite3OsRead(fd, aWrite, a+4, (i64)pBt->pageSize*(nextPage-1));
nextPage = get4byte(aWrite);
memcpy(aWrite, aSave, 4);
}else
*/
if( pSavepoint ){
u32 ii; /* Loop counter */
- i64 offset = pSavepoint->iSubRec*(4+pPager->pageSize);
+ i64 offset = (i64)pSavepoint->iSubRec*(4+pPager->pageSize);
if( pagerUseWal(pPager) ){
rc = sqlite3WalSavepointUndo(pPager->pWal, pSavepoint->aWalData);
}
for(ii=pSavepoint->iSubRec; rc==SQLITE_OK && ii<pPager->nSubRec; ii++){
- assert( offset==ii*(4+pPager->pageSize) );
+ assert( offset==(i64)ii*(4+pPager->pageSize) );
rc = pager_playback_one_page(pPager, &offset, pDone, 0, 1);
}
assert( rc!=SQLITE_DONE );
** write the journal record into the file. */
if( rc==SQLITE_OK ){
void *pData = pPg->pData;
- i64 offset = pPager->nSubRec*(4+pPager->pageSize);
+ i64 offset = (i64)pPager->nSubRec*(4+pPager->pageSize);
char *pData2;
CODEC2(pPager, pData, pPg->pgno, 7, return SQLITE_NOMEM, pData2);
while( rc==SQLITE_OK && iTrunk>0 ){
u32 nLeaf;
u32 iLeaf;
- sqlite3_int64 iOff = (iTrunk-1)*pMain->nPagesize;
+ sqlite3_int64 iOff = (i64)(iTrunk-1)*pMain->nPagesize;
rc = sqlite3OsRead(p, aData, pMain->nPagesize, iOff);
nLeaf = decodeUint32(&aData[4]);
for(iLeaf=0; rc==SQLITE_OK && iLeaf<nLeaf; iLeaf++){
/* The default page size and offset */
pCsr->szPage = sqlite3BtreeGetPageSize(pBt);
- pCsr->iOffset = pCsr->szPage * (pCsr->iPageno - 1);
+ pCsr->iOffset = (i64)pCsr->szPage * (pCsr->iPageno - 1);
/* If connected to a ZIPVFS backend, override the page size and
** offset with actual values obtained from ZIPVFS.
--- /dev/null
+# 2011 December 20
+#
+# The author disclaims copyright to this source code. In place of
+# a legal notice, here is a blessing:
+#
+# May you do good and not evil.
+# May you find forgiveness for yourself and forgive others.
+# May you share freely, never taking more than you give.
+#
+#***********************************************************************
+# This file implements regression tests for SQLite library. The
+# focus of this script testing the ability of SQLite to handle database
+# files larger than 4GB.
+#
+
+set testdir [file dirname $argv0]
+source $testdir/tester.tcl
+set testprefix bigfile2
+
+# Create a small database.
+#
+do_execsql_test 1.1 {
+ CREATE TABLE t1(a, b);
+ INSERT INTO t1 VALUES(1, 2);
+}
+
+# Pad the file out to 4GB in size. Then clear the file-size field in the
+# db header. This will cause SQLite to assume that the first 4GB of pages
+# are actually in use and new pages will be appended to the file.
+#
+db close
+if {[catch {fake_big_file 4096 [pwd]/test.db} msg]} {
+ puts "**** Unable to create a file larger than 4096 MB. *****"
+ finish_test
+ return
+}
+hexio_write test.db 28 00000000
+
+do_test 1.2 {
+ file size test.db
+} [expr 14 + 4096 * (1<<20)]
+
+# Now insert a large row. The overflow pages will be located past the 4GB
+# boundary. Then, after opening and closing the database, test that the row
+# can be read back in.
+#
+set str [string repeat k 30000]
+do_test 1.3 {
+ sqlite3 db test.db
+ execsql { INSERT INTO t1 VALUES(3, $str) }
+ db close
+ sqlite3 db test.db
+ db one { SELECT b FROM t1 WHERE a = 3 }
+} $str
+
+db close
+file delete test.db
+
+finish_test