-C Fix\stimezone\sparsing\sin\sthe\sdate/time\sfunctions.\s\sTicket\s#1587.\s(CVS\s2891)
-D 2006-01-09T00:18:03
+C Minor\schanges\sso\sthat\sOMIT_SHARED_CACHE\sworks.\s(CVS\s2892)
+D 2006-01-09T05:36:27
F Makefile.in c79fbdaa264c6afcd435f2fb492551de5a8cf80d
F Makefile.linux-gcc aee18d8a05546dcf1888bd4547e442008a49a092
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
F src/analyze.c fd2fe03b10dd5058747083362e56dec5bd9c4e5c
F src/attach.c 4a04ffcd17357a7848aa17c12c955d109f533bd0
F src/auth.c cdec356a5cd8b217c346f816c5912221537fe87f
-F src/btree.c 902d0d3f5c32b665a2184be5997ae0597bd47d56
+F src/btree.c 5c2d7f7482049006fd03b6661e6187fecaefa7cb
F src/btree.h 5663c4f43e8521546ccebc8fc95acb013b8f3184
-F src/build.c 0cf9f744911826ded1c8ee8adbf881ed5a2ef70a
+F src/build.c 8f0b1da79b7a5845fde0f831b065b42077ac124f
F src/callback.c 62066afd516f220575e81b1a1239ab92a2eae252
F src/complete.c df1681cef40dec33a286006981845f87b194e7a4
F src/date.c a927bdbb51296ac398d2f667086a7072c099e5ab
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
-P 32998fe8ed38a79eb79d8b13051b47bf74661e3c
-R 05890fde3a3c853b296df6bd6670d3bd
-U drh
-Z d4023a6da63972dce3bf97acfc91ffae
+P 94c87b70161d4d44fbf1602fc2baae22dca08759
+R a0a8036ba73e85a05dbaa2966904d0a4
+U danielk1977
+Z 10b9ce228823f887832ae0fa03cba38b
** May you share freely, never taking more than you give.
**
*************************************************************************
-** $Id: btree.c,v 1.285 2006/01/07 13:21:04 danielk1977 Exp $
+** $Id: btree.c,v 1.286 2006/01/09 05:36:27 danielk1977 Exp $
**
** This file implements a external (disk-based) database using BTrees.
** For a detailed discussion of BTrees, refer to
BtShared *pNext; /* Next in SqliteTsd.pBtree linked list */
int nRef; /* Number of references to this structure */
int nTransaction; /* Number of open transactions (read + write) */
+ void *pSchema; /* Pointer to space allocated by sqlite3BtreeSchema() */
+ void (*xFreeSchema)(void*); /* Destructor for BtShared.pSchema */
+#ifndef SQLITE_OMIT_SHARED_CACHE
BtLock *pLock; /* List of locks held on this shared-btree struct */
- void *pSchema;
- void (*xFreeSchema)(void*);
+#endif
};
/*
int rc;
BtShared *pBt = pCur->pBtree->pBt;
- restoreCursorPosition(pCur, 0);
- rc = getAndInitPage(pBt, pCur->pgnoRoot, &pRoot, 0);
- if( rc ){
+ if(
+ SQLITE_OK!=(rc = restoreCursorPosition(pCur, 0)) ||
+ SQLITE_OK!=(rc = getAndInitPage(pBt, pCur->pgnoRoot, &pRoot, 0))
+ ){
pCur->eState = CURSOR_INVALID;
return rc;
}
}
/* Save the positions of any other cursors open on this table */
- restoreCursorPosition(pCur, 0);
- rc = saveAllCursors(pBt, pCur->pgnoRoot, pCur);
- if( rc ){
+ if(
+ SQLITE_OK!=(rc = restoreCursorPosition(pCur, 0)) ||
+ SQLITE_OK!=(rc = saveAllCursors(pBt, pCur->pgnoRoot, pCur)) ||
+ SQLITE_OK!=(rc = sqlite3BtreeMoveto(pCur, pKey, nKey, &loc))
+ ){
return rc;
}
- rc = sqlite3BtreeMoveto(pCur, pKey, nKey, &loc);
- if( rc ) return rc;
pPage = pCur->pPage;
assert( pPage->intKey || nKey>=0 );
assert( pPage->leaf || !pPage->leafData );
}
int sqlite3BtreeLockTable(Btree *p, int iTab, u8 isWriteLock){
+ int rc = SQLITE_OK;
+#ifndef SQLITE_OMIT_SHARED_CACHE
u8 lockType = (isWriteLock?WRITE_LOCK:READ_LOCK);
- int rc = queryTableLock(p, iTab, lockType);
+ rc = queryTableLock(p, iTab, lockType);
if( rc==SQLITE_OK ){
rc = lockTable(p, iTab, lockType);
}
+#endif
return rc;
}