From: adam Date: Fri, 10 Sep 2010 20:19:06 +0000 (+0000) Subject: replaced relative lock proxy paths with absolute X-Git-Tag: mountain-lion~48 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=890b69fb83fec39fb0173bef24ddc01b696210b6;p=thirdparty%2Fsqlite.git replaced relative lock proxy paths with absolute FossilOrigin-Name: 782c33512ab2b677b0734c591fcecddc5a655203 --- diff --git a/manifest b/manifest index ed9bc71607..242ab07db0 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ C replaced\srelative\slock\sproxy\spaths\swith\sabsolute -D 2010-09-10T00:59:29 +D 2010-09-10T20:19:07 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in c58f7d37ad0f9b28655ba4e28c6cb0f879569cd7 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -555,7 +555,7 @@ F test/pagesize.test 76aa9f23ecb0741a4ed9d2e16c5fa82671f28efb F test/pcache.test 4118a183908ecaed343a06fcef3ba82e87e0129d F test/pcache2.test 0d85f2ab6963aee28c671d4c71bec038c00a1d16 F test/permutations.test 17498d1219f922d5a6da893a94c4dc7766fb2426 -F test/pragma.test 66a412d365188cebac3e4e2075eaf8f5d6eb87a2 +F test/pragma.test 68abf5033386f89a873e066360e568de8f4c0b29 F test/pragma2.test 5364893491b9231dd170e3459bfc2e2342658b47 F test/printf.test 05970cde31b1a9f54bd75af60597be75a5c54fea F test/progress.test 5b075c3c790c7b2a61419bc199db87aaf48b8301 @@ -851,7 +851,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f -P b6e9a4d8f7d8b683b4098270e0be149df1ef295f -R b3a4bc0eed7f1409726f394aa90844d7 +P 6a88cd46aeef3c50c91d5aadc61dd0b0982f8a4f +R 3c96862866cafb29045b2c4ff2d61f84 U adam -Z 0aedbc146af318be7220b19097c0cae5 +Z 83868dd0097a338719a36f9cf13f13c4 diff --git a/manifest.uuid b/manifest.uuid index 2050174ff8..cb938a784b 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -6a88cd46aeef3c50c91d5aadc61dd0b0982f8a4f \ No newline at end of file +782c33512ab2b677b0734c591fcecddc5a655203 \ No newline at end of file diff --git a/test/pragma.test b/test/pragma.test index 062d41c184..c78f817420 100644 --- a/test/pragma.test +++ b/test/pragma.test @@ -1307,22 +1307,17 @@ ifcapable lock_proxy_pragmas&&prefer_proxy_locking { sqlite3 db test.db # set lock proxy name and then query it via pragma interface + set lpp [pwd]/proxyfile_1 do_test pragma-16.1 { - execsql { - PRAGMA lock_proxy_file="mylittleproxy"; - select * from sqlite_master; - } - execsql { - PRAGMA lock_proxy_file; - } - } {mylittleproxy} + execsql "PRAGMA lock_proxy_file='$lpp'" + execsql "select * from sqlite_master" + execsql "PRAGMA lock_proxy_file" + } $lpp # 2 database connections can share a lock proxy file do_test pragma-16.2 { sqlite3 db2 test.db - execsql { - PRAGMA lock_proxy_file="mylittleproxy"; - } db2 + execsql "PRAGMA lock_proxy_file='$lpp'" db2 } {} db2 close @@ -1333,34 +1328,32 @@ ifcapable lock_proxy_pragmas&&prefer_proxy_locking { PRAGMA lock_proxy_file=":auto:"; select * from sqlite_master; } db2 - execsql { - PRAGMA lock_proxy_file; - } db2 - } {mylittleproxy} + execsql "PRAGMA lock_proxy_file" db2 + } $lpp db2 close + set lpp2 [pwd]/proxyfile_2 + # 2nd database connection cannot override the lock proxy file do_test pragma-16.3 { sqlite3 db2 test.db - execsql { - PRAGMA lock_proxy_file="myotherproxy"; - } db2 + execsql "PRAGMA lock_proxy_file='$lpp2'" db2 catchsql { select * from sqlite_master; } db2 } {1 {database is locked}} + set lpp3 [pwd]/unused_proxyfile + # lock proxy file can be renamed if no other connections are active do_test pragma-16.4 { db2 close db close sqlite3 db2 test.db - execsql { - PRAGMA lock_proxy_file="myoriginalproxy"; - PRAGMA lock_proxy_file="myotherproxy"; - PRAGMA lock_proxy_file; - } db2 - } {myotherproxy} + execsql "PRAGMA lock_proxy_file='$lpp3'" db2 + execsql "PRAGMA lock_proxy_file='$lpp2'" db2 + execsql "PRAGMA lock_proxy_file" db2 + } $lpp2 db2 close set env(SQLITE_FORCE_PROXY_LOCKING) "1" @@ -1371,7 +1364,7 @@ ifcapable lock_proxy_pragmas&&prefer_proxy_locking { PRAGMA lock_proxy_file=":auto:"; PRAGMA lock_proxy_file; } db2 - } {myotherproxy} + } $lpp2 # auto-naming a new proxy should use a predictable & unique name do_test pragma-16.6 { @@ -1406,16 +1399,15 @@ ifcapable lock_proxy_pragmas&&prefer_proxy_locking { } {1 {database is locked}} db2 close + set lpp4 [pwd]/proxyfile_4 + # check that db is unlocked after first host connection closes do_test pragma-16.8.1 { - execsql { - PRAGMA lock_proxy_file="yetanotherproxy"; - select * from sqlite_master; - } - execsql { - PRAGMA lock_proxy_file; - } - } {yetanotherproxy} + execsql "PRAGMA lock_proxy_file='$lpp4'" + execsql "select * from sqlite_master" + execsql "PRAGMA lock_proxy_file" + } $lpp4 + do_test pragma-16.8.2 { execsql { create table if not exists mine(x); @@ -1436,12 +1428,13 @@ ifcapable lock_proxy_pragmas&&prefer_proxy_locking { } {1} # ensure creating directories for a lock proxy file works + set lpp5 [pwd]/proxytest/sub/dir/lock db close file delete -force proxytest do_test pragma-16.10.1 { sqlite3 db proxytest.db + execsql "PRAGMA lock_proxy_file='$lpp5'" set lockpath2 [execsql { - PRAGMA lock_proxy_file="./proxytest/sub/dir/lock"; PRAGMA lock_proxy_file; } db] string match "*proxytest/sub/dir/lock" $lockpath2 @@ -1476,12 +1469,13 @@ ifcapable lock_proxy_pragmas&&prefer_proxy_locking { } {1} # make sure we can deal with ugly file paths correctly + set lpp6 [pwd]/./././////./proxytest/../proxytest/sub/dir/lock db close file delete -force proxytest do_test pragma-16.10.4 { sqlite3 db proxytest.db + execsql "PRAGMA lock_proxy_file='$lpp6'" set lockpath2 [execsql { - PRAGMA lock_proxy_file="./././////./proxytest/../proxytest/sub/dir/lock"; create table if not exists aa(bb); PRAGMA lock_proxy_file; } db] @@ -1493,8 +1487,8 @@ ifcapable lock_proxy_pragmas&&prefer_proxy_locking { file delete -force proxytest do_test pragma-16.10.5 { sqlite3 db proxytest.db + execsql "PRAGMA lock_proxy_file='$lpp5'" execsql { - PRAGMA lock_proxy_file="./proxytest/sub/dir/lock"; create table if not exists bb(bb); } db close @@ -1514,8 +1508,8 @@ ifcapable lock_proxy_pragmas&&prefer_proxy_locking { db close do_test pragma-16.10.6 { sqlite3 db proxytest.db + execsql "PRAGMA lock_proxy_file='$lpp5'" catchsql { - PRAGMA lock_proxy_file="./proxytest/sub/dir/lock"; create table if not exists faily(y); PRAGMA lock_proxy_file; } db