From f6972c376425c8a548efac5c8c6f06d5e1c39109 Mon Sep 17 00:00:00 2001 From: mistachkin Date: Fri, 24 Jul 2015 00:02:15 +0000 Subject: [PATCH 01/13] Update RBU description comment in the header file. No changes to code. FossilOrigin-Name: 119883a21bdcab66c15d1e80f3da20addda328ad --- ext/rbu/sqlite3rbu.h | 2 +- manifest | 52 ++++++++++++++++++++++---------------------- manifest.uuid | 2 +- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/ext/rbu/sqlite3rbu.h b/ext/rbu/sqlite3rbu.h index bc1f74fb24..c3e32f9410 100644 --- a/ext/rbu/sqlite3rbu.h +++ b/ext/rbu/sqlite3rbu.h @@ -47,7 +47,7 @@ ** to read from the original database snapshot. In other words, partially ** applied transactions are not visible to other clients. ** -** "RBU" stands for "Over The Air" update. As in a large database update +** "RBU" stands for "Resumable Bulk Update". As in a large database update ** transmitted via a wireless network to a mobile device. A transaction ** applied using this extension is hence refered to as an "RBU update". ** diff --git a/manifest b/manifest index 8b3da451d6..fb1043c3f4 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Change\sthe\sname\sof\sthe\sOTA\sextension\sto\sRBU:\s\sResumable\sBulk\sUpdate. -D 2015-07-23T20:44:49.716 +C Update\sRBU\sdescription\scomment\sin\sthe\sheader\sfile.\s\sNo\schanges\sto\scode. +D 2015-07-24T00:02:15.028 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in b13c653ee215cb0d294ffa4f10ac4d14255767e0 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -200,25 +200,25 @@ F ext/misc/totype.c 4a167594e791abeed95e0a8db028822b5e8fe512 F ext/misc/vfslog.c fe40fab5c077a40477f7e5eba994309ecac6cc95 F ext/misc/vtshim.c babb0dc2bf116029e3e7c9a618b8a1377045303e F ext/misc/wholenumber.c 784b12543d60702ebdd47da936e278aa03076212 -F ext/rbu/rbu.c e04e7baea76b6dd719a4f290f8a58166efc8d234 w ext/ota/ota.c -F ext/rbu/rbu1.test 57601977588603e82700a43c279bd55282ffa482 w ext/ota/ota1.test -F ext/rbu/rbu10.test 046b0980041d30700464a800bbf6733ed2df515d w ext/ota/ota10.test -F ext/rbu/rbu11.test 9bc68c2d3dbeb1720153626e3bd0466dcc017702 w ext/ota/ota11.test -F ext/rbu/rbu12.test bde22ed0004dd5d1888c72a84ae407e574aeae16 w ext/ota/ota12.test -F ext/rbu/rbu13.test 462ff799c4afedc3ef8a47ff818c0ffbf14ae4f2 w ext/ota/ota13.test -F ext/rbu/rbu3.test 8bd4c6b87367c358981b6a47dc3d654fa60bff90 w ext/ota/ota3.test -F ext/rbu/rbu5.test 2e24fee3e615aecd99bbdd46967935a641e866f7 w ext/ota/ota5.test -F ext/rbu/rbu6.test 32e8ed60631b6facdb6366bd2b5f5f25245e7edb w ext/ota/ota6.test -F ext/rbu/rbu7.test fd025d5ba440fcfe151fbb0e3835e1e7fe964fa1 w ext/ota/ota7.test -F ext/rbu/rbu8.test 3bbf2c35d71a843c463efe93946f14ad10c3ede0 w ext/ota/ota8.test -F ext/rbu/rbu9.test 0806d1772c9f4981774ff028de6656e4183082af w ext/ota/ota9.test -F ext/rbu/rbuA.test c1a7b3e2d926b8f8448bb3b4ae787e314ee4b2b3 w ext/ota/otaA.test -F ext/rbu/rbucrash.test 8d2ed5d4b05fef6c00c2a6b5f7ead71fa172a695 w ext/ota/otacrash.test -F ext/rbu/rbufault.test cc0be8d5d392d98b0c2d6a51be377ea989250a89 w ext/ota/otafault.test -F ext/rbu/rbufault2.test 9a7f19edd6ea35c4c9f807d8a3db0a03a5670c06 w ext/ota/otafault2.test -F ext/rbu/sqlite3rbu.c d37e1ca2d13e439cb3df7cd9d98db90458f21433 w ext/ota/sqlite3ota.c -F ext/rbu/sqlite3rbu.h 27dc1bdc18df6c9bfa3bd7d7b011699ed619d6f6 w ext/ota/sqlite3ota.h -F ext/rbu/test_rbu.c f99698956cc9158d6bf865e461e2d15876538ac1 w ext/ota/test_ota.c +F ext/rbu/rbu.c e04e7baea76b6dd719a4f290f8a58166efc8d234 +F ext/rbu/rbu1.test 57601977588603e82700a43c279bd55282ffa482 +F ext/rbu/rbu10.test 046b0980041d30700464a800bbf6733ed2df515d +F ext/rbu/rbu11.test 9bc68c2d3dbeb1720153626e3bd0466dcc017702 +F ext/rbu/rbu12.test bde22ed0004dd5d1888c72a84ae407e574aeae16 +F ext/rbu/rbu13.test 462ff799c4afedc3ef8a47ff818c0ffbf14ae4f2 +F ext/rbu/rbu3.test 8bd4c6b87367c358981b6a47dc3d654fa60bff90 +F ext/rbu/rbu5.test 2e24fee3e615aecd99bbdd46967935a641e866f7 +F ext/rbu/rbu6.test 32e8ed60631b6facdb6366bd2b5f5f25245e7edb +F ext/rbu/rbu7.test fd025d5ba440fcfe151fbb0e3835e1e7fe964fa1 +F ext/rbu/rbu8.test 3bbf2c35d71a843c463efe93946f14ad10c3ede0 +F ext/rbu/rbu9.test 0806d1772c9f4981774ff028de6656e4183082af +F ext/rbu/rbuA.test c1a7b3e2d926b8f8448bb3b4ae787e314ee4b2b3 +F ext/rbu/rbucrash.test 8d2ed5d4b05fef6c00c2a6b5f7ead71fa172a695 +F ext/rbu/rbufault.test cc0be8d5d392d98b0c2d6a51be377ea989250a89 +F ext/rbu/rbufault2.test 9a7f19edd6ea35c4c9f807d8a3db0a03a5670c06 +F ext/rbu/sqlite3rbu.c d37e1ca2d13e439cb3df7cd9d98db90458f21433 +F ext/rbu/sqlite3rbu.h 6a280298e9eeb8ef59841a620f07f4f844651545 +F ext/rbu/test_rbu.c f99698956cc9158d6bf865e461e2d15876538ac1 F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761 F ext/rtree/rtree.c 0f9b595bd0debcbedf1d7a63d0e0678d619e6c9c F ext/rtree/rtree.h 834dbcb82dc85b2481cde6a07cdadfddc99e9b9e @@ -918,7 +918,7 @@ F test/quota2.test 7dc12e08b11cbc4c16c9ba2aa2e040ea8d8ab4b8 F test/quote.test 215897dbe8de1a6f701265836d6601cc6ed103e6 F test/randexpr1.tcl 40dec52119ed3a2b8b2a773bce24b63a3a746459 F test/randexpr1.test eda062a97e60f9c38ae8d806b03b0ddf23d796df -F test/rbu.test 168573d353cd0fd10196b87b0caa322c144ef736 w test/ota.test +F test/rbu.test 168573d353cd0fd10196b87b0caa322c144ef736 F test/rdonly.test 64e2696c322e3538df0b1ed624e21f9a23ed9ff8 F test/regexp1.test 497ea812f264d12b6198d6e50a76be4a1973a9d8 F test/reindex.test 44edd3966b474468b823d481eafef0c305022254 @@ -1365,7 +1365,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 0ffd499f2374f2b191080b9952acfed56daf3335 -R 9a40f6298bbd05e21325ac6bd7e21602 -U drh -Z 01b794dd6ae3d5a3e200b05a3bea889a +P 017c5019e1ce042025d4f327e50ec50af49f9fa4 +R a8265770104c472748ff94ce6fcf731e +U mistachkin +Z 023cdb466d093d6177a784bd88dec4ce diff --git a/manifest.uuid b/manifest.uuid index edb4a77ce8..1e35ab89ac 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -017c5019e1ce042025d4f327e50ec50af49f9fa4 \ No newline at end of file +119883a21bdcab66c15d1e80f3da20addda328ad \ No newline at end of file From 03bc525a51bc6eec1409aa59ba09d8711eac405e Mon Sep 17 00:00:00 2001 From: dan Date: Fri, 24 Jul 2015 14:17:17 +0000 Subject: [PATCH 02/13] Modify a few test scripts to avoid leaving the sqlite3Config structure in a non-default state. FossilOrigin-Name: 562687d9f56bf4bb0f5f07f97cbbb7649c81faf8 --- manifest | 30 +++++++++++++++--------------- manifest.uuid | 2 +- src/test_malloc.c | 15 +++++++++------ test/fuzz3.test | 9 +++------ test/lookaside.test | 4 +++- test/malloc5.test | 8 +++----- test/memsubsys1.test | 5 ++++- test/pcache2.test | 3 +++ test/permutations.test | 8 ++++---- test/tester.tcl | 39 +++++++++++++++++++++++++++++++++++++++ test/zeroblob.test | 4 ++++ 11 files changed, 88 insertions(+), 39 deletions(-) diff --git a/manifest b/manifest index fb1043c3f4..240c60a50c 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Update\sRBU\sdescription\scomment\sin\sthe\sheader\sfile.\s\sNo\schanges\sto\scode. -D 2015-07-24T00:02:15.028 +C Modify\sa\sfew\stest\sscripts\sto\savoid\sleaving\sthe\ssqlite3Config\sstructure\sin\sa\snon-default\sstate. +D 2015-07-24T14:17:17.027 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in b13c653ee215cb0d294ffa4f10ac4d14255767e0 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -362,7 +362,7 @@ F src/test_intarray.c 870124b95ec4c645d4eb84f15efb7133528fb1a5 F src/test_intarray.h 9dc57417fb65bc7835cc18548852cc08cc062202 F src/test_journal.c 5360fbe1d1e4416ca36290562fd5a2e3f70f32aa F src/test_loadext.c a5251f956ab6af21e138dc1f9c0399394a510cb4 -F src/test_malloc.c 208f09a4e21defa496bc1094fcfadea19385a112 +F src/test_malloc.c e19790f6bdc9be7b75147682153520df7843487a F src/test_multiplex.c 9fefd23f6cc3fa9bf0748a5e453167e7b9f193ce F src/test_multiplex.h c08e4e8f8651f0c5e0509b138ff4d5b43ed1f5d3 F src/test_mutex.c dbdfaff8580071f2212a0deae3325a93a737819c @@ -732,7 +732,7 @@ F test/func5.test cdd224400bc3e48d891827cc913a57051a426fa4 F test/fuzz-oss1.test 4912e528ec9cf2f42134456933659d371c9e0d74 F test/fuzz.test 96083052bf5765e4518c1ba686ce2bab785670d1 F test/fuzz2.test 76dc35b32b6d6f965259508508abce75a6c4d7e1 -F test/fuzz3.test 0d13010d1c13003a3aa57dda2f69b6b71ccac46e +F test/fuzz3.test 53fabcd5f0f430f8b221282f6c12c4d0903c21eb F test/fuzz_common.tcl a87dfbb88c2a6b08a38e9a070dabd129e617b45b F test/fuzz_malloc.test 328f70aaca63adf29b4c6f06505ed0cf57ca7c26 F test/fuzzcheck.c b973b06b500e6fc052d7059257cdf70df1f3a986 @@ -817,13 +817,13 @@ F test/lock5.test c6c5e0ebcb21c61a572870cc86c0cb9f14cede38 F test/lock6.test ad5b387a3a8096afd3c68a55b9535056431b0cf5 F test/lock7.test 49f1eaff1cdc491cc5dee3669f3c671d9f172431 F test/lock_common.tcl 7ffb45accf6ee91c736df9bafe0806a44358f035 -F test/lookaside.test 93f07bac140c5bb1d49f3892d2684decafdc7af2 +F test/lookaside.test 90052e87282de256d613fcf8c9cbb845e4001d2f F test/main.test 16131264ea0c2b93b95201f0c92958e85f2ba11a F test/make-where7.tcl 05c16b5d4f5d6512881dfec560cb793915932ef9 F test/malloc.test 21c213365f2cca95ab2d7dc078dc8525f96065f8 F test/malloc3.test e3b32c724b5a124b57cb0ed177f675249ad0c66a F test/malloc4.test 957337613002b7058a85116493a262f679f3a261 -F test/malloc5.test 4e87e596a28908c034eb5777fc33dd921bb44fc3 +F test/malloc5.test 02ed7c5313f0a68d95f2dfca8c8962132bd1f04b F test/malloc6.test 2f039d9821927eacae43e1831f815e157659a151 F test/malloc7.test 7c68a32942858bc715284856c5507446bba88c3a F test/malloc8.test 9b7a3f8cb9cf0b12fff566e80a980b1767bd961d @@ -846,7 +846,7 @@ F test/manydb.test 28385ae2087967aa05c38624cec7d96ec74feb3e F test/mem5.test c6460fba403c5703141348cd90de1c294188c68f F test/memdb.test c1f2a343ad14398d5d6debda6ea33e80d0dafcc7 F test/memleak.test 10b9c6c57e19fc68c32941495e9ba1c50123f6e2 -F test/memsubsys1.test 1733c617e246642db5bf3b9f78c18e2b14fac96c +F test/memsubsys1.test d2b2d6ca37890b26703a2258df8fd66f9869da02 F test/memsubsys2.test 3a1c1a9de48e5726faa85108b02459fae8cb9ee9 F test/minmax.test 42fbad0e81afaa6e0de41c960329f2b2c3526efd F test/minmax2.test b44bae787fc7b227597b01b0ca5575c7cb54d3bc @@ -900,9 +900,9 @@ F test/pagerfault3.test 1003fcda009bf48a8e22a516e193b6ef0dd1bbd8 F test/pageropt.test 6b8f6a123a5572c195ad4ae40f2987007923bbd6 F test/pagesize.test 5769fc62d8c890a83a503f67d47508dfdc543305 F test/pcache.test c8acbedd3b6fd0f9a7ca887a83b11d24a007972b -F test/pcache2.test c70d92547550136ba6f818e6a44fe246d2738604 +F test/pcache2.test af7f3deb1a819f77a6d0d81534e97d1cf62cd442 F test/percentile.test 4243af26b8f3f4555abe166f723715a1f74c77ff -F test/permutations.test 04004bd977f66c064f27e6d18edadce486cf5074 +F test/permutations.test ac3b00c299250cc087d4a527b5c75a0f8aef4e54 F test/pragma.test be7195f0aa72bdb8a512133e9640ac40f15b57a2 F test/pragma2.test f624a496a95ee878e81e59961eade66d5c00c028 F test/pragma3.test 6f849ccffeee7e496d2f2b5e74152306c0b8757c @@ -1028,7 +1028,7 @@ F test/tclsqlite.test 7fb866443c7deceed22b63948ccd6f76b52ad054 F test/tempdb.test 19d0f66e2e3eeffd68661a11c83ba5e6ace9128c F test/temptable.test d2c9b87a54147161bcd1822e30c1d1cd891e5b30 F test/temptrigger.test 8ec228b0db5d7ebc4ee9b458fc28cb9e7873f5e1 -F test/tester.tcl b3a41e20f98a029a76e930b33d0711c5854267bb +F test/tester.tcl 6d0df5c4e39b76390d967c37c1855cb1d0c454c2 F test/thread001.test 9f22fd3525a307ff42a326b6bc7b0465be1745a5 F test/thread002.test e630504f8a06c00bf8bbe68528774dd96aeb2e58 F test/thread003.test ee4c9efc3b86a6a2767516a37bd64251272560a7 @@ -1307,7 +1307,7 @@ F test/without_rowid4.test 4e08bcbaee0399f35d58b5581881e7a6243d458a F test/without_rowid5.test 61256715b686359df48ca1742db50cc7e3e7b862 F test/without_rowid6.test db0dbf03c49030aa3c1ba5f618620334bd2baf5f F test/wordcount.c 9915e06cb33d8ca8109b8700791afe80d305afda -F test/zeroblob.test fb3c0e4ab172d386954deda24c03f500e121d80d +F test/zeroblob.test dcffae9583ac7a6683e814cc7a9c85b2fd73ddd8 F test/zerodamage.test cf6748bad89553cc1632be51a6f54e487e4039ac F tool/build-all-msvc.bat 9058bd90a3c078a3d8c17d40e853aaa0f47885f4 x F tool/build-shell.sh 950f47c6174f1eea171319438b93ba67ff5bf367 @@ -1365,7 +1365,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 017c5019e1ce042025d4f327e50ec50af49f9fa4 -R a8265770104c472748ff94ce6fcf731e -U mistachkin -Z 023cdb466d093d6177a784bd88dec4ce +P 119883a21bdcab66c15d1e80f3da20addda328ad +R f93dc01dd263cc307f98235646fce28d +U dan +Z 1717e31dfb28e99256b065adb47b07f0 diff --git a/manifest.uuid b/manifest.uuid index 1e35ab89ac..77a88cee90 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -119883a21bdcab66c15d1e80f3da20addda328ad \ No newline at end of file +562687d9f56bf4bb0f5f07f97cbbb7649c81faf8 \ No newline at end of file diff --git a/src/test_malloc.c b/src/test_malloc.c index 94a2282923..ed46e7a8db 100644 --- a/src/test_malloc.c +++ b/src/test_malloc.c @@ -939,7 +939,7 @@ static int test_config_pagecache( Tcl_Obj *CONST objv[] ){ int sz, N, rc; - Tcl_Obj *pResult; + Tcl_Obj *pRes; static char *buf = 0; if( objc!=3 ){ Tcl_WrongNumArgs(interp, 1, objv, "SIZE N"); @@ -948,17 +948,20 @@ static int test_config_pagecache( if( Tcl_GetIntFromObj(interp, objv[1], &sz) ) return TCL_ERROR; if( Tcl_GetIntFromObj(interp, objv[2], &N) ) return TCL_ERROR; free(buf); + buf = 0; + + /* Set the return value */ + pRes = Tcl_NewObj(); + Tcl_ListObjAppendElement(0, pRes, Tcl_NewIntObj(sqlite3GlobalConfig.szPage)); + Tcl_ListObjAppendElement(0, pRes, Tcl_NewIntObj(sqlite3GlobalConfig.nPage)); + Tcl_SetObjResult(interp, pRes); + if( sz<0 ){ - buf = 0; rc = sqlite3_config(SQLITE_CONFIG_PAGECACHE, 0, 0, 0); }else{ buf = malloc( sz*N ); rc = sqlite3_config(SQLITE_CONFIG_PAGECACHE, buf, sz, N); } - pResult = Tcl_NewObj(); - Tcl_ListObjAppendElement(0, pResult, Tcl_NewIntObj(rc)); - Tcl_ListObjAppendElement(0, pResult, Tcl_NewIntObj(N)); - Tcl_SetObjResult(interp, pResult); return TCL_OK; } diff --git a/test/fuzz3.test b/test/fuzz3.test index e54b811142..b432671822 100644 --- a/test/fuzz3.test +++ b/test/fuzz3.test @@ -21,12 +21,7 @@ source $testdir/tester.tcl # These tests deal with corrupt database files # database_may_be_corrupt -db close -sqlite3_shutdown -sqlite3_config_pagecache 0 0 -sqlite3_initialize -autoinstall_test_functions -sqlite3 db test.db +test_set_config_pagecache 0 0 expr srand(123) @@ -176,4 +171,6 @@ for {set ii 0} {$ii < 5000} {incr ii} { } $::cksum } +test_restore_config_pagecache finish_test + diff --git a/test/lookaside.test b/test/lookaside.test index 0b239a04d5..a89110ee1d 100644 --- a/test/lookaside.test +++ b/test/lookaside.test @@ -29,9 +29,10 @@ if {[info exists ::G(perm:presql)]} { return } +test_set_config_pagecache 0 0 + catch {db close} sqlite3_shutdown -sqlite3_config_pagecache 0 0 sqlite3_config_scratch 0 0 sqlite3_initialize autoinstall_test_functions @@ -129,4 +130,5 @@ do_test lookaside-4.1 { sqlite3_initialize autoinstall_test_functions +test_restore_config_pagecache finish_test diff --git a/test/malloc5.test b/test/malloc5.test index 3f5208accd..8f0db04c2a 100644 --- a/test/malloc5.test +++ b/test/malloc5.test @@ -20,11 +20,6 @@ # # $Id: malloc5.test,v 1.22 2009/04/11 19:09:54 drh Exp $ -sqlite3_shutdown -sqlite3_config_pagecache 0 100 -sqlite3_initialize -autoinstall_test_functions - set testdir [file dirname $argv0] source $testdir/tester.tcl source $testdir/malloc_common.tcl @@ -44,6 +39,8 @@ ifcapable !memorymanage { return } +test_set_config_pagecache 0 100 + sqlite3_soft_heap_limit 0 sqlite3 db test.db db eval {PRAGMA cache_size=1} @@ -415,5 +412,6 @@ do_test malloc5-6.3.6 { db2 close sqlite3_soft_heap_limit $::soft_limit +test_restore_config_pagecache finish_test catch {db close} diff --git a/test/memsubsys1.test b/test/memsubsys1.test index 3eb3cd4a95..8265ce6317 100644 --- a/test/memsubsys1.test +++ b/test/memsubsys1.test @@ -25,6 +25,8 @@ if {[permutation] == "memsubsys1"} { return } +test_set_config_pagecache 0 0 + # This procedure constructs a new database in test.db. It fills # this database with many small records (enough to force multiple # rebalance operations in the btree-layer and to require a large @@ -310,10 +312,11 @@ do_test memsubsys1-8.4 { db close sqlite3_shutdown sqlite3_config_memstatus 1 -sqlite3_config_pagecache 0 0 sqlite3_config_scratch 0 0 sqlite3_config_lookaside 100 500 sqlite3_config serialized sqlite3_initialize autoinstall_test_functions + +test_restore_config_pagecache finish_test diff --git a/test/pcache2.test b/test/pcache2.test index c59dfb25d4..a0d7496c86 100644 --- a/test/pcache2.test +++ b/test/pcache2.test @@ -16,6 +16,8 @@ set testdir [file dirname $argv0] source $testdir/tester.tcl +test_set_config_pagecache 0 0 + # Set up a pcache memory pool so that we can easily track how many # pages are being used for cache. # @@ -78,4 +80,5 @@ sqlite3_config serialized sqlite3_initialize autoinstall_test_functions +test_restore_config_pagecache finish_test diff --git a/test/permutations.test b/test/permutations.test index e8009dfc05..c01dc22c55 100644 --- a/test/permutations.test +++ b/test/permutations.test @@ -417,16 +417,16 @@ test_suite "memsubsys1" -description { } -files [ test_set $::allquicktests -exclude ioerr5.test malloc5.test mmap1.test ] -initialize { + test_set_config_pagecache 4096 24 catch {db close} sqlite3_shutdown - sqlite3_config_pagecache 4096 24 sqlite3_config_scratch 25000 1 sqlite3_initialize autoinstall_test_functions } -shutdown { + test_restore_config_pagecache catch {db close} sqlite3_shutdown - sqlite3_config_pagecache 0 0 sqlite3_config_scratch 0 0 sqlite3_initialize autoinstall_test_functions @@ -444,16 +444,16 @@ test_suite "memsubsys2" -description { } -files [ test_set $::allquicktests -exclude ioerr5.test malloc5.test ] -initialize { + test_set_config_pagecache 512 5 catch {db close} sqlite3_shutdown - sqlite3_config_pagecache 512 5 sqlite3_config_scratch 1000 1 sqlite3_initialize autoinstall_test_functions } -shutdown { + test_restore_config_pagecache catch {db close} sqlite3_shutdown - sqlite3_config_pagecache 0 0 sqlite3_config_scratch 0 0 sqlite3_initialize autoinstall_test_functions diff --git a/test/tester.tcl b/test/tester.tcl index 8022d6a538..d83802346e 100644 --- a/test/tester.tcl +++ b/test/tester.tcl @@ -2041,6 +2041,45 @@ proc db_delete_and_reopen {{file test.db}} { sqlite3 db $file } +# Close any connections named [db], [db2] or [db3]. Then use sqlite3_config +# to configure the size of the PAGECACHE allocation using the parameters +# provided to this command. Save the old PAGECACHE parameters in a global +# variable so that [test_restore_config_pagecache] can restore the previous +# configuration. +# +# Before returning, reopen connection [db] on file test.db. +# +proc test_set_config_pagecache {sz nPg} { + catch {db close} + catch {db2 close} + catch {db3 close} + + sqlite3_shutdown + set ::old_pagecache_config [sqlite3_config_pagecache $sz $nPg] + sqlite3_initialize + autoinstall_test_functions + sqlite3 db test.db +} + +# Close any connections named [db], [db2] or [db3]. Then use sqlite3_config +# to configure the size of the PAGECACHE allocation to the size saved in +# the global variable by an earlier call to [test_set_config_pagecache]. +# +# Before returning, reopen connection [db] on file test.db. +# +proc test_restore_config_pagecache {} { + catch {db close} + catch {db2 close} + catch {db3 close} + + sqlite3_shutdown + eval sqlite3_config_pagecache $::old_pagecache_config + unset ::old_pagecache_config + sqlite3_initialize + autoinstall_test_functions + sqlite3 db test.db +} + # If the library is compiled with the SQLITE_DEFAULT_AUTOVACUUM macro set # to non-zero, then set the global variable $AUTOVACUUM to 1. set AUTOVACUUM $sqlite_options(default_autovacuum) diff --git a/test/zeroblob.test b/test/zeroblob.test index e70fd0b748..c40ad47524 100644 --- a/test/zeroblob.test +++ b/test/zeroblob.test @@ -23,6 +23,8 @@ ifcapable !incrblob { return } +test_set_config_pagecache 0 0 + # When zeroblob() is used for the last field of a column, then the # content of the zeroblob is never instantiated on the VDBE stack. # But it does get inserted into the database correctly. @@ -41,6 +43,7 @@ do_test zeroblob-1.1 { } set ::sqlite3_max_blobsize } {10} + do_test zeroblob-1.1.1 { expr {[sqlite3_memory_highwater]<$::memused+25000} } {1} @@ -265,4 +268,5 @@ do_test zeroblob-10.1 { } {1 {string or blob too big}} +test_restore_config_pagecache finish_test From 53e66c3cda52c5bda5d917ecf7b4bed2c3dfa926 Mon Sep 17 00:00:00 2001 From: drh Date: Fri, 24 Jul 2015 15:49:23 +0000 Subject: [PATCH 03/13] More robust handling of zeroblob() with oversized arguments. Fix fuzzcheck so that it can be run with limited heap memory. FossilOrigin-Name: 4e3e516a42059c97f42a7eb59bdf5cded0ff843a --- Makefile.in | 4 +-- Makefile.msc | 2 +- main.mk | 9 +++--- manifest | 28 ++++++++-------- manifest.uuid | 2 +- src/func.c | 1 + src/vdbe.c | 2 +- src/vdbeapi.c | 2 +- test/fuzzcheck.c | 81 ++++++++++++++++++++++++++++++++++++++++++++-- test/zeroblob.test | 2 +- 10 files changed, 105 insertions(+), 28 deletions(-) diff --git a/Makefile.in b/Makefile.in index 9886377a4b..4a03129d08 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1044,10 +1044,10 @@ fulltestonly: $(TESTPROGS) # Fuzz testing fuzztest: fuzzcheck$(TEXE) $(FUZZDATA) - ./fuzzcheck$(TEXE) $(FUZZDATA) + ./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA) valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA) - valgrind ./fuzzcheck$(TEXE) --cell-size-check --quiet $(FUZZDATA) + valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 100M $(FUZZDATA) # Minimal testing that runs in less than 3 minutes # diff --git a/Makefile.msc b/Makefile.msc index bec86b1bc9..1f2c0299bc 100644 --- a/Makefile.msc +++ b/Makefile.msc @@ -1736,7 +1736,7 @@ queryplantest: testfixture.exe sqlite3.exe .\testfixture.exe $(TOP)\test\permutations.test queryplanner $(TESTOPTS) fuzztest: fuzzcheck.exe - .\fuzzcheck.exe $(FUZZDATA) + .\fuzzcheck.exe --limit-mem 100M $(FUZZDATA) # Minimal testing that runs in less than 3 minutes (on a fast machine) # diff --git a/main.mk b/main.mk index c1a0e73d40..9ec193e73d 100644 --- a/main.mk +++ b/main.mk @@ -446,11 +446,12 @@ sqldiff$(EXE): $(TOP)/tool/sqldiff.c sqlite3.c sqlite3.h $(TOP)/tool/sqldiff.c sqlite3.c $(TLIBS) $(THREADLIB) fuzzershell$(EXE): $(TOP)/tool/fuzzershell.c sqlite3.c sqlite3.h - $(TCCX) -o fuzzershell$(EXE) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION\ + $(TCCX) -o fuzzershell$(EXE) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \ $(TOP)/tool/fuzzershell.c sqlite3.c $(TLIBS) $(THREADLIB) fuzzcheck$(EXE): $(TOP)/test/fuzzcheck.c sqlite3.c sqlite3.h - $(TCCX) -o fuzzcheck$(EXE) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION\ + $(TCCX) -o fuzzcheck$(EXE) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \ + -DSQLITE_ENABLE_MEMSYS5 \ $(TOP)/test/fuzzcheck.c sqlite3.c $(TLIBS) $(THREADLIB) mptester$(EXE): sqlite3.c $(TOP)/mptest/mptest.c @@ -722,10 +723,10 @@ queryplantest: testfixture$(EXE) sqlite3$(EXE) ./testfixture$(EXE) $(TOP)/test/permutations.test queryplanner $(TESTOPTS) fuzztest: fuzzcheck$(EXE) $(FUZZDATA) - ./fuzzcheck$(EXE) $(FUZZDATA) + ./fuzzcheck$(EXE) --limit-mem 100M $(FUZZDATA) valgrindfuzz: fuzzcheck$(EXE) $(FUZZDATA) - valgrind ./fuzzcheck$(EXE) --cell-size-check --quiet $(FUZZDATA) + valgrind ./fuzzcheck$(EXE) --cell-size-check --limit-mem 100M $(FUZZDATA) # A very quick test using only testfixture and omitting all the slower # tests. Designed to run in under 3 minutes on a workstation. diff --git a/manifest b/manifest index 240c60a50c..7e72c765a9 100644 --- a/manifest +++ b/manifest @@ -1,9 +1,9 @@ -C Modify\sa\sfew\stest\sscripts\sto\savoid\sleaving\sthe\ssqlite3Config\sstructure\sin\sa\snon-default\sstate. -D 2015-07-24T14:17:17.027 +C More\srobust\shandling\sof\szeroblob()\swith\soversized\sarguments.\s\sFix\sfuzzcheck\nso\sthat\sit\scan\sbe\srun\swith\slimited\sheap\smemory. +D 2015-07-24T15:49:23.313 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f -F Makefile.in b13c653ee215cb0d294ffa4f10ac4d14255767e0 +F Makefile.in 6a2355cacb04337e6f29a95200512b1cdd8c1857 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 -F Makefile.msc cddf142cac25c011aadd69a371399db9a8892ccd +F Makefile.msc ae4aebdc5581367a3c4b107f395b8a39cae69f0c F Makefile.vxworks e1b65dea203f054e71653415bd8f96dcaed47858 F README.md 8ecc12493ff9f820cdea6520a9016001cb2e59b7 F VERSION ce0ae95abd7121c534f6917c1c8f2b70d9acd4db @@ -248,7 +248,7 @@ F ext/userauth/userauth.c 5fa3bdb492f481bbc1709fc83c91ebd13460c69e F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 x F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8 F magic.txt 8273bf49ba3b0c8559cb2774495390c31fd61c60 -F main.mk 4affd40e93db8e0063c2a0768c1887b3e2a272a1 +F main.mk c94f70684cebc5108c73d5ac3af10297f296f373 F mkopcodec.awk c2ff431854d702cdd2d779c9c0d1f58fa16fa4ea F mkopcodeh.awk 0e7f04a8eb90f92259e47d80110e4e98d7ce337a F mkso.sh fd21c06b063bb16a5d25deea1752c2da6ac3ed83 @@ -282,7 +282,7 @@ F src/delete.c 8857a6f27560718f65d43bdbec86c967ae1f8dfa F src/expr.c c5c58e4d01c7ceb2266791d8d877f1b23a88e316 F src/fault.c 160a0c015b6c2629d3899ed2daf63d75754a32bb F src/fkey.c c9b63a217d86582c22121699a47f22f524608869 -F src/func.c a98ea5880dc50e9ca6dd6f57079a37b9cfcdecf1 +F src/func.c d08d2106ba10dddbee45e001b8516f4d1df2b20e F src/global.c 508e4087f7b41d688e4762dcf4d4fe28cfbc87f9 F src/hash.c 4263fbc955f26c2e8cdc0cf214bc42435aa4e4f5 F src/hash.h c8f3c31722cf3277d03713909761e152a5b81094 @@ -390,10 +390,10 @@ F src/update.c 487747b328b7216bb7f6af0695d6937d5c9e605f F src/utf.c fc6b889ba0779b7722634cdeaa25f1930d93820c F src/util.c 46358a204b35971a839341cf64599d65b151ba88 F src/vacuum.c 2ddd5cad2a7b9cef7f9e431b8c7771634c6b1701 -F src/vdbe.c 5ee4a2bf871418f61d06dc256b9b3a0084b5ec46 +F src/vdbe.c 86be40a4568f5385048ea6623adfd11ddb7bf710 F src/vdbe.h 7a75045d879118b9d3af7e8b3c108f2f27c51473 F src/vdbeInt.h 8b54e01ad0463590e7cffabce0bc36da9ee4f816 -F src/vdbeapi.c 2fa7ed7520313d6dd1dc6e6495999201c630adfc +F src/vdbeapi.c 082746d4c4788d889a2a62b858d753453e9c9c6d F src/vdbeaux.c 787f5f9d58f4c6f39294ed06909ba602d1a402e6 F src/vdbeblob.c 4f2e8e075d238392df98c5e03a64342465b03f90 F src/vdbemem.c ae38a0d35ae71cf604381a887c170466ba518090 @@ -735,7 +735,7 @@ F test/fuzz2.test 76dc35b32b6d6f965259508508abce75a6c4d7e1 F test/fuzz3.test 53fabcd5f0f430f8b221282f6c12c4d0903c21eb F test/fuzz_common.tcl a87dfbb88c2a6b08a38e9a070dabd129e617b45b F test/fuzz_malloc.test 328f70aaca63adf29b4c6f06505ed0cf57ca7c26 -F test/fuzzcheck.c b973b06b500e6fc052d7059257cdf70df1f3a986 +F test/fuzzcheck.c 79980bbc00e19ad44c3ba6699e643348572757a2 F test/fuzzdata1.db 7ee3227bad0e7ccdeb08a9e6822916777073c664 F test/fuzzdata2.db f03a420d3b822cc82e4f894ca957618fbe9c4973 F test/fuzzdata3.db 1d6044c33a114007f02b6e6846f1fa232f607bfd @@ -1307,7 +1307,7 @@ F test/without_rowid4.test 4e08bcbaee0399f35d58b5581881e7a6243d458a F test/without_rowid5.test 61256715b686359df48ca1742db50cc7e3e7b862 F test/without_rowid6.test db0dbf03c49030aa3c1ba5f618620334bd2baf5f F test/wordcount.c 9915e06cb33d8ca8109b8700791afe80d305afda -F test/zeroblob.test dcffae9583ac7a6683e814cc7a9c85b2fd73ddd8 +F test/zeroblob.test 202dbc81129a4a1509f829384b2b8aaf091635a9 F test/zerodamage.test cf6748bad89553cc1632be51a6f54e487e4039ac F tool/build-all-msvc.bat 9058bd90a3c078a3d8c17d40e853aaa0f47885f4 x F tool/build-shell.sh 950f47c6174f1eea171319438b93ba67ff5bf367 @@ -1365,7 +1365,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 119883a21bdcab66c15d1e80f3da20addda328ad -R f93dc01dd263cc307f98235646fce28d -U dan -Z 1717e31dfb28e99256b065adb47b07f0 +P 562687d9f56bf4bb0f5f07f97cbbb7649c81faf8 +R 1786aea7f8e6749074e67e1af5c8c763 +U drh +Z 01a0292cb698589e36de0afbd61cb525 diff --git a/manifest.uuid b/manifest.uuid index 77a88cee90..701da3a27b 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -562687d9f56bf4bb0f5f07f97cbbb7649c81faf8 \ No newline at end of file +4e3e516a42059c97f42a7eb59bdf5cded0ff843a \ No newline at end of file diff --git a/src/func.c b/src/func.c index d0565357d5..151a09f299 100644 --- a/src/func.c +++ b/src/func.c @@ -1131,6 +1131,7 @@ static void zeroblobFunc( if( n>db->aLimit[SQLITE_LIMIT_LENGTH] ){ sqlite3_result_error_toobig(context); }else{ + if( n<0 ) n = 0; sqlite3_result_zeroblob(context, (int)n); /* IMP: R-00293-64994 */ } } diff --git a/src/vdbe.c b/src/vdbe.c index 296a12bc9f..fe97087c09 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -2702,7 +2702,7 @@ case OP_MakeRecord: { len = sqlite3VdbeSerialTypeLen(serial_type); if( pRec->flags & MEM_Zero ){ if( nData ){ - sqlite3VdbeMemExpandBlob(pRec); + if( sqlite3VdbeMemExpandBlob(pRec) ) goto no_mem; }else{ nZero += pRec->u.nZero; len -= pRec->u.nZero; diff --git a/src/vdbeapi.c b/src/vdbeapi.c index 4687aac510..391e3adb03 100644 --- a/src/vdbeapi.c +++ b/src/vdbeapi.c @@ -162,7 +162,7 @@ int sqlite3_clear_bindings(sqlite3_stmt *pStmt){ const void *sqlite3_value_blob(sqlite3_value *pVal){ Mem *p = (Mem*)pVal; if( p->flags & (MEM_Blob|MEM_Str) ){ - sqlite3VdbeMemExpandBlob(p); + if( sqlite3VdbeMemExpandBlob(p)!=SQLITE_OK ) return 0; p->flags |= MEM_Blob; return p->n ? p->z : 0; }else{ diff --git a/test/fuzzcheck.c b/test/fuzzcheck.c index d17a9a1289..c678e2af7a 100644 --- a/test/fuzzcheck.c +++ b/test/fuzzcheck.c @@ -682,6 +682,64 @@ static void rebuild_database(sqlite3 *db){ if( rc ) fatalError("cannot rebuild: %s", sqlite3_errmsg(db)); } +/* +** Return the value of a hexadecimal digit. Return -1 if the input +** is not a hex digit. +*/ +static int hexDigitValue(char c){ + if( c>='0' && c<='9' ) return c - '0'; + if( c>='a' && c<='f' ) return c - 'a' + 10; + if( c>='A' && c<='F' ) return c - 'A' + 10; + return -1; +} + +/* +** Interpret zArg as an integer value, possibly with suffixes. +*/ +static int integerValue(const char *zArg){ + sqlite3_int64 v = 0; + static const struct { char *zSuffix; int iMult; } aMult[] = { + { "KiB", 1024 }, + { "MiB", 1024*1024 }, + { "GiB", 1024*1024*1024 }, + { "KB", 1000 }, + { "MB", 1000000 }, + { "GB", 1000000000 }, + { "K", 1000 }, + { "M", 1000000 }, + { "G", 1000000000 }, + }; + int i; + int isNeg = 0; + if( zArg[0]=='-' ){ + isNeg = 1; + zArg++; + }else if( zArg[0]=='+' ){ + zArg++; + } + if( zArg[0]=='0' && zArg[1]=='x' ){ + int x; + zArg += 2; + while( (x = hexDigitValue(zArg[0]))>=0 ){ + v = (v<<4) + x; + zArg++; + } + }else{ + while( isdigit(zArg[0]) ){ + v = v*10 + zArg[0] - '0'; + zArg++; + } + } + for(i=0; i0x7fffffff ) fatalError("parameter too large - max 2147483648"); + return (int)(isNeg? -v : v); +} + /* ** Print sketchy documentation for this utility program */ @@ -696,6 +754,7 @@ static void showHelp(void){ " --help Show this help text\n" " -q Reduced output\n" " --quiet Reduced output\n" +" --limit-mem N Limit memory used by test SQLite instance to N bytes\n" " --limit-vdbe Panic if an sync SQL runs for more than 100,000 cycles\n" " --load-sql ARGS... Load SQL scripts fro files into SOURCE-DB\n" " --load-db ARGS... Load template databases from files into SOURCE_DB\n" @@ -739,6 +798,7 @@ int main(int argc, char **argv){ int cellSzCkFlag = 0; /* --cell-size-check */ int sqlFuzz = 0; /* True for SQL fuzz testing. False for DB fuzz */ int iTimeout = 120; /* Default 120-second timeout */ + int nMem = 0; /* Memory limit */ iBegin = timeOfDay(); #ifdef __unix__ @@ -756,12 +816,16 @@ int main(int argc, char **argv){ }else if( strcmp(z,"dbid")==0 ){ if( i>=argc-1 ) fatalError("missing arguments on %s", argv[i]); - onlyDbid = atoi(argv[++i]); + onlyDbid = integerValue(argv[++i]); }else if( strcmp(z,"help")==0 ){ showHelp(); return 0; }else + if( strcmp(z,"limit-mem")==0 ){ + if( i>=argc-1 ) fatalError("missing arguments on %s", argv[i]); + nMem = integerValue(argv[++i]); + }else if( strcmp(z,"limit-vdbe")==0 ){ vdbeLimitFlag = 1; }else @@ -794,11 +858,11 @@ int main(int argc, char **argv){ }else if( strcmp(z,"sqlid")==0 ){ if( i>=argc-1 ) fatalError("missing arguments on %s", argv[i]); - onlySqlid = atoi(argv[++i]); + onlySqlid = integerValue(argv[++i]); }else if( strcmp(z,"timeout")==0 ){ if( i>=argc-1 ) fatalError("missing arguments on %s", argv[i]); - iTimeout = atoi(argv[++i]); + iTimeout = integerValue(argv[++i]); }else if( strcmp(z,"timeout-test")==0 ){ timeoutTest = 1; @@ -928,6 +992,17 @@ int main(int argc, char **argv){ if( sqlite3_memory_used()>0 ){ fatalError("SQLite has memory in use before the start of testing"); } + + /* Limit available memory, if requested */ + if( nMem>0 ){ + void *pHeap; + sqlite3_shutdown(); + pHeap = malloc(nMem); + if( pHeap==0 ){ + fatalError("failed to allocate %d bytes of heap memory", nMem); + } + sqlite3_config(SQLITE_CONFIG_HEAP, pHeap, nMem, 128); + } /* Register the in-memory virtual filesystem */ diff --git a/test/zeroblob.test b/test/zeroblob.test index c40ad47524..d0196a546c 100644 --- a/test/zeroblob.test +++ b/test/zeroblob.test @@ -45,7 +45,7 @@ do_test zeroblob-1.1 { } {10} do_test zeroblob-1.1.1 { - expr {[sqlite3_memory_highwater]<$::memused+25000} + expr {[sqlite3_memory_highwater]<$::memused+35000} } {1} do_test zeroblob-1.2 { execsql { From a4d5ae8fa2162be7348bced27ed18969f80494b3 Mon Sep 17 00:00:00 2001 From: dan Date: Fri, 24 Jul 2015 16:24:37 +0000 Subject: [PATCH 04/13] Add the sqlite3_result_zeroblob64() API. Use it in the SQL zeroblob() function. FossilOrigin-Name: c6445b9fb4d7d1a8479436d7d183bad754a01615 --- manifest | 22 +++++++++++----------- manifest.uuid | 2 +- src/func.c | 10 +++++----- src/sqlite.h.in | 5 +++-- src/sqlite3ext.h | 2 ++ src/vdbeapi.c | 14 +++++++++++++- test/zeroblob.test | 20 ++++++++++++++++++++ 7 files changed, 55 insertions(+), 20 deletions(-) diff --git a/manifest b/manifest index 7e72c765a9..efbf479501 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C More\srobust\shandling\sof\szeroblob()\swith\soversized\sarguments.\s\sFix\sfuzzcheck\nso\sthat\sit\scan\sbe\srun\swith\slimited\sheap\smemory. -D 2015-07-24T15:49:23.313 +C Add\sthe\ssqlite3_result_zeroblob64()\sAPI.\sUse\sit\sin\sthe\sSQL\szeroblob()\sfunction. +D 2015-07-24T16:24:37.673 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 6a2355cacb04337e6f29a95200512b1cdd8c1857 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -282,7 +282,7 @@ F src/delete.c 8857a6f27560718f65d43bdbec86c967ae1f8dfa F src/expr.c c5c58e4d01c7ceb2266791d8d877f1b23a88e316 F src/fault.c 160a0c015b6c2629d3899ed2daf63d75754a32bb F src/fkey.c c9b63a217d86582c22121699a47f22f524608869 -F src/func.c d08d2106ba10dddbee45e001b8516f4d1df2b20e +F src/func.c 7810a7e88340f1fc1173cd0ac1461dc809c32039 F src/global.c 508e4087f7b41d688e4762dcf4d4fe28cfbc87f9 F src/hash.c 4263fbc955f26c2e8cdc0cf214bc42435aa4e4f5 F src/hash.h c8f3c31722cf3277d03713909761e152a5b81094 @@ -329,9 +329,9 @@ F src/resolve.c 2d47554370de8de6dd5be060cef9559eec315005 F src/rowset.c eccf6af6d620aaa4579bd3b72c1b6395d9e9fa1e F src/select.c 57ef3d98c4400b93eea318813be41b2af2da2217 F src/shell.c 8af3cced094aebb5f57a8ad739b9dafc7867eed7 -F src/sqlite.h.in ae2a0ceb9d65880437d56dfa9bd9ed1af7d36fce +F src/sqlite.h.in f589633da2c6b55bb9eef525eb8ab918693a95a2 F src/sqlite3.rc 992c9f5fb8285ae285d6be28240a7e8d3a7f2bad -F src/sqlite3ext.h be1a718b7d2ce40ceba725ae92c8eb5f18003066 +F src/sqlite3ext.h 3d12a31e2346ce8c00c189bc5816d056d4f36c5f F src/sqliteInt.h c67d0a1368484dd156e7d13caa62862adc2ebefa F src/sqliteLimit.h 216557999cb45f2e3578ed53ebefe228d779cb46 F src/status.c f266ad8a2892d659b74f0f50cb6a88b6e7c12179 @@ -393,7 +393,7 @@ F src/vacuum.c 2ddd5cad2a7b9cef7f9e431b8c7771634c6b1701 F src/vdbe.c 86be40a4568f5385048ea6623adfd11ddb7bf710 F src/vdbe.h 7a75045d879118b9d3af7e8b3c108f2f27c51473 F src/vdbeInt.h 8b54e01ad0463590e7cffabce0bc36da9ee4f816 -F src/vdbeapi.c 082746d4c4788d889a2a62b858d753453e9c9c6d +F src/vdbeapi.c a0ffa364a7a65a401a1784d4cae60b4fbb5851a9 F src/vdbeaux.c 787f5f9d58f4c6f39294ed06909ba602d1a402e6 F src/vdbeblob.c 4f2e8e075d238392df98c5e03a64342465b03f90 F src/vdbemem.c ae38a0d35ae71cf604381a887c170466ba518090 @@ -1307,7 +1307,7 @@ F test/without_rowid4.test 4e08bcbaee0399f35d58b5581881e7a6243d458a F test/without_rowid5.test 61256715b686359df48ca1742db50cc7e3e7b862 F test/without_rowid6.test db0dbf03c49030aa3c1ba5f618620334bd2baf5f F test/wordcount.c 9915e06cb33d8ca8109b8700791afe80d305afda -F test/zeroblob.test 202dbc81129a4a1509f829384b2b8aaf091635a9 +F test/zeroblob.test de0bf437a28a0b46f25bf735a0b83f74d46256ed F test/zerodamage.test cf6748bad89553cc1632be51a6f54e487e4039ac F tool/build-all-msvc.bat 9058bd90a3c078a3d8c17d40e853aaa0f47885f4 x F tool/build-shell.sh 950f47c6174f1eea171319438b93ba67ff5bf367 @@ -1365,7 +1365,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 562687d9f56bf4bb0f5f07f97cbbb7649c81faf8 -R 1786aea7f8e6749074e67e1af5c8c763 -U drh -Z 01a0292cb698589e36de0afbd61cb525 +P 4e3e516a42059c97f42a7eb59bdf5cded0ff843a +R bcc4b0d19f8b6f51dfb98e4327642a62 +U dan +Z 5486cc6a4cbcc5894497bb04b4f0e89b diff --git a/manifest.uuid b/manifest.uuid index 701da3a27b..5ce71235a6 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -4e3e516a42059c97f42a7eb59bdf5cded0ff843a \ No newline at end of file +c6445b9fb4d7d1a8479436d7d183bad754a01615 \ No newline at end of file diff --git a/src/func.c b/src/func.c index 151a09f299..00c75e6592 100644 --- a/src/func.c +++ b/src/func.c @@ -1122,17 +1122,17 @@ static void zeroblobFunc( sqlite3_value **argv ){ i64 n; + int rc; sqlite3 *db = sqlite3_context_db_handle(context); assert( argc==1 ); UNUSED_PARAMETER(argc); n = sqlite3_value_int64(argv[0]); testcase( n==db->aLimit[SQLITE_LIMIT_LENGTH] ); testcase( n==db->aLimit[SQLITE_LIMIT_LENGTH]+1 ); - if( n>db->aLimit[SQLITE_LIMIT_LENGTH] ){ - sqlite3_result_error_toobig(context); - }else{ - if( n<0 ) n = 0; - sqlite3_result_zeroblob(context, (int)n); /* IMP: R-00293-64994 */ + if( n<0 ) n = 0; + rc = sqlite3_result_zeroblob64(context, n); /* IMP: R-00293-64994 */ + if( rc ){ + sqlite3_result_error_code(context, rc); } } diff --git a/src/sqlite.h.in b/src/sqlite.h.in index fc1dc6dbf2..909d568692 100644 --- a/src/sqlite.h.in +++ b/src/sqlite.h.in @@ -4534,8 +4534,8 @@ typedef void (*sqlite3_destructor_type)(void*); ** to by the second parameter and which is N bytes long where N is the ** third parameter. ** -** ^The sqlite3_result_zeroblob() interfaces set the result of -** the application-defined function to be a BLOB containing all zero +** ^The sqlite3_result_zeroblob() and zeroblob64() interfaces set the result +** of the application-defined function to be a BLOB containing all zero ** bytes and N bytes in size, where N is the value of the 2nd parameter. ** ** ^The sqlite3_result_double() interface sets the result from @@ -4651,6 +4651,7 @@ void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*)); void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*)); void sqlite3_result_value(sqlite3_context*, sqlite3_value*); void sqlite3_result_zeroblob(sqlite3_context*, int n); +int sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n); /* ** CAPI3REF: Define New Collating Sequences diff --git a/src/sqlite3ext.h b/src/sqlite3ext.h index b56cc4e54c..10fb40a2a8 100644 --- a/src/sqlite3ext.h +++ b/src/sqlite3ext.h @@ -270,6 +270,7 @@ struct sqlite3_api_routines { /* Version 3.8.11 and later */ sqlite3_value *(*value_dup)(const sqlite3_value*); void (*value_free)(sqlite3_value*); + int (*result_zeroblob64)(sqlite3_context*,sqlite3_uint64); }; /* @@ -503,6 +504,7 @@ struct sqlite3_api_routines { /* Version 3.8.11 and later */ #define sqlite3_value_dup sqlite3_api->value_dup #define sqlite3_value_free sqlite3_api->value_free +#define sqlite3_result_zeroblob64 sqlite3_api->result_zeroblob64 #endif /* SQLITE_CORE */ #ifndef SQLITE_CORE diff --git a/src/vdbeapi.c b/src/vdbeapi.c index 391e3adb03..891107e5bb 100644 --- a/src/vdbeapi.c +++ b/src/vdbeapi.c @@ -162,7 +162,10 @@ int sqlite3_clear_bindings(sqlite3_stmt *pStmt){ const void *sqlite3_value_blob(sqlite3_value *pVal){ Mem *p = (Mem*)pVal; if( p->flags & (MEM_Blob|MEM_Str) ){ - if( sqlite3VdbeMemExpandBlob(p)!=SQLITE_OK ) return 0; + if( sqlite3VdbeMemExpandBlob(p)!=SQLITE_OK ){ + assert( p->flags==MEM_Null && p->z==0 ); + return 0; + } p->flags |= MEM_Blob; return p->n ? p->z : 0; }else{ @@ -424,6 +427,15 @@ void sqlite3_result_zeroblob(sqlite3_context *pCtx, int n){ assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) ); sqlite3VdbeMemSetZeroBlob(pCtx->pOut, n); } +int sqlite3_result_zeroblob64(sqlite3_context *pCtx, u64 n){ + Mem *pOut = pCtx->pOut; + assert( sqlite3_mutex_held(pOut->db->mutex) ); + if( n>pOut->db->aLimit[SQLITE_LIMIT_LENGTH] ){ + return SQLITE_TOOBIG; + } + sqlite3VdbeMemSetZeroBlob(pCtx->pOut, (int)n); + return SQLITE_OK; +} void sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){ pCtx->isError = errCode; pCtx->fErrorOrAux = 1; diff --git a/test/zeroblob.test b/test/zeroblob.test index d0196a546c..ff337ca48d 100644 --- a/test/zeroblob.test +++ b/test/zeroblob.test @@ -17,6 +17,7 @@ set testdir [file dirname $argv0] source $testdir/tester.tcl +set testprefix zeroblob ifcapable !incrblob { finish_test @@ -267,6 +268,25 @@ do_test zeroblob-10.1 { catchsql {INSERT INTO t10 VALUES(zeroblob(1e9),zeroblob(1e9),zeroblob(1e9))} } {1 {string or blob too big}} +#------------------------------------------------------------------------- +## Test the zeroblob() function on its own with negative or oversized +## arguments. +## +do_execsql_test 11.0 { + SELECT length(zeroblob(-1444444444444444)); +} {0} +do_catchsql_test 11.1 { + SELECT zeroblob(1025 * 1024 * 1024); +} {1 {string or blob too big}} +do_catchsql_test 11.2 { + SELECT quote(zeroblob(1025 * 1024 * 1024)); +} {1 {string or blob too big}} +do_catchsql_test 11.3 { + SELECT quote(zeroblob(-1444444444444444)); +} {0 X''} +do_catchsql_test 11.4 { + SELECT quote(test_zeroblob(-1)); +} {0 X''} test_restore_config_pagecache finish_test From 6bacdc21aebcdebcbc2b035a6ae25772b4d1b641 Mon Sep 17 00:00:00 2001 From: drh Date: Fri, 24 Jul 2015 17:14:03 +0000 Subject: [PATCH 05/13] Fix compiler warnings. Get the new sqlite3_result_zeroblob64() working on loadable extensions. FossilOrigin-Name: f8991e6f726485301c80d2dbb05e7d5c0d283b5d --- manifest | 20 ++++++++++---------- manifest.uuid | 2 +- src/func.c | 3 --- src/loadext.c | 3 ++- src/test_malloc.c | 6 +++--- src/vdbeapi.c | 2 +- 6 files changed, 17 insertions(+), 19 deletions(-) diff --git a/manifest b/manifest index efbf479501..77517a6551 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Add\sthe\ssqlite3_result_zeroblob64()\sAPI.\sUse\sit\sin\sthe\sSQL\szeroblob()\sfunction. -D 2015-07-24T16:24:37.673 +C Fix\scompiler\swarnings.\s\sGet\sthe\snew\ssqlite3_result_zeroblob64()\sworking\non\sloadable\sextensions. +D 2015-07-24T17:14:03.945 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 6a2355cacb04337e6f29a95200512b1cdd8c1857 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -282,7 +282,7 @@ F src/delete.c 8857a6f27560718f65d43bdbec86c967ae1f8dfa F src/expr.c c5c58e4d01c7ceb2266791d8d877f1b23a88e316 F src/fault.c 160a0c015b6c2629d3899ed2daf63d75754a32bb F src/fkey.c c9b63a217d86582c22121699a47f22f524608869 -F src/func.c 7810a7e88340f1fc1173cd0ac1461dc809c32039 +F src/func.c 824bea430d3a2b7dbc62806ad54da8fdb8ed9e3f F src/global.c 508e4087f7b41d688e4762dcf4d4fe28cfbc87f9 F src/hash.c 4263fbc955f26c2e8cdc0cf214bc42435aa4e4f5 F src/hash.h c8f3c31722cf3277d03713909761e152a5b81094 @@ -291,7 +291,7 @@ F src/insert.c b5f8b35a1b7924020e48cade5b2b5017bca7906b F src/journal.c b4124532212b6952f42eb2c12fa3c25701d8ba8d F src/legacy.c ba1863ea58c4c840335a84ec276fc2b25e22bc4e F src/lempar.c 92bafa308607dd985ca389a788cd9e0a2b608712 -F src/loadext.c e722f4b832f923744788365df5fb8515c0bc8a47 +F src/loadext.c 78ff69f010ba4db1cc7a2bfdd9cdcacd63ade888 F src/main.c 0a60b7ca8252c3a6f95438fa4ce8fe5b275c69f2 F src/malloc.c 19461e159bccf0e2cf06a50e867963d0a7b124a8 F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645 @@ -362,7 +362,7 @@ F src/test_intarray.c 870124b95ec4c645d4eb84f15efb7133528fb1a5 F src/test_intarray.h 9dc57417fb65bc7835cc18548852cc08cc062202 F src/test_journal.c 5360fbe1d1e4416ca36290562fd5a2e3f70f32aa F src/test_loadext.c a5251f956ab6af21e138dc1f9c0399394a510cb4 -F src/test_malloc.c e19790f6bdc9be7b75147682153520df7843487a +F src/test_malloc.c 27d9e11b6e9d30267465d41ad81edbe24256408b F src/test_multiplex.c 9fefd23f6cc3fa9bf0748a5e453167e7b9f193ce F src/test_multiplex.h c08e4e8f8651f0c5e0509b138ff4d5b43ed1f5d3 F src/test_mutex.c dbdfaff8580071f2212a0deae3325a93a737819c @@ -393,7 +393,7 @@ F src/vacuum.c 2ddd5cad2a7b9cef7f9e431b8c7771634c6b1701 F src/vdbe.c 86be40a4568f5385048ea6623adfd11ddb7bf710 F src/vdbe.h 7a75045d879118b9d3af7e8b3c108f2f27c51473 F src/vdbeInt.h 8b54e01ad0463590e7cffabce0bc36da9ee4f816 -F src/vdbeapi.c a0ffa364a7a65a401a1784d4cae60b4fbb5851a9 +F src/vdbeapi.c f91ac25af031b48c3b5c7e1ce667f07f88dfea5b F src/vdbeaux.c 787f5f9d58f4c6f39294ed06909ba602d1a402e6 F src/vdbeblob.c 4f2e8e075d238392df98c5e03a64342465b03f90 F src/vdbemem.c ae38a0d35ae71cf604381a887c170466ba518090 @@ -1365,7 +1365,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 4e3e516a42059c97f42a7eb59bdf5cded0ff843a -R bcc4b0d19f8b6f51dfb98e4327642a62 -U dan -Z 5486cc6a4cbcc5894497bb04b4f0e89b +P c6445b9fb4d7d1a8479436d7d183bad754a01615 +R 4554c2a546ef01870bbadda282212131 +U drh +Z a0627092df24698ce25e2ad5d492680b diff --git a/manifest.uuid b/manifest.uuid index 5ce71235a6..69dbf1c943 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -c6445b9fb4d7d1a8479436d7d183bad754a01615 \ No newline at end of file +f8991e6f726485301c80d2dbb05e7d5c0d283b5d \ No newline at end of file diff --git a/src/func.c b/src/func.c index 00c75e6592..6ecd743969 100644 --- a/src/func.c +++ b/src/func.c @@ -1123,12 +1123,9 @@ static void zeroblobFunc( ){ i64 n; int rc; - sqlite3 *db = sqlite3_context_db_handle(context); assert( argc==1 ); UNUSED_PARAMETER(argc); n = sqlite3_value_int64(argv[0]); - testcase( n==db->aLimit[SQLITE_LIMIT_LENGTH] ); - testcase( n==db->aLimit[SQLITE_LIMIT_LENGTH]+1 ); if( n<0 ) n = 0; rc = sqlite3_result_zeroblob64(context, n); /* IMP: R-00293-64994 */ if( rc ){ diff --git a/src/loadext.c b/src/loadext.c index dcdbb28126..b519c4054f 100644 --- a/src/loadext.c +++ b/src/loadext.c @@ -405,7 +405,8 @@ static const sqlite3_api_routines sqlite3Apis = { sqlite3_strglob, /* Version 3.8.11 and later */ (sqlite3_value*(*)(const sqlite3_value*))sqlite3_value_dup, - sqlite3_value_free + sqlite3_value_free, + sqlite3_result_zeroblob64 }; /* diff --git a/src/test_malloc.c b/src/test_malloc.c index ed46e7a8db..3ab177dcb7 100644 --- a/src/test_malloc.c +++ b/src/test_malloc.c @@ -938,7 +938,7 @@ static int test_config_pagecache( int objc, Tcl_Obj *CONST objv[] ){ - int sz, N, rc; + int sz, N; Tcl_Obj *pRes; static char *buf = 0; if( objc!=3 ){ @@ -957,10 +957,10 @@ static int test_config_pagecache( Tcl_SetObjResult(interp, pRes); if( sz<0 ){ - rc = sqlite3_config(SQLITE_CONFIG_PAGECACHE, 0, 0, 0); + sqlite3_config(SQLITE_CONFIG_PAGECACHE, 0, 0, 0); }else{ buf = malloc( sz*N ); - rc = sqlite3_config(SQLITE_CONFIG_PAGECACHE, buf, sz, N); + sqlite3_config(SQLITE_CONFIG_PAGECACHE, buf, sz, N); } return TCL_OK; } diff --git a/src/vdbeapi.c b/src/vdbeapi.c index 891107e5bb..92d33486ba 100644 --- a/src/vdbeapi.c +++ b/src/vdbeapi.c @@ -430,7 +430,7 @@ void sqlite3_result_zeroblob(sqlite3_context *pCtx, int n){ int sqlite3_result_zeroblob64(sqlite3_context *pCtx, u64 n){ Mem *pOut = pCtx->pOut; assert( sqlite3_mutex_held(pOut->db->mutex) ); - if( n>pOut->db->aLimit[SQLITE_LIMIT_LENGTH] ){ + if( n>(u64)pOut->db->aLimit[SQLITE_LIMIT_LENGTH] ){ return SQLITE_TOOBIG; } sqlite3VdbeMemSetZeroBlob(pCtx->pOut, (int)n); From a523e31a872248c15d7edc4fab420dcab17bb73c Mon Sep 17 00:00:00 2001 From: drh Date: Fri, 24 Jul 2015 17:26:13 +0000 Subject: [PATCH 06/13] New makefile target "fastfuzztest" runs the same tests as "fuzztest" but with a 100M memory size limit. This more than doubles the speed. The original unlimited "fuzztest" is still run on a "fulltest". FossilOrigin-Name: cfeb1b1c294c58222549d06819e9df2e300388fd --- Makefile.in | 9 ++++++--- Makefile.msc | 5 ++++- main.mk | 7 +++++-- manifest | 16 ++++++++-------- manifest.uuid | 2 +- 5 files changed, 24 insertions(+), 15 deletions(-) diff --git a/Makefile.in b/Makefile.in index 4a03129d08..4dfe381af4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1039,15 +1039,18 @@ soaktest: $(TESTPROGS) ./testfixture$(TEXE) $(TOP)/test/all.test -soak=1 $(TESTOPTS) # Do extra testing but not everything. -fulltestonly: $(TESTPROGS) +fulltestonly: $(TESTPROGS) fuzztest ./testfixture$(TEXE) $(TOP)/test/full.test # Fuzz testing fuzztest: fuzzcheck$(TEXE) $(FUZZDATA) + ./fuzzcheck$(TEXE) $(FUZZDATA) + +fastfuzztest: fuzzcheck$(TEXE) $(FUZZDATA) ./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA) valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA) - valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 100M $(FUZZDATA) + valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M $(FUZZDATA) # Minimal testing that runs in less than 3 minutes # @@ -1057,7 +1060,7 @@ quicktest: ./testfixture$(TEXE) # This is the common case. Run many tests that do not take too long, # including fuzzcheck, sqlite3_analyzer, and sqldiff tests. # -test: $(TESTPROGS) fuzztest +test: $(TESTPROGS) fastfuzztest ./testfixture$(TEXE) $(TOP)/test/veryquick.test $(TESTOPTS) # Run a test using valgrind. This can take a really long time diff --git a/Makefile.msc b/Makefile.msc index 1f2c0299bc..0e1fedee67 100644 --- a/Makefile.msc +++ b/Makefile.msc @@ -1736,6 +1736,9 @@ queryplantest: testfixture.exe sqlite3.exe .\testfixture.exe $(TOP)\test\permutations.test queryplanner $(TESTOPTS) fuzztest: fuzzcheck.exe + .\fuzzcheck.exe $(FUZZDATA) + +fastfuzztest: fuzzcheck.exe .\fuzzcheck.exe --limit-mem 100M $(FUZZDATA) # Minimal testing that runs in less than 3 minutes (on a fast machine) @@ -1746,7 +1749,7 @@ quicktest: testfixture.exe # This is the common case. Run many tests that do not take too long, # including fuzzcheck, sqlite3_analyzer, and sqldiff tests. # -test: $(TESTPROGS) fuzztest +test: $(TESTPROGS) fastfuzztest .\testfixture.exe $(TOP)\test\veryquick.test $(TESTOPTS) smoketest: $(TESTPROGS) diff --git a/main.mk b/main.mk index 9ec193e73d..7f2d6f0304 100644 --- a/main.mk +++ b/main.mk @@ -723,10 +723,13 @@ queryplantest: testfixture$(EXE) sqlite3$(EXE) ./testfixture$(EXE) $(TOP)/test/permutations.test queryplanner $(TESTOPTS) fuzztest: fuzzcheck$(EXE) $(FUZZDATA) + ./fuzzcheck$(EXE) $(FUZZDATA) + +fastfuzztest: fuzzcheck$(EXE) $(FUZZDATA) ./fuzzcheck$(EXE) --limit-mem 100M $(FUZZDATA) valgrindfuzz: fuzzcheck$(EXE) $(FUZZDATA) - valgrind ./fuzzcheck$(EXE) --cell-size-check --limit-mem 100M $(FUZZDATA) + valgrind ./fuzzcheck$(EXE) --cell-size-check --limit-mem 10M $(FUZZDATA) # A very quick test using only testfixture and omitting all the slower # tests. Designed to run in under 3 minutes on a workstation. @@ -737,7 +740,7 @@ quicktest: ./testfixture$(EXE) # The default test case. Runs most of the faster standard TCL tests, # and fuzz tests, and sqlite3_analyzer and sqldiff tests. # -test: $(TESTPROGS) fuzztest +test: $(TESTPROGS) fastfuzztest ./testfixture$(EXE) $(TOP)/test/veryquick.test $(TESTOPTS) # Run a test using valgrind. This can take a really long time diff --git a/manifest b/manifest index 77517a6551..2b00436646 100644 --- a/manifest +++ b/manifest @@ -1,9 +1,9 @@ -C Fix\scompiler\swarnings.\s\sGet\sthe\snew\ssqlite3_result_zeroblob64()\sworking\non\sloadable\sextensions. -D 2015-07-24T17:14:03.945 +C New\smakefile\starget\s"fastfuzztest"\sruns\sthe\ssame\stests\sas\s"fuzztest"\sbut\nwith\sa\s100M\smemory\ssize\slimit.\s\sThis\smore\sthan\sdoubles\sthe\sspeed.\s\sThe\noriginal\sunlimited\s"fuzztest"\sis\sstill\srun\son\sa\s"fulltest". +D 2015-07-24T17:26:13.576 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f -F Makefile.in 6a2355cacb04337e6f29a95200512b1cdd8c1857 +F Makefile.in 4de3ef40c8b3b75c0c55ff4242a43c8ce1ad90ee F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 -F Makefile.msc ae4aebdc5581367a3c4b107f395b8a39cae69f0c +F Makefile.msc 3c258b2f98adb08c7ca5950bee2d6670d6ee3f9a F Makefile.vxworks e1b65dea203f054e71653415bd8f96dcaed47858 F README.md 8ecc12493ff9f820cdea6520a9016001cb2e59b7 F VERSION ce0ae95abd7121c534f6917c1c8f2b70d9acd4db @@ -248,7 +248,7 @@ F ext/userauth/userauth.c 5fa3bdb492f481bbc1709fc83c91ebd13460c69e F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 x F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8 F magic.txt 8273bf49ba3b0c8559cb2774495390c31fd61c60 -F main.mk c94f70684cebc5108c73d5ac3af10297f296f373 +F main.mk 538244d18f37f30a45da813a7bc43294e6fda8cc F mkopcodec.awk c2ff431854d702cdd2d779c9c0d1f58fa16fa4ea F mkopcodeh.awk 0e7f04a8eb90f92259e47d80110e4e98d7ce337a F mkso.sh fd21c06b063bb16a5d25deea1752c2da6ac3ed83 @@ -1365,7 +1365,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P c6445b9fb4d7d1a8479436d7d183bad754a01615 -R 4554c2a546ef01870bbadda282212131 +P f8991e6f726485301c80d2dbb05e7d5c0d283b5d +R 5b7cdbc8a797f7286663b9eb72acbd15 U drh -Z a0627092df24698ce25e2ad5d492680b +Z 4fdeea847ec9dd14145b4857e3d98a62 diff --git a/manifest.uuid b/manifest.uuid index 69dbf1c943..a55fee3566 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -f8991e6f726485301c80d2dbb05e7d5c0d283b5d \ No newline at end of file +cfeb1b1c294c58222549d06819e9df2e300388fd \ No newline at end of file From 80c030222853ebcee4a96c173b8eb9142ec1811e Mon Sep 17 00:00:00 2001 From: dan Date: Fri, 24 Jul 2015 17:36:34 +0000 Subject: [PATCH 07/13] Add the sqlite3_bind_zeroblob64() API. FossilOrigin-Name: 1997ee548b2e569a39e73319b661c1a78dfe5dae --- manifest | 24 ++++++++++++------------ manifest.uuid | 2 +- src/loadext.c | 3 ++- src/sqlite.h.in | 1 + src/sqlite3ext.h | 2 ++ src/test1.c | 38 ++++++++++++++++++++++++++++++++++++++ src/vdbeapi.c | 14 ++++++++++++++ test/zeroblob.test | 34 +++++++++++++++++++++++++++++++--- 8 files changed, 101 insertions(+), 17 deletions(-) diff --git a/manifest b/manifest index 2b00436646..85871908ec 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C New\smakefile\starget\s"fastfuzztest"\sruns\sthe\ssame\stests\sas\s"fuzztest"\sbut\nwith\sa\s100M\smemory\ssize\slimit.\s\sThis\smore\sthan\sdoubles\sthe\sspeed.\s\sThe\noriginal\sunlimited\s"fuzztest"\sis\sstill\srun\son\sa\s"fulltest". -D 2015-07-24T17:26:13.576 +C Add\sthe\ssqlite3_bind_zeroblob64()\sAPI. +D 2015-07-24T17:36:34.275 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 4de3ef40c8b3b75c0c55ff4242a43c8ce1ad90ee F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -291,7 +291,7 @@ F src/insert.c b5f8b35a1b7924020e48cade5b2b5017bca7906b F src/journal.c b4124532212b6952f42eb2c12fa3c25701d8ba8d F src/legacy.c ba1863ea58c4c840335a84ec276fc2b25e22bc4e F src/lempar.c 92bafa308607dd985ca389a788cd9e0a2b608712 -F src/loadext.c 78ff69f010ba4db1cc7a2bfdd9cdcacd63ade888 +F src/loadext.c dfcee8c7c032cd0fd55af3e0fc1fcfb01e426df2 F src/main.c 0a60b7ca8252c3a6f95438fa4ce8fe5b275c69f2 F src/malloc.c 19461e159bccf0e2cf06a50e867963d0a7b124a8 F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645 @@ -329,15 +329,15 @@ F src/resolve.c 2d47554370de8de6dd5be060cef9559eec315005 F src/rowset.c eccf6af6d620aaa4579bd3b72c1b6395d9e9fa1e F src/select.c 57ef3d98c4400b93eea318813be41b2af2da2217 F src/shell.c 8af3cced094aebb5f57a8ad739b9dafc7867eed7 -F src/sqlite.h.in f589633da2c6b55bb9eef525eb8ab918693a95a2 +F src/sqlite.h.in f623dd30a4fb7df2fb44a2a85e27813d25e486c2 F src/sqlite3.rc 992c9f5fb8285ae285d6be28240a7e8d3a7f2bad -F src/sqlite3ext.h 3d12a31e2346ce8c00c189bc5816d056d4f36c5f +F src/sqlite3ext.h a0b948ebc89bac13941254641326a6aa248c2cc4 F src/sqliteInt.h c67d0a1368484dd156e7d13caa62862adc2ebefa F src/sqliteLimit.h 216557999cb45f2e3578ed53ebefe228d779cb46 F src/status.c f266ad8a2892d659b74f0f50cb6a88b6e7c12179 F src/table.c 51b46b2a62d1b3a959633d593b89bab5e2c9155e F src/tclsqlite.c d9439b6a910985b7fff43ba6756bcef00de22649 -F src/test1.c 375d7bd56d9f806095deb91a3dafe61bd0e367c8 +F src/test1.c ab312f4160fdd9c82e65e8b123e35ef17e879c07 F src/test2.c 577961fe48961b2f2e5c8b56ee50c3f459d3359d F src/test3.c 64d2afdd68feac1bb5e2ffb8226c8c639f798622 F src/test4.c d168f83cc78d02e8d35567bb5630e40dcd85ac1e @@ -393,7 +393,7 @@ F src/vacuum.c 2ddd5cad2a7b9cef7f9e431b8c7771634c6b1701 F src/vdbe.c 86be40a4568f5385048ea6623adfd11ddb7bf710 F src/vdbe.h 7a75045d879118b9d3af7e8b3c108f2f27c51473 F src/vdbeInt.h 8b54e01ad0463590e7cffabce0bc36da9ee4f816 -F src/vdbeapi.c f91ac25af031b48c3b5c7e1ce667f07f88dfea5b +F src/vdbeapi.c adabbd66eb2e3a10f3998485ee0be7e326d06ee4 F src/vdbeaux.c 787f5f9d58f4c6f39294ed06909ba602d1a402e6 F src/vdbeblob.c 4f2e8e075d238392df98c5e03a64342465b03f90 F src/vdbemem.c ae38a0d35ae71cf604381a887c170466ba518090 @@ -1307,7 +1307,7 @@ F test/without_rowid4.test 4e08bcbaee0399f35d58b5581881e7a6243d458a F test/without_rowid5.test 61256715b686359df48ca1742db50cc7e3e7b862 F test/without_rowid6.test db0dbf03c49030aa3c1ba5f618620334bd2baf5f F test/wordcount.c 9915e06cb33d8ca8109b8700791afe80d305afda -F test/zeroblob.test de0bf437a28a0b46f25bf735a0b83f74d46256ed +F test/zeroblob.test c54bc7a95df5fb2d463e00822e1377384954c161 F test/zerodamage.test cf6748bad89553cc1632be51a6f54e487e4039ac F tool/build-all-msvc.bat 9058bd90a3c078a3d8c17d40e853aaa0f47885f4 x F tool/build-shell.sh 950f47c6174f1eea171319438b93ba67ff5bf367 @@ -1365,7 +1365,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P f8991e6f726485301c80d2dbb05e7d5c0d283b5d -R 5b7cdbc8a797f7286663b9eb72acbd15 -U drh -Z 4fdeea847ec9dd14145b4857e3d98a62 +P cfeb1b1c294c58222549d06819e9df2e300388fd +R be55ecd95e11079a1d74a40086198667 +U dan +Z 9412dcdb73ce7aff94945d2816a795b2 diff --git a/manifest.uuid b/manifest.uuid index a55fee3566..1811824ac8 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -cfeb1b1c294c58222549d06819e9df2e300388fd \ No newline at end of file +1997ee548b2e569a39e73319b661c1a78dfe5dae \ No newline at end of file diff --git a/src/loadext.c b/src/loadext.c index b519c4054f..1d398c54ce 100644 --- a/src/loadext.c +++ b/src/loadext.c @@ -406,7 +406,8 @@ static const sqlite3_api_routines sqlite3Apis = { /* Version 3.8.11 and later */ (sqlite3_value*(*)(const sqlite3_value*))sqlite3_value_dup, sqlite3_value_free, - sqlite3_result_zeroblob64 + sqlite3_result_zeroblob64, + sqlite3_bind_zeroblob64 }; /* diff --git a/src/sqlite.h.in b/src/sqlite.h.in index 909d568692..4489c37ea4 100644 --- a/src/sqlite.h.in +++ b/src/sqlite.h.in @@ -3562,6 +3562,7 @@ int sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64, void(*)(void*), unsigned char encoding); int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*); int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n); +int sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64); /* ** CAPI3REF: Number Of SQL Parameters diff --git a/src/sqlite3ext.h b/src/sqlite3ext.h index 10fb40a2a8..48a5bf744b 100644 --- a/src/sqlite3ext.h +++ b/src/sqlite3ext.h @@ -271,6 +271,7 @@ struct sqlite3_api_routines { sqlite3_value *(*value_dup)(const sqlite3_value*); void (*value_free)(sqlite3_value*); int (*result_zeroblob64)(sqlite3_context*,sqlite3_uint64); + int (*bind_zeroblob64)(sqlite3_stmt*, int, sqlite3_uint64); }; /* @@ -505,6 +506,7 @@ struct sqlite3_api_routines { #define sqlite3_value_dup sqlite3_api->value_dup #define sqlite3_value_free sqlite3_api->value_free #define sqlite3_result_zeroblob64 sqlite3_api->result_zeroblob64 +#define sqlite3_bind_zeroblob64 sqlite3_api->bind_zeroblob64 #endif /* SQLITE_CORE */ #ifndef SQLITE_CORE diff --git a/src/test1.c b/src/test1.c index 15fd8c7f7d..ceccf10db8 100644 --- a/src/test1.c +++ b/src/test1.c @@ -3008,6 +3008,43 @@ static int test_bind_zeroblob( return TCL_OK; } +/* +** Usage: sqlite3_bind_zeroblob64 STMT IDX N +** +** Test the sqlite3_bind_zeroblob64 interface. STMT is a prepared statement. +** IDX is the index of a wildcard in the prepared statement. This command +** binds a N-byte zero-filled BLOB to the wildcard. +*/ +static int test_bind_zeroblob64( + void * clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *CONST objv[] +){ + sqlite3_stmt *pStmt; + int idx; + i64 n; + int rc; + + if( objc!=4 ){ + Tcl_WrongNumArgs(interp, 1, objv, "STMT IDX N"); + return TCL_ERROR; + } + + if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; + if( Tcl_GetIntFromObj(interp, objv[2], &idx) ) return TCL_ERROR; + if( Tcl_GetWideIntFromObj(interp, objv[3], &n) ) return TCL_ERROR; + + rc = sqlite3_bind_zeroblob64(pStmt, idx, n); + if( sqlite3TestErrCode(interp, StmtToDb(pStmt), rc) ) return TCL_ERROR; + if( rc!=SQLITE_OK ){ + Tcl_AppendResult(interp, sqlite3ErrName(rc), 0); + return TCL_ERROR; + } + + return TCL_OK; +} + /* ** Usage: sqlite3_bind_int STMT N VALUE ** @@ -6796,6 +6833,7 @@ int Sqlitetest1_Init(Tcl_Interp *interp){ { "sqlite3_connection_pointer", get_sqlite_pointer, 0 }, { "sqlite3_bind_int", test_bind_int, 0 }, { "sqlite3_bind_zeroblob", test_bind_zeroblob, 0 }, + { "sqlite3_bind_zeroblob64", test_bind_zeroblob64, 0 }, { "sqlite3_bind_int64", test_bind_int64, 0 }, { "sqlite3_bind_double", test_bind_double, 0 }, { "sqlite3_bind_null", test_bind_null ,0 }, diff --git a/src/vdbeapi.c b/src/vdbeapi.c index 92d33486ba..ebd5ef29a2 100644 --- a/src/vdbeapi.c +++ b/src/vdbeapi.c @@ -1415,6 +1415,20 @@ int sqlite3_bind_zeroblob(sqlite3_stmt *pStmt, int i, int n){ } return rc; } +int sqlite3_bind_zeroblob64(sqlite3_stmt *pStmt, int i, sqlite3_uint64 n){ + int rc; + Vdbe *p = (Vdbe *)pStmt; + sqlite3_mutex_enter(p->db->mutex); + if( n>(u64)p->db->aLimit[SQLITE_LIMIT_LENGTH] ){ + rc = SQLITE_TOOBIG; + }else{ + assert( (n & 0x7FFFFFFF)==n ); + rc = sqlite3_bind_zeroblob(pStmt, i, n); + } + rc = sqlite3ApiExit(p->db, rc); + sqlite3_mutex_leave(p->db->mutex); + return rc; +} /* ** Return the number of wildcards that can be potentially bound to. diff --git a/test/zeroblob.test b/test/zeroblob.test index ff337ca48d..c45be2b09c 100644 --- a/test/zeroblob.test +++ b/test/zeroblob.test @@ -269,9 +269,9 @@ do_test zeroblob-10.1 { } {1 {string or blob too big}} #------------------------------------------------------------------------- -## Test the zeroblob() function on its own with negative or oversized -## arguments. -## +# Test the zeroblob() function on its own with negative or oversized +# arguments. +# do_execsql_test 11.0 { SELECT length(zeroblob(-1444444444444444)); } {0} @@ -288,5 +288,33 @@ do_catchsql_test 11.4 { SELECT quote(test_zeroblob(-1)); } {0 X''} +#------------------------------------------------------------------------- +# Test the sqlite3_bind_zeroblob64() API. +# +proc bind_and_run {stmt nZero} { + sqlite3_bind_zeroblob64 $stmt 1 $nZero + sqlite3_step $stmt + set ret [sqlite3_column_int $stmt 0] + sqlite3_reset $stmt + set ret +} +set stmt [sqlite3_prepare db "SELECT length(?)" -1 dummy] + +do_test 12.1 { bind_and_run $stmt 40 } 40 +do_test 12.2 { bind_and_run $stmt 0 } 0 +do_test 12.3 { bind_and_run $stmt 1000 } 1000 + +do_test 12.4 { + list [catch { bind_and_run $stmt [expr 1500 * 1024 * 1024] } msg] $msg +} {1 SQLITE_TOOBIG} +do_test 12.5 { + sqlite3_step $stmt + set ret [sqlite3_column_int $stmt 0] + sqlite3_reset $stmt + set ret +} {1000} + +sqlite3_finalize $stmt + test_restore_config_pagecache finish_test From d716c39c76af945fd321a922f23e0b4fc060076b Mon Sep 17 00:00:00 2001 From: dan Date: Fri, 24 Jul 2015 18:22:29 +0000 Subject: [PATCH 08/13] Fix a test script bug introduced by [562687d9]. FossilOrigin-Name: a343745d99cf4bccb2f5582735cc2f88b03e847d --- manifest | 12 ++++++------ manifest.uuid | 2 +- test/tester.tcl | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/manifest b/manifest index 85871908ec..a8a2be5eb9 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Add\sthe\ssqlite3_bind_zeroblob64()\sAPI. -D 2015-07-24T17:36:34.275 +C Fix\sa\stest\sscript\sbug\sintroduced\sby\s[562687d9]. +D 2015-07-24T18:22:29.438 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 4de3ef40c8b3b75c0c55ff4242a43c8ce1ad90ee F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -1028,7 +1028,7 @@ F test/tclsqlite.test 7fb866443c7deceed22b63948ccd6f76b52ad054 F test/tempdb.test 19d0f66e2e3eeffd68661a11c83ba5e6ace9128c F test/temptable.test d2c9b87a54147161bcd1822e30c1d1cd891e5b30 F test/temptrigger.test 8ec228b0db5d7ebc4ee9b458fc28cb9e7873f5e1 -F test/tester.tcl 6d0df5c4e39b76390d967c37c1855cb1d0c454c2 +F test/tester.tcl 83cc29c89259490b25d2d7e47535d6f2ed5a57c7 F test/thread001.test 9f22fd3525a307ff42a326b6bc7b0465be1745a5 F test/thread002.test e630504f8a06c00bf8bbe68528774dd96aeb2e58 F test/thread003.test ee4c9efc3b86a6a2767516a37bd64251272560a7 @@ -1365,7 +1365,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P cfeb1b1c294c58222549d06819e9df2e300388fd -R be55ecd95e11079a1d74a40086198667 +P 1997ee548b2e569a39e73319b661c1a78dfe5dae +R f8b9545e94c6fbffbe67ad49b98674a7 U dan -Z 9412dcdb73ce7aff94945d2816a795b2 +Z 7d7fc23acf815710c2dab9adf78529b1 diff --git a/manifest.uuid b/manifest.uuid index 1811824ac8..281e88295c 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -1997ee548b2e569a39e73319b661c1a78dfe5dae \ No newline at end of file +a343745d99cf4bccb2f5582735cc2f88b03e847d \ No newline at end of file diff --git a/test/tester.tcl b/test/tester.tcl index d83802346e..d7effc6038 100644 --- a/test/tester.tcl +++ b/test/tester.tcl @@ -2058,7 +2058,7 @@ proc test_set_config_pagecache {sz nPg} { set ::old_pagecache_config [sqlite3_config_pagecache $sz $nPg] sqlite3_initialize autoinstall_test_functions - sqlite3 db test.db + reset_db } # Close any connections named [db], [db2] or [db3]. Then use sqlite3_config From 5555741bdc5b7cc471199d562aa7c051489e8cea Mon Sep 17 00:00:00 2001 From: dan Date: Fri, 24 Jul 2015 18:58:59 +0000 Subject: [PATCH 09/13] Allow the RBU module to read data from appropriately named SQL views created within the RBU database. FossilOrigin-Name: 45c6a760ca63d19a7ccc352c7e35d8391025b515 --- ext/rbu/rbu14.test | 95 ++++++++++++++++++++++++++++++++++++++++++++ ext/rbu/sqlite3rbu.c | 2 +- manifest | 13 +++--- manifest.uuid | 2 +- 4 files changed, 104 insertions(+), 8 deletions(-) create mode 100644 ext/rbu/rbu14.test diff --git a/ext/rbu/rbu14.test b/ext/rbu/rbu14.test new file mode 100644 index 0000000000..d4f97ac32c --- /dev/null +++ b/ext/rbu/rbu14.test @@ -0,0 +1,95 @@ +# 2015 July 25 +# +# 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. +# +#*********************************************************************** +# +# Test that an RBU data_xxx table may be a view instead of a regular +# table. +# + +if {![info exists testdir]} { + set testdir [file join [file dirname [info script]] .. .. test] +} +source $testdir/tester.tcl +source $testdir/lock_common.tcl +set ::testprefix rbu14 + + +foreach {tn schema} { + 1 { + CREATE TABLE t1(a PRIMARY KEY, b, c); + CREATE TABLE t2(a PRIMARY KEY, b, c); + } + 2 { + CREATE TABLE t1(a PRIMARY KEY, b, c); + CREATE TABLE t2(a PRIMARY KEY, b, c); + CREATE INDEX i1 ON t1(b, c); + CREATE INDEX i2 ON t2(b, c); + } + 3 { + CREATE TABLE t1(a PRIMARY KEY, b, c) WITHOUT ROWID; + CREATE TABLE t2(a PRIMARY KEY, b, c) WITHOUT ROWID; + } + 4 { + CREATE TABLE t1(a PRIMARY KEY, b, c) WITHOUT ROWID; + CREATE TABLE t2(a PRIMARY KEY, b, c) WITHOUT ROWID; + CREATE INDEX i1 ON t1(b, c); + CREATE INDEX i2 ON t2(b, c); + } +} { + reset_db + + execsql $schema + execsql { + INSERT INTO t1 VALUES(50, 50, 50); + INSERT INTO t1 VALUES(51, 51, 51); + INSERT INTO t2 VALUES(50, 50, 50); + INSERT INTO t2 VALUES(51, 51, 51); + } + + forcedelete rbu.db + do_execsql_test $tn.1 { + ATTACH 'rbu.db' AS rbu; + CREATE TABLE rbu.stuff(tbl, a, b, c, rbu_control); + INSERT INTO stuff VALUES + ('t1', 1, 2, 3, 0), -- insert into t1 + ('t2', 4, 5, 6, 0), -- insert into t2 + ('t1', 50, NULL, NULL, 1), -- delete from t1 + ('t2', 51, NULL, NULL, 1); -- delete from t2 + + CREATE VIEW rbu.data_t1 AS + SELECT a, b, c, rbu_control FROM stuff WHERE tbl='t1'; + CREATE VIEW rbu.data_t2 AS + SELECT a, b, c, rbu_control FROM stuff WHERE tbl='t2'; + } + + do_test $tn.2 { + while 1 { + sqlite3rbu rbu test.db rbu.db + set rc [rbu step] + rbu close + if {$rc != "SQLITE_OK"} break + } + set rc + } {SQLITE_DONE} + + do_execsql_test $tn.3.1 { + SELECT * FROM t1 ORDER BY a; + } {1 2 3 51 51 51} + + do_execsql_test $tn.3.2 { + SELECT * FROM t2 ORDER BY a; + } {4 5 6 50 50 50} + + integrity_check $tn.4 +} + + +finish_test + diff --git a/ext/rbu/sqlite3rbu.c b/ext/rbu/sqlite3rbu.c index 11090d0821..93197e13de 100644 --- a/ext/rbu/sqlite3rbu.c +++ b/ext/rbu/sqlite3rbu.c @@ -568,7 +568,7 @@ static int rbuObjIterFirst(sqlite3rbu *p, RbuObjIter *pIter){ rc = prepareAndCollectError(p->dbRbu, &pIter->pTblIter, &p->zErrmsg, "SELECT substr(name, 6) FROM sqlite_master " - "WHERE type='table' AND name LIKE 'data_%'" + "WHERE type IN ('table', 'view') AND name LIKE 'data_%'" ); if( rc==SQLITE_OK ){ diff --git a/manifest b/manifest index a8a2be5eb9..94afeff7d3 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sa\stest\sscript\sbug\sintroduced\sby\s[562687d9]. -D 2015-07-24T18:22:29.438 +C Allow\sthe\sRBU\smodule\sto\sread\sdata\sfrom\sappropriately\snamed\sSQL\sviews\screated\swithin\sthe\sRBU\sdatabase. +D 2015-07-24T18:58:59.288 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 4de3ef40c8b3b75c0c55ff4242a43c8ce1ad90ee F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -206,6 +206,7 @@ F ext/rbu/rbu10.test 046b0980041d30700464a800bbf6733ed2df515d F ext/rbu/rbu11.test 9bc68c2d3dbeb1720153626e3bd0466dcc017702 F ext/rbu/rbu12.test bde22ed0004dd5d1888c72a84ae407e574aeae16 F ext/rbu/rbu13.test 462ff799c4afedc3ef8a47ff818c0ffbf14ae4f2 +F ext/rbu/rbu14.test 01f5dcba904aecadbaea69d4ccdc2ea43dd30560 F ext/rbu/rbu3.test 8bd4c6b87367c358981b6a47dc3d654fa60bff90 F ext/rbu/rbu5.test 2e24fee3e615aecd99bbdd46967935a641e866f7 F ext/rbu/rbu6.test 32e8ed60631b6facdb6366bd2b5f5f25245e7edb @@ -216,7 +217,7 @@ F ext/rbu/rbuA.test c1a7b3e2d926b8f8448bb3b4ae787e314ee4b2b3 F ext/rbu/rbucrash.test 8d2ed5d4b05fef6c00c2a6b5f7ead71fa172a695 F ext/rbu/rbufault.test cc0be8d5d392d98b0c2d6a51be377ea989250a89 F ext/rbu/rbufault2.test 9a7f19edd6ea35c4c9f807d8a3db0a03a5670c06 -F ext/rbu/sqlite3rbu.c d37e1ca2d13e439cb3df7cd9d98db90458f21433 +F ext/rbu/sqlite3rbu.c 7a0ca8fca2d0c9a72f0b7b96618c2ea9f7b4bc1d F ext/rbu/sqlite3rbu.h 6a280298e9eeb8ef59841a620f07f4f844651545 F ext/rbu/test_rbu.c f99698956cc9158d6bf865e461e2d15876538ac1 F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761 @@ -1365,7 +1366,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 1997ee548b2e569a39e73319b661c1a78dfe5dae -R f8b9545e94c6fbffbe67ad49b98674a7 +P a343745d99cf4bccb2f5582735cc2f88b03e847d +R 7ce8a63d79686096fb6b7851b4b14217 U dan -Z 7d7fc23acf815710c2dab9adf78529b1 +Z 6032c3754b57e07594e126d07ba72107 diff --git a/manifest.uuid b/manifest.uuid index 281e88295c..d26a45bf90 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -a343745d99cf4bccb2f5582735cc2f88b03e847d \ No newline at end of file +45c6a760ca63d19a7ccc352c7e35d8391025b515 \ No newline at end of file From e045d483f8ec91b17a37eb104fb3495f29259b86 Mon Sep 17 00:00:00 2001 From: drh Date: Fri, 24 Jul 2015 19:56:44 +0000 Subject: [PATCH 10/13] Fix the pragma2.test module so that it works with SQLITE_ENABLE_MEMORY_MANAGEMENT. FossilOrigin-Name: de281a4fac0de3700e754c17976a8497587ca797 --- manifest | 14 +++++++------- manifest.uuid | 2 +- test/pragma2.test | 4 +++- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/manifest b/manifest index 94afeff7d3..184f923ca7 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Allow\sthe\sRBU\smodule\sto\sread\sdata\sfrom\sappropriately\snamed\sSQL\sviews\screated\swithin\sthe\sRBU\sdatabase. -D 2015-07-24T18:58:59.288 +C Fix\sthe\spragma2.test\smodule\sso\sthat\sit\sworks\swith\nSQLITE_ENABLE_MEMORY_MANAGEMENT. +D 2015-07-24T19:56:44.063 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 4de3ef40c8b3b75c0c55ff4242a43c8ce1ad90ee F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -905,7 +905,7 @@ F test/pcache2.test af7f3deb1a819f77a6d0d81534e97d1cf62cd442 F test/percentile.test 4243af26b8f3f4555abe166f723715a1f74c77ff F test/permutations.test ac3b00c299250cc087d4a527b5c75a0f8aef4e54 F test/pragma.test be7195f0aa72bdb8a512133e9640ac40f15b57a2 -F test/pragma2.test f624a496a95ee878e81e59961eade66d5c00c028 +F test/pragma2.test 8e72df3a16c0fda748ad52abf79cb8256b04a6fe F test/pragma3.test 6f849ccffeee7e496d2f2b5e74152306c0b8757c F test/printf.test b3ff34e73d59124140eaf89f7672e21bc2ca5fcc F test/printf2.test 0b61566dd1c0f0b802f59dffa228c5dc5aa6b054 @@ -1366,7 +1366,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P a343745d99cf4bccb2f5582735cc2f88b03e847d -R 7ce8a63d79686096fb6b7851b4b14217 -U dan -Z 6032c3754b57e07594e126d07ba72107 +P 45c6a760ca63d19a7ccc352c7e35d8391025b515 +R b34dc4c50f1bfa3fd0a2eba7ed5d3d7e +U drh +Z 5930bfafd4fdba60474a9bcfe789d368 diff --git a/manifest.uuid b/manifest.uuid index d26a45bf90..997a555c0d 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -45c6a760ca63d19a7ccc352c7e35d8391025b515 \ No newline at end of file +de281a4fac0de3700e754c17976a8497587ca797 \ No newline at end of file diff --git a/test/pragma2.test b/test/pragma2.test index 3ade8c1a07..12d5cce5f7 100644 --- a/test/pragma2.test +++ b/test/pragma2.test @@ -30,6 +30,8 @@ ifcapable !pragma||!schema_pragmas { return } +test_set_config_pagecache 0 0 + # Delete the preexisting database to avoid the special setup # that the "all.test" script does. # @@ -208,5 +210,5 @@ do_execsql_test pragma2-4.8 { PRAGMA lock_status; } {main unlocked temp unknown aux1 exclusive} - +test_restore_config_pagecache finish_test From 08406bf0646af603040832dd9481fd603644245d Mon Sep 17 00:00:00 2001 From: dan Date: Fri, 24 Jul 2015 20:34:40 +0000 Subject: [PATCH 11/13] Fix warnings in fts5 code. FossilOrigin-Name: bd4f156d07d0db1f063d42891965920fc2229352 --- ext/fts5/fts5_expr.c | 4 ++-- ext/fts5/fts5_index.c | 8 ++++---- manifest | 16 ++++++++-------- manifest.uuid | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ext/fts5/fts5_expr.c b/ext/fts5/fts5_expr.c index 97ff3c72a0..861b20863a 100644 --- a/ext/fts5/fts5_expr.c +++ b/ext/fts5/fts5_expr.c @@ -60,7 +60,7 @@ struct Fts5ExprNode { /* Child nodes. For a NOT node, this array always contains 2 entries. For ** AND or OR nodes, it contains 2 or more entries. */ int nChild; /* Number of child nodes */ - Fts5ExprNode *apChild[0]; /* Array of child nodes */ + Fts5ExprNode *apChild[1]; /* Array of child nodes */ }; #define Fts5NodeIsString(p) ((p)->eType==FTS5_TERM || (p)->eType==FTS5_STRING) @@ -1619,7 +1619,7 @@ Fts5ExprNode *sqlite3Fts5ParseNode( if( pRight->eType==eType ) nChild += pRight->nChild-1; } - nByte = sizeof(Fts5ExprNode) + sizeof(Fts5ExprNode*)*nChild; + nByte = sizeof(Fts5ExprNode) + sizeof(Fts5ExprNode*)*(nChild-1); pRet = (Fts5ExprNode*)sqlite3Fts5MallocZero(&pParse->rc, nByte); if( pRet ){ diff --git a/ext/fts5/fts5_index.c b/ext/fts5/fts5_index.c index 4229573391..2d23607d3f 100644 --- a/ext/fts5/fts5_index.c +++ b/ext/fts5/fts5_index.c @@ -3754,13 +3754,13 @@ static void fts5IndexMergeLevel( fts5MultiIterEof(p, pIter)==0; fts5MultiIterNext(p, pIter, 0, 0) ){ - Fts5SegIter *pSeg = &pIter->aSeg[ pIter->aFirst[1].iFirst ]; + Fts5SegIter *pSegIter = &pIter->aSeg[ pIter->aFirst[1].iFirst ]; int nPos; /* position-list size field value */ int nTerm; const u8 *pTerm; /* Check for key annihilation. */ - if( pSeg->nPos==0 && (bOldest || pSeg->bDel==0) ) continue; + if( pSegIter->nPos==0 && (bOldest || pSegIter->bDel==0) ) continue; pTerm = fts5MultiIterTerm(pIter, &nTerm); if( nTerm!=term.n || memcmp(pTerm, term.p, nTerm) ){ @@ -3779,11 +3779,11 @@ static void fts5IndexMergeLevel( /* Append the rowid to the output */ /* WRITEPOSLISTSIZE */ - nPos = pSeg->nPos*2 + pSeg->bDel; + nPos = pSegIter->nPos*2 + pSegIter->bDel; fts5WriteAppendRowid(p, &writer, fts5MultiIterRowid(pIter), nPos); /* Append the position-list data to the output */ - fts5ChunkIterate(p, pSeg, (void*)&writer, fts5MergeChunkCallback); + fts5ChunkIterate(p, pSegIter, (void*)&writer, fts5MergeChunkCallback); } /* Flush the last leaf page to disk. Set the output segment b-tree height diff --git a/manifest b/manifest index 184f923ca7..4f1b2bc3ac 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sthe\spragma2.test\smodule\sso\sthat\sit\sworks\swith\nSQLITE_ENABLE_MEMORY_MANAGEMENT. -D 2015-07-24T19:56:44.063 +C Fix\swarnings\sin\sfts5\scode. +D 2015-07-24T20:34:40.671 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 4de3ef40c8b3b75c0c55ff4242a43c8ce1ad90ee F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -110,9 +110,9 @@ F ext/fts5/fts5Int.h 8d9bce1847a10df2e4ed9492ea4f3868276748fb F ext/fts5/fts5_aux.c 044cb176a815f4388308738437f6e130aa384fb0 F ext/fts5/fts5_buffer.c 80f9ba4431848cb857e3d2158f5280093dcd8015 F ext/fts5/fts5_config.c b2456e9625bca41c51d54c363e369c6356895c90 -F ext/fts5/fts5_expr.c ac0614f843cf5c80a85c4c6aa44bbede62a51bb2 +F ext/fts5/fts5_expr.c 56dcbcbdc9029dd76a31360de664559839f4be41 F ext/fts5/fts5_hash.c ff07722c73587c12781213133edbdb22cd156378 -F ext/fts5/fts5_index.c d6ad9293280f39c56343ef5035b0475ff2a6be12 +F ext/fts5/fts5_index.c 892c13a7f44b68e962a91af62f2078f23fabb241 F ext/fts5/fts5_main.c 0de7ba81488d2c502c8e794eaf7983d468e4c6e9 F ext/fts5/fts5_storage.c 1c35a38a564ee9cadcbd7ae0b13a806bdda722bd F ext/fts5/fts5_tcl.c 85eb4e0d0fefa9420b78151496ad4599a1783e20 @@ -1366,7 +1366,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 45c6a760ca63d19a7ccc352c7e35d8391025b515 -R b34dc4c50f1bfa3fd0a2eba7ed5d3d7e -U drh -Z 5930bfafd4fdba60474a9bcfe789d368 +P de281a4fac0de3700e754c17976a8497587ca797 +R 9f5835f29597640f91f1991255534eae +U dan +Z de21ee64183472b78df2aada61fca8f4 diff --git a/manifest.uuid b/manifest.uuid index 997a555c0d..dbeb733fd7 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -de281a4fac0de3700e754c17976a8497587ca797 \ No newline at end of file +bd4f156d07d0db1f063d42891965920fc2229352 \ No newline at end of file From 9895f735262def0167fed1bb418f86f35286e9f6 Mon Sep 17 00:00:00 2001 From: mistachkin Date: Fri, 24 Jul 2015 20:43:18 +0000 Subject: [PATCH 12/13] For Windows CE, a different header is required for the byteswap intrinsics. FossilOrigin-Name: 2d572b8cdc67679cc95e69677a87e7b4a82f6c2d --- manifest | 14 +++++++------- manifest.uuid | 2 +- src/sqliteInt.h | 12 ++++++++---- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/manifest b/manifest index 4f1b2bc3ac..70c4554713 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\swarnings\sin\sfts5\scode. -D 2015-07-24T20:34:40.671 +C For\sWindows\sCE,\sa\sdifferent\sheader\sis\srequired\sfor\sthe\sbyteswap\sintrinsics. +D 2015-07-24T20:43:18.969 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 4de3ef40c8b3b75c0c55ff4242a43c8ce1ad90ee F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -333,7 +333,7 @@ F src/shell.c 8af3cced094aebb5f57a8ad739b9dafc7867eed7 F src/sqlite.h.in f623dd30a4fb7df2fb44a2a85e27813d25e486c2 F src/sqlite3.rc 992c9f5fb8285ae285d6be28240a7e8d3a7f2bad F src/sqlite3ext.h a0b948ebc89bac13941254641326a6aa248c2cc4 -F src/sqliteInt.h c67d0a1368484dd156e7d13caa62862adc2ebefa +F src/sqliteInt.h 81f458941cfb30c5536c37930fb6f41e66171284 F src/sqliteLimit.h 216557999cb45f2e3578ed53ebefe228d779cb46 F src/status.c f266ad8a2892d659b74f0f50cb6a88b6e7c12179 F src/table.c 51b46b2a62d1b3a959633d593b89bab5e2c9155e @@ -1366,7 +1366,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P de281a4fac0de3700e754c17976a8497587ca797 -R 9f5835f29597640f91f1991255534eae -U dan -Z de21ee64183472b78df2aada61fca8f4 +P bd4f156d07d0db1f063d42891965920fc2229352 +R 2d59310b8a12a1f1c165b9fca130a928 +U mistachkin +Z 103ab03ee254c9c07747db619d6c6742 diff --git a/manifest.uuid b/manifest.uuid index dbeb733fd7..b0d985e912 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -bd4f156d07d0db1f063d42891965920fc2229352 \ No newline at end of file +2d572b8cdc67679cc95e69677a87e7b4a82f6c2d \ No newline at end of file diff --git a/src/sqliteInt.h b/src/sqliteInt.h index c520e8abc3..d26cd19eb7 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -189,10 +189,14 @@ ** Make sure that the compiler intrinsics we desire are enabled when ** compiling with an appropriate version of MSVC. */ -#if defined(_MSC_VER) && _MSC_VER>=1300 && !defined(_WIN32_WCE) -# include -# pragma intrinsic(_byteswap_ushort) -# pragma intrinsic(_byteswap_ulong) +#if defined(_MSC_VER) && _MSC_VER>=1300 +# if !defined(_WIN32_WCE) +# include +# pragma intrinsic(_byteswap_ushort) +# pragma intrinsic(_byteswap_ulong) +# else +# include +# endif #endif /* From 24fa5435ee5485f0779f14b58d6291174c9c3eb7 Mon Sep 17 00:00:00 2001 From: mistachkin Date: Fri, 24 Jul 2015 21:19:25 +0000 Subject: [PATCH 13/13] Enable the RBU extension to compile cleanly on Windows using MSVC. FossilOrigin-Name: cca79fdc3dff65907c2a59369057265b4512058f --- ext/rbu/rbu.c | 7 +++++-- ext/rbu/sqlite3rbu.c | 12 ++++++++---- manifest | 14 +++++++------- manifest.uuid | 2 +- 4 files changed, 21 insertions(+), 14 deletions(-) diff --git a/ext/rbu/rbu.c b/ext/rbu/rbu.c index 6e84bbdebe..dd46743def 100644 --- a/ext/rbu/rbu.c +++ b/ext/rbu/rbu.c @@ -65,6 +65,7 @@ int main(int argc, char **argv){ int i; const char *zTarget; /* Target database to apply RBU to */ const char *zRbu; /* Database containing RBU */ + char zBuf[200]; /* Buffer for printf() */ char *zErrmsg; /* Error message, if any */ sqlite3rbu *pRbu; /* RBU handle */ int nStep = 0; /* Maximum number of step() calls */ @@ -98,17 +99,19 @@ int main(int argc, char **argv){ /* Let the user know what happened. */ switch( rc ){ case SQLITE_OK: - fprintf(stdout, + sqlite3_snprintf(sizeof(zBuf), zBuf, "SQLITE_OK: rbu update incomplete (%lld operations so far)\n", nProgress ); + fprintf(stdout, zBuf); break; case SQLITE_DONE: - fprintf(stdout, + sqlite3_snprintf(sizeof(zBuf), zBuf, "SQLITE_DONE: rbu update completed (%lld operations)\n", nProgress ); + fprintf(stdout, zBuf); break; default: diff --git a/ext/rbu/sqlite3rbu.c b/ext/rbu/sqlite3rbu.c index 93197e13de..491313ad9a 100644 --- a/ext/rbu/sqlite3rbu.c +++ b/ext/rbu/sqlite3rbu.c @@ -83,7 +83,10 @@ #include #include #include -#include + +#if !defined(_WIN32) +# include +#endif #include "sqlite3.h" @@ -620,8 +623,9 @@ static char *rbuMPrintf(sqlite3rbu *p, const char *zFmt, ...){ */ static int rbuMPrintfExec(sqlite3rbu *p, sqlite3 *db, const char *zFmt, ...){ va_list ap; + char *zSql; va_start(ap, zFmt); - char *zSql = sqlite3_vmprintf(zFmt, ap); + zSql = sqlite3_vmprintf(zFmt, ap); if( p->rc==SQLITE_OK ){ if( zSql==0 ){ p->rc = SQLITE_NOMEM; @@ -2640,7 +2644,7 @@ static void rbuCreateVfs(sqlite3rbu *p){ assert( p->rc==SQLITE_OK ); sqlite3_randomness(sizeof(int), (void*)&rnd); - sprintf(zRnd, "rbu_vfs_%d", rnd); + sqlite3_snprintf(sizeof(zRnd), zRnd, "rbu_vfs_%d", rnd); p->rc = sqlite3rbu_create_vfs(zRnd, 0); if( p->rc==SQLITE_OK ){ sqlite3_vfs *pVfs = sqlite3_vfs_find(zRnd); @@ -3525,7 +3529,7 @@ static void (*rbuVfsDlSym( */ static void rbuVfsDlClose(sqlite3_vfs *pVfs, void *pHandle){ sqlite3_vfs *pRealVfs = ((rbu_vfs*)pVfs)->pRealVfs; - return pRealVfs->xDlClose(pRealVfs, pHandle); + pRealVfs->xDlClose(pRealVfs, pHandle); } #endif /* SQLITE_OMIT_LOAD_EXTENSION */ diff --git a/manifest b/manifest index 70c4554713..66be05909f 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C For\sWindows\sCE,\sa\sdifferent\sheader\sis\srequired\sfor\sthe\sbyteswap\sintrinsics. -D 2015-07-24T20:43:18.969 +C Enable\sthe\sRBU\sextension\sto\scompile\scleanly\son\sWindows\susing\sMSVC. +D 2015-07-24T21:19:25.937 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 4de3ef40c8b3b75c0c55ff4242a43c8ce1ad90ee F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -200,7 +200,7 @@ F ext/misc/totype.c 4a167594e791abeed95e0a8db028822b5e8fe512 F ext/misc/vfslog.c fe40fab5c077a40477f7e5eba994309ecac6cc95 F ext/misc/vtshim.c babb0dc2bf116029e3e7c9a618b8a1377045303e F ext/misc/wholenumber.c 784b12543d60702ebdd47da936e278aa03076212 -F ext/rbu/rbu.c e04e7baea76b6dd719a4f290f8a58166efc8d234 +F ext/rbu/rbu.c e572f7ddef2ef3a73d03e7b44d36448e466772b7 F ext/rbu/rbu1.test 57601977588603e82700a43c279bd55282ffa482 F ext/rbu/rbu10.test 046b0980041d30700464a800bbf6733ed2df515d F ext/rbu/rbu11.test 9bc68c2d3dbeb1720153626e3bd0466dcc017702 @@ -217,7 +217,7 @@ F ext/rbu/rbuA.test c1a7b3e2d926b8f8448bb3b4ae787e314ee4b2b3 F ext/rbu/rbucrash.test 8d2ed5d4b05fef6c00c2a6b5f7ead71fa172a695 F ext/rbu/rbufault.test cc0be8d5d392d98b0c2d6a51be377ea989250a89 F ext/rbu/rbufault2.test 9a7f19edd6ea35c4c9f807d8a3db0a03a5670c06 -F ext/rbu/sqlite3rbu.c 7a0ca8fca2d0c9a72f0b7b96618c2ea9f7b4bc1d +F ext/rbu/sqlite3rbu.c dbd7e4b31821398dcdeb21492970401ff1027881 F ext/rbu/sqlite3rbu.h 6a280298e9eeb8ef59841a620f07f4f844651545 F ext/rbu/test_rbu.c f99698956cc9158d6bf865e461e2d15876538ac1 F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761 @@ -1366,7 +1366,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P bd4f156d07d0db1f063d42891965920fc2229352 -R 2d59310b8a12a1f1c165b9fca130a928 +P 2d572b8cdc67679cc95e69677a87e7b4a82f6c2d +R 7ad7b2938e518b64d413cdd1d26d7b2c U mistachkin -Z 103ab03ee254c9c07747db619d6c6742 +Z 50750fa0b6e34b0305f7afdd413b595e diff --git a/manifest.uuid b/manifest.uuid index b0d985e912..d19a7ef222 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -2d572b8cdc67679cc95e69677a87e7b4a82f6c2d \ No newline at end of file +cca79fdc3dff65907c2a59369057265b4512058f \ No newline at end of file