-C In\ssqlite3PagerWrite(),\sdo\snot\sset\sthe\sPGHDR_NEED_SYNC\sflag\son\sa\spage\sif\san\sIO\serror\soccured\swhile\sattempting\sto\sjournal\sit.\s(CVS\s6887)
-D 2009-07-13T11:22:10
+C Change\san\sunreachable\scondition\sin\sbtree.c\sto\sa\sNEVER().\s(CVS\s6888)
+D 2009-07-13T13:18:07
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in df9359da7a726ccb67a45db905c5447d5c00c6ef
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F src/backup.c 6f1c2d9862c8a3feb7739dfcca02c1f5352e37f3
F src/bitvec.c 0ef0651714728055d43de7a4cdd95e703fac0119
F src/btmutex.c 9b899c0d8df3bd68f527b0afe03088321b696d3c
-F src/btree.c 39559c172e4f970d53fd2dbb7cf25641613eec47
+F src/btree.c b88edecbed1c1c46b1cfcd924ac7b759c1085af4
F src/btree.h e53a10fd31d16c60a86f03c9467a6f470aa3683b
F src/btreeInt.h a568bf057aa249eb06fd31358b4393a5ac88c118
F src/build.c 867028ee9f63f7bc8eb8d4a720bb98cf9b9a12b4
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746
-P 3151dab9c78106217ec80ebadc666dfd11b42029
-R bbef3bf03d7fab733bcd5fbb4e72b8d8
+P b9be365d85fddedbfa93eebf3ee62a140cbaa426
+R f4d839ed396486ac6b8a446143ddd531
U danielk1977
-Z e3d416373420438c306f7dfa40b1190f
+Z 4c8b9a4f20989cfa0c1c1e32007e46e0
** May you share freely, never taking more than you give.
**
*************************************************************************
-** $Id: btree.c,v 1.685 2009/07/13 11:22:10 danielk1977 Exp $
+** $Id: btree.c,v 1.686 2009/07/13 13:18:07 danielk1977 Exp $
**
** This file implements a external (disk-based) database using BTrees.
** See the header comment on "btreeInt.h" for additional information.
nSrc = nData;
nData = 0;
}else{
- if( nKey>0x7fffffff || pKey==0 ){
- return SQLITE_CORRUPT;
+ if( NEVER(nKey>0x7fffffff || pKey==0) ){
+ return SQLITE_CORRUPT_BKPT;
}
nPayload += (int)nKey;
pSrc = pKey;
unsigned char *newCell = 0;
assert( cursorHoldsMutex(pCur) );
- assert( pBt->inTransaction==TRANS_WRITE );
- assert( !pBt->readOnly );
- assert( pCur->wrFlag );
+ assert( pCur->wrFlag && pBt->inTransaction==TRANS_WRITE && !pBt->readOnly );
assert( hasSharedCacheTableLock(p, pCur->pgnoRoot, pCur->pKeyInfo!=0, 2) );
+ /* Assert that the caller has been consistent. If this cursor was opened
+ ** expecting an index b-tree, then the caller should be inserting blob
+ ** keys with no associated data. If the cursor was opened expecting an
+ ** intkey table, the caller should be inserting integer keys with a
+ ** blob of associated data. */
+ assert( (pKey==0)==(pCur->pKeyInfo==0) );
+
/* If this is an insert into a table b-tree, invalidate any incrblob
** cursors open on the row being replaced (assuming this is a replace
** operation - if it is not, the following is a no-op). */
}
if( pCur->eState==CURSOR_FAULT ){
+ assert( pCur->skip!=SQLITE_OK );
return pCur->skip;
}