mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-19 21:43:15 +03:00
Fix a couple of problems in test file test_journal.c that were causing segfaults when running all.test. (CVS 6063)
FossilOrigin-Name: 416c9efb49ba207a9a79d06d0b13854695a8876c
This commit is contained in:
14
manifest
14
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Continuing\simprovements\sto\sthe\smulti-index\sOR-clause\soptimizer.\s\sAdded\sa\nfew\ssimple\stest\scases.\s(CVS\s6062)
|
C Fix\sa\scouple\sof\sproblems\sin\stest\sfile\stest_journal.c\sthat\swere\scausing\ssegfaults\swhen\srunning\sall.test.\s(CVS\s6063)
|
||||||
D 2008-12-23T23:56:22
|
D 2008-12-24T09:30:22
|
||||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||||
F Makefile.in 77635d0909c2067cee03889a1e04ce910d8fb809
|
F Makefile.in 77635d0909c2067cee03889a1e04ce910d8fb809
|
||||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||||
@@ -179,7 +179,7 @@ F src/test_config.c 4f85387a52f3c7966c3ffab913e988a3830fe1af
|
|||||||
F src/test_devsym.c 9f4bc2551e267ce7aeda195f3897d0f30c5228f4
|
F src/test_devsym.c 9f4bc2551e267ce7aeda195f3897d0f30c5228f4
|
||||||
F src/test_func.c a55c4d5479ff2eb5c0a22d4d88e9528ab59c953b
|
F src/test_func.c a55c4d5479ff2eb5c0a22d4d88e9528ab59c953b
|
||||||
F src/test_hexio.c 2f1122aa3f012fa0142ee3c36ce5c902a70cd12f
|
F src/test_hexio.c 2f1122aa3f012fa0142ee3c36ce5c902a70cd12f
|
||||||
F src/test_journal.c aec37656038150fa60f0418d54b1c535b5b33430
|
F src/test_journal.c 3e1ff6dc251afadde009a791f863132cf861bda6
|
||||||
F src/test_loadext.c 97dc8800e46a46ed002c2968572656f37e9c0dd9
|
F src/test_loadext.c 97dc8800e46a46ed002c2968572656f37e9c0dd9
|
||||||
F src/test_malloc.c 5127337c9fb4c851a7f604c0170e0e5ca1fbfe33
|
F src/test_malloc.c 5127337c9fb4c851a7f604c0170e0e5ca1fbfe33
|
||||||
F src/test_md5.c 28209a4e2068711b5443c33104fe41f21d160071
|
F src/test_md5.c 28209a4e2068711b5443c33104fe41f21d160071
|
||||||
@@ -685,7 +685,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
|
|||||||
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
||||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||||
P 26ceebf38e7ae7bbda3284995b03f829a2d2493f
|
P 55d4f493e7df8515574a75caec9967d6c71b6012
|
||||||
R 7db5298c8cbec76d68072c3747b105ad
|
R cc29a042a248eb8ecfc4c3d8c12a4a30
|
||||||
U drh
|
U danielk1977
|
||||||
Z 555ee7a0ef7229cf7451a3a18c0b778e
|
Z f0704a3629730edd74463891e861aad2
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
55d4f493e7df8515574a75caec9967d6c71b6012
|
416c9efb49ba207a9a79d06d0b13854695a8876c
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
** b) the page was not a free-list leaf page when the transaction was
|
** b) the page was not a free-list leaf page when the transaction was
|
||||||
** first opened.
|
** first opened.
|
||||||
**
|
**
|
||||||
** $Id: test_journal.c,v 1.2 2008/12/22 10:58:46 danielk1977 Exp $
|
** $Id: test_journal.c,v 1.3 2008/12/24 09:30:22 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#if SQLITE_TEST /* This file is used for testing only */
|
#if SQLITE_TEST /* This file is used for testing only */
|
||||||
|
|
||||||
@@ -327,7 +327,9 @@ static int readJournalFile(jt_file *p, jt_file *pMain){
|
|||||||
if( rc==SQLITE_OK ){
|
if( rc==SQLITE_OK ){
|
||||||
pgno = decodeUint32(zBuf);
|
pgno = decodeUint32(zBuf);
|
||||||
iOff += (8 + pMain->nPagesize);
|
iOff += (8 + pMain->nPagesize);
|
||||||
sqlite3BitvecSet(pMain->pWritable, pgno);
|
if( pgno>0 && pgno<=pMain->nPage ){
|
||||||
|
sqlite3BitvecSet(pMain->pWritable, pgno);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -446,8 +448,10 @@ static int jtOpen(
|
|||||||
int rc;
|
int rc;
|
||||||
jt_file *p = (jt_file *)pFile;
|
jt_file *p = (jt_file *)pFile;
|
||||||
p->pReal = (sqlite3_file *)&p[1];
|
p->pReal = (sqlite3_file *)&p[1];
|
||||||
|
p->pReal->pMethods = 0;
|
||||||
rc = sqlite3OsOpen(g.pVfs, zName, p->pReal, flags, pOutFlags);
|
rc = sqlite3OsOpen(g.pVfs, zName, p->pReal, flags, pOutFlags);
|
||||||
if( p->pReal->pMethods ){
|
assert( rc==SQLITE_OK || p->pReal->pMethods==0 );
|
||||||
|
if( rc==SQLITE_OK ){
|
||||||
pFile->pMethods = &jt_io_methods;
|
pFile->pMethods = &jt_io_methods;
|
||||||
p->eLock = 0;
|
p->eLock = 0;
|
||||||
p->zName = zName;
|
p->zName = zName;
|
||||||
|
|||||||
Reference in New Issue
Block a user