-C The\sfix\sin\s(6395)\swas\snot\scorrect.\sFix\s#3756\sa\sdifferent\sway.\s(CVS\s6397)
-D 2009-03-28T10:54:23
+C Back\sout\scheck-in\s(6380).\s\sReplace\sit\swith\sa\sproper\sfix\sto\sthe\nxFullPathname\smethod\sin\sthe\sasync\sVFS.\s(CVS\s6398)
+D 2009-03-28T15:04:24
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 583e87706abc3026960ed759aff6371faf84c211
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F src/test7.c b94e68c2236de76889d82b8d7d8e00ad6a4d80b1
F src/test8.c 3637439424d0d21ff2dcf9b015c30fcc1e7bcb24
F src/test9.c 904ebe0ed1472d6bad17a81e2ecbfc20017dc237
-F src/test_async.c 3e25752ff42bd14b45ff8de3e6cd69aa385323c4
+F src/test_async.c 9d75004dfee306f823cc26525cfef718c2e024d2
F src/test_autoext.c f53b0cdf7bf5f08100009572a5d65cdb540bd0ad
F src/test_backup.c 79ac8daa03f0b3d360ff1eb56b23c7df0c14ecd1
F src/test_btree.c d7b8716544611c323860370ee364e897c861f1b0
F test/alter4.test 9386ffd1e9c7245f43eca412b2058d747509cc1f
F test/altermalloc.test e81ac9657ed25c6c5bb09bebfa5a047cd8e4acfc
F test/analyze.test ad5329098fe4de4a96852231d53e3e9e6283ad4b
-F test/async.test ec30ff44dd42ec38853d6a380d0cc9461bde8f6e
+F test/async.test e7e6c5ef30c67531aad5c961e224bac91b88de16
F test/async2.test d3f23363553c2c02f15da98ae8bbc43420efd04c
F test/async3.test 9ffa0977a78cc6351862a1583be2b1eecd41736d
F test/attach.test 75a5d22f88e730967d68f2c9f95e786e3953d8e3
F test/limit.test 2db7b3b34fb925b8e847d583d2eb67531d0ce67e
F test/loadext.test 0393ce12d9616aa87597dd0ec88181de181f6db0
F test/loadext2.test 0bcaeb4d81cd5b6e883fdfea3c1bdbe1f173cbca
-F test/lock.test 18cbb77cd9261554d3f78a4e993951b9d8e88f73
+F test/lock.test edf5585398a33534db71a2a6108308d9e89c16d1
F test/lock2.test d4f941d1f659e5fc782b4912b1a872d77d4b5470
-F test/lock3.test cfe91ac74038cd9931164885b8d98fbc70ec43fc
+F test/lock3.test f271375930711ae044080f4fe6d6eda930870d00
F test/lock4.test 991b57669a868bbfd39fe0c0df0d493985829105
F test/lock5.test 6b1f78f09ad1522843dad571b76b321e6f439bf7
F test/lock6.test 862aa71e97b288d6b3f92ba3313f51bd0b003776
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P c9fa329f54736de517cddaf747595c9eca931f32
-R 45685c730f301fd232a550e830ed7088
-U danielk1977
-Z 0debd657750e70bfc6e8d14fa070690c
+P 9278f7b1e1f2d0d4c2f8829ca801a769e512c2a6
+R 121873619f687e25693398fc7592b8b5
+U drh
+Z 4d0af7748a59ba8b5aec187f6438633a
-9278f7b1e1f2d0d4c2f8829ca801a769e512c2a6
\ No newline at end of file
+767a7f7b55456df404a7f8966a0c48318ddac120
\ No newline at end of file
**
*************************************************************************
**
-** $Id: test_async.c,v 1.53 2009/03/27 09:10:12 danielk1977 Exp $
+** $Id: test_async.c,v 1.54 2009/03/28 15:04:24 drh Exp $
**
** This file contains an example implementation of an asynchronous IO
** backend for SQLite.
** file-system uses unix style paths.
*/
if( rc==SQLITE_OK ){
- int iIn;
- int iOut = 0;
- int nPathOut = strlen(zPathOut);
-
- for(iIn=0; iIn<nPathOut; iIn++){
-
- /* Replace any occurences of "//" with "/" */
- if( iIn<=(nPathOut-2) && zPathOut[iIn]=='/' && zPathOut[iIn+1]=='/'
- ){
- continue;
- }
-
- /* Replace any occurences of "/./" with "/" */
- if( iIn<=(nPathOut-3)
- && zPathOut[iIn]=='/' && zPathOut[iIn+1]=='.' && zPathOut[iIn+2]=='/'
- ){
- iIn++;
- continue;
- }
-
- /* Replace any occurences of "<path-component>/../" with "" */
- if( iOut>0 && iIn<=(nPathOut-4)
- && zPathOut[iIn]=='/' && zPathOut[iIn+1]=='.'
- && zPathOut[iIn+2]=='.' && zPathOut[iIn+3]=='/'
- ){
- iIn += 3;
- iOut--;
- for( ; iOut>0 && zPathOut[iOut-1]!='/'; iOut--);
- continue;
+ int i, j;
+ int n = nPathOut;
+ char *z = zPathOut;
+ while( n>1 && z[n-1]=='/' ){ n--; }
+ for(i=j=0; i<n; i++){
+ if( z[i]=='/' ){
+ if( z[i+1]=='/' ) continue;
+ if( z[i+1]=='.' && i+2<n && z[i+2]=='/' ){
+ i += 1;
+ continue;
+ }
+ if( z[i+1]=='.' && i+3<n && z[i+2]=='.' && z[i+3]=='/' ){
+ while( j>0 && z[j-1]!='/' ){ j--; }
+ if( j>0 ){ j--; }
+ i += 2;
+ continue;
+ }
}
-
- zPathOut[iOut++] = zPathOut[iIn];
+ z[j++] = z[i];
}
- zPathOut[iOut] = '\0';
+ z[j] = 0;
}
return rc;
#***********************************************************************
# This file runs all tests.
#
-# $Id: async.test,v 1.15 2009/03/24 16:55:44 drh Exp $
+# $Id: async.test,v 1.16 2009/03/28 15:04:24 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
foreach testfile [lsort -dictionary [glob $testdir/*.test]] {
set tail [file tail $testfile]
if {[lsearch -exact $INCLUDE $tail]<0} continue
- set ::ASYNC 1
source $testfile
- unset ::ASYNC
# Make sure everything is flushed through. This is because [source]ing
# the next test file will delete the database file on disk (using
# This file implements regression tests for SQLite library. The
# focus of this script is database locks.
#
-# $Id: lock.test,v 1.38 2009/03/24 16:55:44 drh Exp $
+# $Id: lock.test,v 1.39 2009/03/28 15:04:24 drh Exp $
set testdir [file dirname $argv0]
# Create an alternative connection to the database
#
do_test lock-1.0 {
- if {[info exists ::ASYNC]} {
- sqlite3 db2 test.db
- } else {
- # Give a complex pathnme to stress the path simplification logic in
- # the vxworks driver.
- file mkdir tempdir/t1/t2
- sqlite3 db2 ./tempdir/../tempdir/t1/.//t2/../../..//test.db
- }
+ # Give a complex pathname to stress the path simplification logic in
+ # the vxworks driver and in test_async.
+ file mkdir tempdir/t1/t2
+ sqlite3 db2 ./tempdir/../tempdir/t1/.//t2/../../..//test.db
set dummy {}
} {}
do_test lock-1.1 {
# DEFERRED, IMMEDIATE, and EXCLUSIVE keywords as modifiers to the
# BEGIN command.
#
-# $Id: lock3.test,v 1.3 2009/03/24 16:55:44 drh Exp $
+# $Id: lock3.test,v 1.4 2009/03/28 15:04:24 drh Exp $
set testdir [file dirname $argv0]
# sample data into the database.
#
do_test lock3-1.1 {
- if {![info exists ::ASYNC]} {
- file mkdir tempdir/t1/t2/t3
- sqlite3 db2 ./tempdir/t1//t2/./t3//./../..//./../../tempdir/..//test.db//
- } else {
- sqlite3 db2 test.db
- }
+ file mkdir tempdir/t1/t2/t3
+ sqlite3 db2 ./tempdir/t1//t2/./t3//./../..//./../../tempdir/..//test.db//
execsql {
CREATE TABLE t1(a);
INSERT INTO t1 VALUES(1);