mirror of https://github.com/sqlite/sqlite
Run some malloc() tests with exclusive-access mode. (CVS 3717)
FossilOrigin-Name: 127454903764daff17390941a002f527ee2ffc87
This commit is contained in:
parent
ded6f4b2fe
commit
c5859718af
16
manifest
16
manifest
|
@ -1,5 +1,5 @@
|
|||
C Add\ssome\stests\sand\sfixes\ssurrounding\sexclusive-access\smode\sand\sthe\spager\schange-counter.\s(CVS\s3716)
|
||||
D 2007-03-26T10:27:19
|
||||
C Run\ssome\smalloc()\stests\swith\sexclusive-access\smode.\s(CVS\s3717)
|
||||
D 2007-03-26T12:26:27
|
||||
F Makefile.in 1fe3d0b46e40fd684e1e61f8e8056cefed16de9f
|
||||
F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
|
||||
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
||||
|
@ -86,7 +86,7 @@ F src/os_unix.c 4642f23ed0c1ae0f1440db1d2b4231348af69360
|
|||
F src/os_unix.h 5768d56d28240d3fe4537fac08cc85e4fb52279e
|
||||
F src/os_win.c 1d1d0989b0f235751504292c2f28e81044be0d70
|
||||
F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
|
||||
F src/pager.c 4c83ffbb02386d0fd90eef51c16097c74e5b785a
|
||||
F src/pager.c 75019bab2ddafdd443413c38f489c15d18b95ea2
|
||||
F src/pager.h 3c16500c25051536e43fb19e246e58fc7cb51d9f
|
||||
F src/parse.y bcfe366c1fd61cfc40e5344eb69a31997a821af0
|
||||
F src/pragma.c 9cb8b94e7d38ba35a86037bd517d07ba9870b4b2
|
||||
|
@ -252,7 +252,7 @@ F test/lock.test 6825aea0b5885578b1b63a3b178803842c4ee9f1
|
|||
F test/lock2.test d83ba79d3c4fffdb5b926c7d8ca7a36c34288a55
|
||||
F test/lock3.test 615111293cf32aa2ed16d01c6611737651c96fb9
|
||||
F test/main.test e7212ce1023957c7209778cc87fa932bd79ba89a
|
||||
F test/malloc.test 2f234703cd206fe441e21341dba2d554a7cf8e68
|
||||
F test/malloc.test 33020a87791e32302c0a30c2ce2816134a944a3b
|
||||
F test/malloc2.test 4ed7d719542c4570dec9c2ebe2bbdf3a9f3b0d05
|
||||
F test/malloc3.test fd4186bee73c2a2638f4e2a05a684c06836f725b
|
||||
F test/malloc4.test 59cd02f71b363302a04c4e77b97c0a1572eaa210
|
||||
|
@ -279,7 +279,7 @@ F test/pagesize.test 05c74ea49f790734ec1e9ab765d9bf1cce79b8f2
|
|||
F test/pragma.test 91739ef06ab9ecf91e90d25951858caba71d6fe7
|
||||
F test/printf.test cdd8e20dd901382a385afcbaa777b9377815c2ad
|
||||
F test/progress.test 8b22b4974b0a95272566385f8cb8c341c7130df8 x
|
||||
F test/quick.test 9c02be6cdc6ee2247a1b00486b162cfbd60a01ae
|
||||
F test/quick.test 8c0496cfb3ad91811eca779a5fcaccb8e32fcbda
|
||||
F test/quote.test 5891f2338980916cf7415484b4ce785294044adb
|
||||
F test/reindex.test 38b138abe36bf9a08c791ed44d9f76cd6b97b78b
|
||||
F test/rollback.test 673cd8c44c685ad54987fe7f0eeba84efa09685d
|
||||
|
@ -439,7 +439,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
|
|||
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
||||
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
|
||||
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
|
||||
P 394b174e59262a84c530ea73c367d8c389a681b5
|
||||
R b9cfbb38bcb177f91ab61bb6f0720497
|
||||
P 72cb2e1a73cd09d32900bb473377f66ff55058fb
|
||||
R 8b15b348ec37132c30876a8baf03451e
|
||||
U danielk1977
|
||||
Z bbf2e9e72a548a49626e962c15cb3299
|
||||
Z e3775c0c7c4664bdb34c4c33b61b1f75
|
||||
|
|
|
@ -1 +1 @@
|
|||
72cb2e1a73cd09d32900bb473377f66ff55058fb
|
||||
127454903764daff17390941a002f527ee2ffc87
|
11
src/pager.c
11
src/pager.c
|
@ -18,7 +18,7 @@
|
|||
** file simultaneously, or one process from reading the database while
|
||||
** another is writing.
|
||||
**
|
||||
** @(#) $Id: pager.c,v 1.296 2007/03/26 10:27:19 danielk1977 Exp $
|
||||
** @(#) $Id: pager.c,v 1.297 2007/03/26 12:26:27 danielk1977 Exp $
|
||||
*/
|
||||
#ifndef SQLITE_OMIT_DISKIO
|
||||
#include "sqliteInt.h"
|
||||
|
@ -874,6 +874,7 @@ static void pager_unlock(Pager *pPager){
|
|||
*/
|
||||
static void pagerUnlockAndRollback(Pager *p){
|
||||
if( p->errCode ) return;
|
||||
assert( p->state>=PAGER_RESERVED || p->journalOpen==0 );
|
||||
if( p->state>=PAGER_RESERVED ){
|
||||
sqlite3PagerRollback(p);
|
||||
}
|
||||
|
@ -2722,6 +2723,9 @@ static int pagerSharedLock(Pager *pPager){
|
|||
if( rc!=SQLITE_OK ){
|
||||
return pager_error(pPager, rc);
|
||||
}
|
||||
assert(pPager->state==PAGER_SHARED ||
|
||||
(pPager->exclusiveMode && pPager->state>PAGER_SHARED)
|
||||
);
|
||||
}
|
||||
|
||||
if( pPager->pAll ){
|
||||
|
@ -2747,7 +2751,10 @@ static int pagerSharedLock(Pager *pPager){
|
|||
}
|
||||
}
|
||||
}
|
||||
pPager->state = PAGER_SHARED;
|
||||
assert( pPager->exclusiveMode || pPager->state<=PAGER_SHARED );
|
||||
if( pPager->state==PAGER_UNLOCK ){
|
||||
pPager->state = PAGER_SHARED;
|
||||
}
|
||||
}
|
||||
|
||||
return rc;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# special feature is used to see what happens in the library if a malloc
|
||||
# were to really fail due to an out-of-memory situation.
|
||||
#
|
||||
# $Id: malloc.test,v 1.37 2007/03/17 10:26:59 danielk1977 Exp $
|
||||
# $Id: malloc.test,v 1.38 2007/03/26 12:26:27 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
|
@ -334,6 +334,7 @@ do_malloc_test 9 -sqlprep {
|
|||
do_malloc_test 10 -sqlprep {
|
||||
CREATE TABLE abc(a, b, c);
|
||||
} -tclbody {
|
||||
db close
|
||||
sqlite3 db2 test.db
|
||||
db2 eval {SELECT * FROM sqlite_master}
|
||||
db2 close
|
||||
|
@ -353,7 +354,7 @@ do_malloc_test 12 -tclbody {
|
|||
append sql16 "\00\00"
|
||||
set ::STMT [sqlite3_prepare16 $::DB $sql16 -1 DUMMY]
|
||||
sqlite3_finalize $::STMT
|
||||
}
|
||||
}
|
||||
|
||||
# Test malloc errors when replaying two hot journals from a 2-file
|
||||
# transaction.
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#***********************************************************************
|
||||
# This file runs all tests.
|
||||
#
|
||||
# $Id: quick.test,v 1.48 2007/03/17 10:26:59 danielk1977 Exp $
|
||||
# $Id: quick.test,v 1.49 2007/03/26 12:26:27 danielk1977 Exp $
|
||||
|
||||
proc lshift {lvar} {
|
||||
upvar $lvar l
|
||||
|
@ -44,6 +44,7 @@ set EXCLUDE {
|
|||
corrupt.test
|
||||
crash.test
|
||||
crash2.test
|
||||
exclusive3.test
|
||||
loadext.test
|
||||
malloc.test
|
||||
malloc2.test
|
||||
|
|
Loading…
Reference in New Issue