From 5ad723f4124f774172c94f91aae770ec14122987 Mon Sep 17 00:00:00 2001 From: shaneh Date: Thu, 19 Aug 2010 18:05:46 +0000 Subject: [PATCH 1/4] Adjust filename globbing in backcompat.test for Windows. FossilOrigin-Name: b0f4796306a2cb11d6897d5c33f5da05c7473e07 --- manifest | 14 +++++++------- manifest.uuid | 2 +- test/backcompat.test | 7 ++++--- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/manifest b/manifest index a8862e88bd..f4176af25d 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sbackcompat.test\sso\sthat\sit\sworks\swith\swindows\smandatory\slocking. -D 2010-08-19T17:16:11 +C Adjust\sfilename\sglobbing\sin\sbackcompat.test\sfor\sWindows. +D 2010-08-19T18:05:46 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 543f91f24cd7fee774ecc0a61c19704c0c3e78fd F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -259,7 +259,7 @@ F test/autoindex1.test 7df441bf0e7a88644eb80993339dbf1db3a12c68 F test/autovacuum.test bb7c0885e6f8f1d633045de48f2b66082162766d F test/autovacuum_ioerr2.test 598b0663074d3673a9c1bc9a16e80971313bafe6 F test/avtrans.test 0252654f4295ddda3b2cce0e894812259e655a85 -F test/backcompat.test bf0f2468f9c9aba447a0625060b09d9663795074 +F test/backcompat.test 0627eeeabefdceae16fa2d5cf920d6cc926f4daa F test/backup.test 200e64bd91244b73ca8094bc1e03dfc83cc94c2e F test/backup2.test b7c69f937c912e85ac8a5dbd1e1cf290302b2d49 F test/backup_ioerr.test 1f012e692f42c0442ae652443258f70e9f20fa38 @@ -845,7 +845,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f -P 7999910e85b1f24c5860425ba47e7ab10c22e887 -R 2312b59b9cab0b977ed7b7f3e201421e -U dan -Z e72bc2907346bae2124df9a31e8a0e8b +P 8d05f66db7d6e8b8916fcf22fa92159d863d2610 +R d9f5b31d60c2c1063b071033be51256c +U shaneh +Z e8887c1df6874578f88d6a0c574bc962 diff --git a/manifest.uuid b/manifest.uuid index c1a1302211..056872012b 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -8d05f66db7d6e8b8916fcf22fa92159d863d2610 \ No newline at end of file +b0f4796306a2cb11d6897d5c33f5da05c7473e07 \ No newline at end of file diff --git a/test/backcompat.test b/test/backcompat.test index 1aa5179add..40f25cdbd5 100644 --- a/test/backcompat.test +++ b/test/backcompat.test @@ -35,6 +35,9 @@ db close # set binaries [list] set pattern "[file tail [info nameofexec]]*" +if {$tcl_platform(platform)=="windows"} { + set pattern [string map {\.exe {}} $pattern] +} foreach file [glob $pattern] { if {[file executable $file]} {lappend binaries $file} } @@ -92,6 +95,7 @@ proc do_allbackcompat_test {script} { foreach dir {0 1} { set bintag [string map {testfixture {}} $bin] + set bintag [string map {\.exe {}} $bintag] if {$bintag == ""} {set bintag self} set ::bcname ".$bintag.$dir." @@ -201,9 +205,6 @@ do_allbackcompat_test { } } {} set data [read_file_system] - set f "test.db-journal[incr x]" - file copy -force test.db-journal $f - do_test backcompat-1.2.4 { sql1 { COMMIT } } {} set same [expr {[sql2 {SELECT md5sum(a), md5sum(b) FROM t1}] == $cksum2}] From c8f503a8d33e5e100a4f53d26f31c7e4e8f78592 Mon Sep 17 00:00:00 2001 From: drh Date: Fri, 20 Aug 2010 09:14:13 +0000 Subject: [PATCH 2/4] Fix the sqlite3_release_memory() interface so that it does not attempt to free SQLITE_CONFIG_PAGECACHE memory. FossilOrigin-Name: 0426cd62d5ef2bd09570835c78f8fc3bcb7cdd49 --- manifest | 24 +++++++++++++++++------- manifest.uuid | 2 +- src/pcache1.c | 21 ++++++++++++++++++++- 3 files changed, 38 insertions(+), 9 deletions(-) diff --git a/manifest b/manifest index f4176af25d..0ecee5990d 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,8 @@ -C Adjust\sfilename\sglobbing\sin\sbackcompat.test\sfor\sWindows. -D 2010-08-19T18:05:46 +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +C Fix\sthe\ssqlite3_release_memory()\sinterface\sso\sthat\sit\sdoes\snot\sattempt\nto\sfree\sSQLITE_CONFIG_PAGECACHE\smemory. +D 2010-08-20T09:14:13 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 543f91f24cd7fee774ecc0a61c19704c0c3e78fd F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -161,7 +164,7 @@ F src/pager.h ef8c8f71ab022cc2fff768a1175dd32355be9dcd F src/parse.y 12b7ebd61ea54f0e1b1083ff69cc2c8ce9353d58 F src/pcache.c 1e9aa2dbc0845b52e1b51cc39753b6d1e041cb07 F src/pcache.h c683390d50f856d4cd8e24342ae62027d1bb6050 -F src/pcache1.c 638844c118163e3a10e1e3265703adf74870312d +F src/pcache1.c e921e8a1d52c93abde63cb6dad1fa39770410c52 F src/pragma.c 8b24ce00a93de345b6c3bd1e1e2cfba9f63d2325 F src/prepare.c ce4c35a2b1d5fe916e4a46b70d24a6e997d7c4c6 F src/printf.c 8ae5082dd38a1b5456030c3755ec3a392cd51506 @@ -845,7 +848,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f -P 8d05f66db7d6e8b8916fcf22fa92159d863d2610 -R d9f5b31d60c2c1063b071033be51256c -U shaneh -Z e8887c1df6874578f88d6a0c574bc962 +P b0f4796306a2cb11d6897d5c33f5da05c7473e07 +R 52b2c9daf815aabbcbe4f07fa5e7c8a1 +U drh +Z 54aa36efa36980359eb0729807e35e53 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.6 (GNU/Linux) + +iD8DBQFMbkdooxKgR168RlERArSaAJkBY/VKqEvxhWGtTQ3D8omuqoAsfwCgg/cl +y9J1gJoJvPaaszdEVe3Ak2I= +=hICH +-----END PGP SIGNATURE----- diff --git a/manifest.uuid b/manifest.uuid index 056872012b..e772d65077 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -b0f4796306a2cb11d6897d5c33f5da05c7473e07 \ No newline at end of file +0426cd62d5ef2bd09570835c78f8fc3bcb7cdd49 \ No newline at end of file diff --git a/src/pcache1.c b/src/pcache1.c index a9ee63e7cd..f9927b8944 100644 --- a/src/pcache1.c +++ b/src/pcache1.c @@ -200,6 +200,25 @@ static void pcache1Free(void *p){ } } +#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT +/* +** Return the size of a pache allocation +*/ +static int pcache1MemSize(void *p){ + assert( sqlite3_mutex_held(pcache1.mutex) ); + if( p>=pcache1.pStart && p Date: Fri, 20 Aug 2010 09:53:19 +0000 Subject: [PATCH 3/4] Disable the MEMSYS2 auxiliary routines if MEMSYS2 is changed to an alternative memory allocator using SQLITE_CONFIG_MALLOC. FossilOrigin-Name: 541dd3b870f123a5fddf0b710474693566a1d659 --- manifest | 18 +++++++++--------- manifest.uuid | 2 +- src/mem2.c | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/manifest b/manifest index 0ecee5990d..4cf92718b1 100644 --- a/manifest +++ b/manifest @@ -1,8 +1,8 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -C Fix\sthe\ssqlite3_release_memory()\sinterface\sso\sthat\sit\sdoes\snot\sattempt\nto\sfree\sSQLITE_CONFIG_PAGECACHE\smemory. -D 2010-08-20T09:14:13 +C Disable\sthe\sMEMSYS2\sauxiliary\sroutines\sif\sMEMSYS2\sis\schanged\sto\san\salternative\nmemory\sallocator\susing\sSQLITE_CONFIG_MALLOC. +D 2010-08-20T09:53:20 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 543f91f24cd7fee774ecc0a61c19704c0c3e78fd F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -142,7 +142,7 @@ F src/main.c 99622181f36d68e9f2a851c7b34263b3dcd03470 F src/malloc.c 19a468460c7df72de245f10c06bd0625777b7c83 F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645 F src/mem1.c 89d4ea8d5cdd55635cbaa48ad53132af6294cbb2 -F src/mem2.c 12c91260fd2320eda9355dea5445b137f848c05b +F src/mem2.c 9e5f72e38573db9598fe60d3fa530d473cc8714e F src/mem3.c 9b237d911ba9904142a804be727cc6664873f8a3 F src/mem5.c eb7a5cb98915dd7a086fa415ce3a5a0f20d0acff F src/memjournal.c 4a93a25ad9f76c40afa070ffd7187eb3a5fd7aee @@ -848,14 +848,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f -P b0f4796306a2cb11d6897d5c33f5da05c7473e07 -R 52b2c9daf815aabbcbe4f07fa5e7c8a1 +P 0426cd62d5ef2bd09570835c78f8fc3bcb7cdd49 +R bb794b07f256cd00b205b08f63c32658 U drh -Z 54aa36efa36980359eb0729807e35e53 +Z 9d8596e43956a79725c5c4debb4ff7e8 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) -iD8DBQFMbkdooxKgR168RlERArSaAJkBY/VKqEvxhWGtTQ3D8omuqoAsfwCgg/cl -y9J1gJoJvPaaszdEVe3Ak2I= -=hICH +iD8DBQFMblCToxKgR168RlERAtLaAJ4sNfpcsYXXZy9snzT5twUBl3oCzgCfQx37 +VI2puMgM19z9REsc6fsD1nY= +=DM/T -----END PGP SIGNATURE----- diff --git a/manifest.uuid b/manifest.uuid index e772d65077..d5927175ed 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -0426cd62d5ef2bd09570835c78f8fc3bcb7cdd49 \ No newline at end of file +541dd3b870f123a5fddf0b710474693566a1d659 \ No newline at end of file diff --git a/src/mem2.c b/src/mem2.c index 528a020f55..83f12fdb11 100644 --- a/src/mem2.c +++ b/src/mem2.c @@ -378,7 +378,7 @@ void sqlite3MemSetDefault(void){ ** Set the "type" of an allocation. */ void sqlite3MemdebugSetType(void *p, u8 eType){ - if( p ){ + if( p && sqlite3GlobalConfig.m.xMalloc==sqlite3MemMalloc ){ struct MemBlockHdr *pHdr; pHdr = sqlite3MemsysGetHeader(p); assert( pHdr->iForeGuard==FOREGUARD ); @@ -397,7 +397,7 @@ void sqlite3MemdebugSetType(void *p, u8 eType){ */ int sqlite3MemdebugHasType(void *p, u8 eType){ int rc = 1; - if( p ){ + if( p && sqlite3GlobalConfig.m.xMalloc==sqlite3MemMalloc ){ struct MemBlockHdr *pHdr; pHdr = sqlite3MemsysGetHeader(p); assert( pHdr->iForeGuard==FOREGUARD ); /* Allocation is valid */ @@ -419,7 +419,7 @@ int sqlite3MemdebugHasType(void *p, u8 eType){ */ int sqlite3MemdebugNoType(void *p, u8 eType){ int rc = 1; - if( p ){ + if( p && sqlite3GlobalConfig.m.xMalloc==sqlite3MemMalloc ){ struct MemBlockHdr *pHdr; pHdr = sqlite3MemsysGetHeader(p); assert( pHdr->iForeGuard==FOREGUARD ); /* Allocation is valid */ From a6c4196604ff86df004e8b7e37d5fc6273581c5a Mon Sep 17 00:00:00 2001 From: drh Date: Fri, 20 Aug 2010 10:28:28 +0000 Subject: [PATCH 4/4] Do not attempt run backwards compatibility tests if no historical "testfixture" binaries are available. FossilOrigin-Name: 40e11aabc7668e1c9db43d9183edb445996254bd --- manifest | 18 +++++++++--------- manifest.uuid | 2 +- test/backcompat.test | 13 ++++++++----- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/manifest b/manifest index 4cf92718b1..b9a4afa44a 100644 --- a/manifest +++ b/manifest @@ -1,8 +1,8 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -C Disable\sthe\sMEMSYS2\sauxiliary\sroutines\sif\sMEMSYS2\sis\schanged\sto\san\salternative\nmemory\sallocator\susing\sSQLITE_CONFIG_MALLOC. -D 2010-08-20T09:53:20 +C Do\snot\sattempt\srun\sbackwards\scompatibility\stests\sif\sno\shistorical\s\n"testfixture"\sbinaries\sare\savailable. +D 2010-08-20T10:28:28 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 543f91f24cd7fee774ecc0a61c19704c0c3e78fd F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -262,7 +262,7 @@ F test/autoindex1.test 7df441bf0e7a88644eb80993339dbf1db3a12c68 F test/autovacuum.test bb7c0885e6f8f1d633045de48f2b66082162766d F test/autovacuum_ioerr2.test 598b0663074d3673a9c1bc9a16e80971313bafe6 F test/avtrans.test 0252654f4295ddda3b2cce0e894812259e655a85 -F test/backcompat.test 0627eeeabefdceae16fa2d5cf920d6cc926f4daa +F test/backcompat.test 6df9e6d8c7be6d574e78fd352faa5f94fb744f7a F test/backup.test 200e64bd91244b73ca8094bc1e03dfc83cc94c2e F test/backup2.test b7c69f937c912e85ac8a5dbd1e1cf290302b2d49 F test/backup_ioerr.test 1f012e692f42c0442ae652443258f70e9f20fa38 @@ -848,14 +848,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f -P 0426cd62d5ef2bd09570835c78f8fc3bcb7cdd49 -R bb794b07f256cd00b205b08f63c32658 +P 541dd3b870f123a5fddf0b710474693566a1d659 +R 4eb7b3fde86b871098654da31a09bd98 U drh -Z 9d8596e43956a79725c5c4debb4ff7e8 +Z 03ad677ea220cb018d8c7d6c4e495440 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) -iD8DBQFMblCToxKgR168RlERAtLaAJ4sNfpcsYXXZy9snzT5twUBl3oCzgCfQx37 -VI2puMgM19z9REsc6fsD1nY= -=DM/T +iD8DBQFMbljQoxKgR168RlERArM1AJwN21jnJBboIAig9FX+ba3jM0fTkQCdGHgu +kFXqx+JxqN9vD3YYc0CxXdk= +=gv2j -----END PGP SIGNATURE----- diff --git a/manifest.uuid b/manifest.uuid index d5927175ed..ae2db540e3 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -541dd3b870f123a5fddf0b710474693566a1d659 \ No newline at end of file +40e11aabc7668e1c9db43d9183edb445996254bd \ No newline at end of file diff --git a/test/backcompat.test b/test/backcompat.test index 40f25cdbd5..bab83902f7 100644 --- a/test/backcompat.test +++ b/test/backcompat.test @@ -34,15 +34,16 @@ db close # against. # set binaries [list] -set pattern "[file tail [info nameofexec]]*" +set pattern "[file tail [info nameofexec]]?*" if {$tcl_platform(platform)=="windows"} { set pattern [string map {\.exe {}} $pattern] } -foreach file [glob $pattern] { - if {[file executable $file]} {lappend binaries $file} +foreach file [glob -nocomplain $pattern] { + if {[file executable $file] && } {lappend binaries $file} } if {[llength $binaries]==0} { - puts "WARNING: No binaries to test against. No tests have been run." + puts "WARNING: No historical binaries to test against." + puts "WARNING: No backwards-compatibility tests have been run." finish_test return } @@ -53,7 +54,9 @@ proc get_version {binary} { set v } foreach bin $binaries { - puts "Testing against $bin - version [get_version $bin]" + puts -nonewline "Testing against $bin - " + flush stdout + puts "version [get_version $bin]" } proc do_backcompat_test {rv bin1 bin2 script} {