-C Fix\stwo\sproblems\sin\stest\sinstrumentation\sthat\sshow\sup\son\ssome\sfulltests.\s(CVS\s6151)
-D 2009-01-09T14:29:35
+C Increase\spager.c\scoverage\sa\sbit.\sFix\san\sassert\sfailure\sthat\scan\soccur\sfollowing\sa\s"PRAGMA\somit_readlock"\scommand\son\sa\sread-only\sdatabase.\s(CVS\s6152)
+D 2009-01-09T17:11:05
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 05461a9b5803d5ad10c79f989801e9fd2cc3e592
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F src/os_os2.c bed77dc26e3a95ce4a204936b9a1ca6fe612fcc5
F src/os_unix.c a1f05f59c24e61186c981f2a7fea13986db620f1
F src/os_win.c 496e3ceb499aedc63622a89ef76f7af2dd902709
-F src/pager.c 1c02b40777a8094ea73cb8098d5d7f2c0920bd6d
+F src/pager.c 97bfbacae6131b8d228628803606e98dd763b474
F src/pager.h 9870acb2d653848d90d765d7cbf163496d6c8111
F src/parse.y 4d0e33a702dc3ea7b69d8ae1914b3fbd32e46057
F src/pcache.c 16dc8da6e6ba6250f8dfd9ee46036db1cbceedc6
F test/misc4.test 91e8ed25c092c2bb4e0bb01864631e2930f8d7de
F test/misc5.test 6a5c1e3217a95b0db05ff9a0f1ecb5ce9043ffef
F test/misc6.test 953cc693924d88e6117aeba16f46f0bf5abede91
-F test/misc7.test edbbe77d48c7d70a60f8c33e2c7d182ca25f0181
+F test/misc7.test 065b4a32c44648f7dd79767a458916048744fb18
F test/misuse.test 30b3a458e5a70c31e74c291937b6c82204c59f33
F test/mutex1.test 1e5c196d5170bbe3a7d8370b1b905e8c86a9e07c
F test/mutex2.test bfeaeac2e73095b2ac32285d2756e3a65e681660
F test/safety.test b69e2b2dd5d52a3f78e216967086884bbc1a09c6
F test/savepoint.test 2ffa8b0526b5b4a857abc9cc57fe4d7d0474ded0
F test/savepoint2.test 18f6c75d5c133b93838019df8988b8cdf379d3de
-F test/savepoint3.test 0c6c6cf208a2865301d125bf962b8f8a12f58b70
+F test/savepoint3.test 5b76f93ffcb5c53bd6ec68e9d57d3b535936c45e
F test/savepoint4.test fd8850063e3c40565545f5c291e7f79a30591670
F test/savepoint5.test 0735db177e0ebbaedc39812c8d065075d563c4fd
F test/savepoint6.test e28f7d8ab8a389d4e5bd1dc08bf2c3312754cc67
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P ac84f106d572e881136adc3434d00d70564f57cb
-R e68b60e2bd431620406ab7481f1836d4
-U drh
-Z 9f3b3855ff861aed9d86e2ee69b440b9
+P c917961743e9ab60a096801c8910c6cd8367ee2f
+R 84887d8478ad2a6db00d201594f1baf7
+U danielk1977
+Z 53b1598924155611310d0a2e9e4862da
-c917961743e9ab60a096801c8910c6cd8367ee2f
\ No newline at end of file
+0f3f9011fa143f7b63c9bf79d3e411327d5c6f9d
\ No newline at end of file
** file simultaneously, or one process from reading the database while
** another is writing.
**
-** @(#) $Id: pager.c,v 1.543 2009/01/08 18:04:14 danielk1977 Exp $
+** @(#) $Id: pager.c,v 1.544 2009/01/09 17:11:05 danielk1977 Exp $
*/
#ifndef SQLITE_OMIT_DISKIO
#include "sqliteInt.h"
assert( pPager->state==PAGER_UNLOCK );
return pager_error(pPager, rc);
}
- assert( pPager->state>=SHARED_LOCK );
+ }else if( pPager->state==PAGER_UNLOCK ){
+ pPager->state = PAGER_SHARED;
}
+ assert( pPager->state>=SHARED_LOCK );
/* If a journal file exists, and there is no RESERVED lock on the
** database file, then it either needs to be played back or deleted.
pager_reset(pPager);
}
}
- assert( pPager->exclusiveMode || pPager->state<=PAGER_SHARED );
- if( pPager->state==PAGER_UNLOCK ){
- pPager->state = PAGER_SHARED;
- }
+ assert( pPager->exclusiveMode || pPager->state==PAGER_SHARED );
}
failed:
#***********************************************************************
# This file implements regression tests for SQLite library.
#
-# $Id: misc7.test,v 1.25 2008/10/30 15:03:16 drh Exp $
+# $Id: misc7.test,v 1.26 2009/01/09 17:11:05 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
DETACH aux;
}
} {}
+do_test misc7-7.3 {
+ db close
+ sqlite3 db test.db -readonly 1
+ execsql {
+ PRAGMA omit_readlock = 1;
+ ATTACH 'test2.db' AS aux;
+ SELECT name FROM aux.sqlite_master;
+ SELECT name FROM aux.sqlite_master;
+ }
+} {hello hello}
+do_test misc7-7.3 {
+ db close
+ sqlite3 db test.db
+ set ::DB [sqlite3_connection_pointer db]
+ list
+} {}
# Test the UTF-16 version of the "out of memory" message (used when
# malloc fails during sqlite3_open() ).
sqlite3_global_recover
} {SQLITE_OK}
+# Try to open a really long file name.
+#
+do_test misc7-21.1 {
+ set zFile [file join [pwd] "[string repeat abcde 104].db"]
+ set rc [catch {sqlite3 db2 $zFile} msg]
+ list $rc $msg
+} {1 {unable to open database file}}
+
db close
file delete -force test.db
#
#***********************************************************************
#
-# $Id: savepoint3.test,v 1.3 2009/01/07 08:12:16 danielk1977 Exp $
+# $Id: savepoint3.test,v 1.4 2009/01/09 17:11:05 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
}
}
+# The following test does a really big savepoint rollback. One involving
+# more than 4000 pages. The idea is to get a specific sqlite3BitvecSet()
+# operation in pagerPlaybackSavepoint() to fail.
+#do_malloc_test savepoint3-4 -sqlprep {
+# BEGIN;
+# CREATE TABLE t1(a, b);
+# CREATE INDEX i1 ON t1(a);
+# CREATE INDEX i2 ON t1(b);
+# INSERT INTO t1 VALUES(randstr(500,500), randstr(500,500)); -- 1
+# INSERT INTO t1 VALUES(randstr(500,500), randstr(500,500)); -- 2
+# INSERT INTO t1 SELECT randstr(500,500), randstr(500,500) FROM t1; -- 4
+# INSERT INTO t1 SELECT randstr(500,500), randstr(500,500) FROM t1; -- 8
+# INSERT INTO t1 SELECT randstr(500,500), randstr(500,500) FROM t1; -- 16
+# INSERT INTO t1 SELECT randstr(500,500), randstr(500,500) FROM t1; -- 32
+# INSERT INTO t1 SELECT randstr(500,500), randstr(500,500) FROM t1; -- 64
+# INSERT INTO t1 SELECT randstr(500,500), randstr(500,500) FROM t1; -- 128
+# INSERT INTO t1 SELECT randstr(500,500), randstr(500,500) FROM t1; -- 256
+# INSERT INTO t1 SELECT randstr(500,500), randstr(500,500) FROM t1; -- 512
+# INSERT INTO t1 SELECT randstr(500,500), randstr(500,500) FROM t1; -- 1024
+# INSERT INTO t1 SELECT randstr(500,500), randstr(500,500) FROM t1; -- 2048
+# COMMIT;
+# BEGIN;
+# SAVEPOINT abc;
+# UPDATE t1 SET a = randstr(500,500);
+#} -sqlbody {
+# ROLLBACK TO abc;
+#}
+
+
+# Cause a specific malloc in savepoint rollback code to fail.
+#
+do_malloc_test savepoint3-4 -start 7 -sqlprep {
+ PRAGMA auto_vacuum = incremental;
+ PRAGMA cache_size = 1000;
+
+ CREATE TABLE t1(a, b);
+ CREATE TABLE t2(a, b);
+ CREATE TABLE t3(a, b);
+ INSERT INTO t1 VALUES(1, randstr(500,500));
+ INSERT INTO t1 VALUES(2, randstr(500,500));
+ INSERT INTO t1 VALUES(3, randstr(500,500));
+ DELETE FROM t1;
+
+ BEGIN;
+ INSERT INTO t1 VALUES(1, randstr(500,500));
+ INSERT INTO t1 VALUES(2, randstr(500,500));
+ INSERT INTO t1 VALUES(3, randstr(500,500));
+ DROP TABLE t3; -- Page 5 of the database file is now free.
+ DROP TABLE t2; -- Page 4 of the database file is now free.
+
+ SAVEPOINT abc;
+ PRAGMA incremental_vacuum;
+} -sqlbody {
+ ROLLBACK TO abc;
+}
+
+
finish_test