aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifest18
-rw-r--r--manifest.uuid2
-rw-r--r--src/btree.c12
-rw-r--r--src/btree.h3
-rw-r--r--src/vdbemem.c13
5 files changed, 20 insertions, 28 deletions
diff --git a/manifest b/manifest
index b2ca6dc2d..6fe8eb336 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Additional\srefinements\sto\sExpr\shandling.\s\sRestore\scompression\sof\strigger\nexpressions.\s\sChange\sExpr.zToken\sto\sExpr.u.zToken\sand\sadded\sExpr.u.iValue.\nRemove\san\sunnecessary\sExprDup\sfrom\sCHECK\sconstraint\sprocessing.\s\sAnd\sso\sforth.\s(CVS\s6682)
-D 2009-05-28T01:00:55
+C Workaround\sthe\sneed\sfor\sinternal\sAPI\ssqlite3BtreeCursorDb().\sIt\swas\sonly\sbeing\sused\sfor\san\sassert()\sstatement,\swhich\scan\sbe\sdone\sdifferently.\s(CVS\s6683)
+D 2009-05-28T11:05:57
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 583e87706abc3026960ed759aff6371faf84c211
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -106,8 +106,8 @@ F src/auth.c 98db07c2088455797678eb1031f42d4d94d18a71
F src/backup.c 437efc2c3371b52bbb943b8c9dfabba774adcf86
F src/bitvec.c ef370407e03440b0852d05024fb016b14a471d3d
F src/btmutex.c 9b899c0d8df3bd68f527b0afe03088321b696d3c
-F src/btree.c 7c4b02afea7efb561361f20408414fec68df898c
-F src/btree.h 58d876d3ed944a8f4f1fd0e67024b385243fc9dd
+F src/btree.c 41bee6e4699e61f9d33beabfcf13caba4467c20a
+F src/btree.h 3748683b382bc3022f23840c0a35d3231b24fc6e
F src/btreeInt.h df64030d632f8c8ac217ed52e8b6b3eacacb33a5
F src/build.c 567574f5756e9e462cf50c5da1895dc43672bafe
F src/callback.c 57359fa93de47c341b6b8ee504a88ff276397686
@@ -209,7 +209,7 @@ F src/vdbeInt.h 43183a2a18654fa570219ab65e53a608057c48ae
F src/vdbeapi.c 86aa27a5f3493aaffb8ac051782aa3b22670d7ed
F src/vdbeaux.c 1a07329bdf51cc3687f88d9f5b2bd3f1d47cc5a8
F src/vdbeblob.c 5c5abe9af28316772e7829359f6f9cda2c737ebd
-F src/vdbemem.c 9f4224911176f27b80d6e8f70f0e909aead5091b
+F src/vdbemem.c 05183d46094aa99b8f8350e5761b9369dbef35a8
F src/vtab.c b0216337ae7d27708dedd56d220e6f4fecda92f1
F src/walker.c ec4b9742a4077ef80346e2f9aaf0f44c2d95087a
F src/where.c 1a21128db4905a29c287086acd7962cbba1c6f7b
@@ -731,7 +731,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P 7cb1c3ba0759539cb035978fdaff6316775986f3
-R fbcf886b0709cb6861bc0baa12580b58
-U drh
-Z 0ccb491a6522821e67071949c3a88c54
+P 4ac2bdfbb4230b6ceaae87e738fa61036bbe03cb
+R 1d2cfe85976ea7e6f0cff5f4581d1028
+U danielk1977
+Z 958dcf1176b8cee3abaf43be3cebcb59
diff --git a/manifest.uuid b/manifest.uuid
index c70ec0db5..37c1d0cee 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-4ac2bdfbb4230b6ceaae87e738fa61036bbe03cb \ No newline at end of file
+5904af6e6df3effdaaa30e7cf96ee316fc09b28d \ No newline at end of file
diff --git a/src/btree.c b/src/btree.c
index 338d99ecc..74c4f6163 100644
--- a/src/btree.c
+++ b/src/btree.c
@@ -9,7 +9,7 @@
** May you share freely, never taking more than you give.
**
*************************************************************************
-** $Id: btree.c,v 1.608 2009/05/06 18:57:10 shane Exp $
+** $Id: btree.c,v 1.609 2009/05/28 11:05:57 danielk1977 Exp $
**
** This file implements a external (disk-based) database using BTrees.
** See the header comment on "btreeInt.h" for additional information.
@@ -3692,6 +3692,7 @@ static const unsigned char *fetchPayload(
** in the common case where no overflow pages are used.
*/
const void *sqlite3BtreeKeyFetch(BtCursor *pCur, int *pAmt){
+ assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
assert( cursorHoldsMutex(pCur) );
if( pCur->eState==CURSOR_VALID ){
return (const void*)fetchPayload(pCur, pAmt, 0);
@@ -3699,6 +3700,7 @@ const void *sqlite3BtreeKeyFetch(BtCursor *pCur, int *pAmt){
return 0;
}
const void *sqlite3BtreeDataFetch(BtCursor *pCur, int *pAmt){
+ assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
assert( cursorHoldsMutex(pCur) );
if( pCur->eState==CURSOR_VALID ){
return (const void*)fetchPayload(pCur, pAmt, 1);
@@ -4194,14 +4196,6 @@ int sqlite3BtreeEof(BtCursor *pCur){
}
/*
-** Return the database connection handle for a cursor.
-*/
-sqlite3 *sqlite3BtreeCursorDb(const BtCursor *pCur){
- assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
- return pCur->pBtree->db;
-}
-
-/*
** Advance the cursor to the next entry in the database. If
** successful then set *pRes=0. If the cursor
** was already pointing to the last entry in the database before
diff --git a/src/btree.h b/src/btree.h
index b4b7e0d19..bb9cfad6d 100644
--- a/src/btree.h
+++ b/src/btree.h
@@ -13,7 +13,7 @@
** subsystem. See comments in the source code for a detailed description
** of what each interface routine does.
**
-** @(#) $Id: btree.h,v 1.114 2009/05/04 11:42:30 danielk1977 Exp $
+** @(#) $Id: btree.h,v 1.115 2009/05/28 11:05:57 danielk1977 Exp $
*/
#ifndef _BTREE_H_
#define _BTREE_H_
@@ -157,7 +157,6 @@ int sqlite3BtreeFlags(BtCursor*);
int sqlite3BtreePrevious(BtCursor*, int *pRes);
int sqlite3BtreeKeySize(BtCursor*, i64 *pSize);
int sqlite3BtreeKey(BtCursor*, u32 offset, u32 amt, void*);
-sqlite3 *sqlite3BtreeCursorDb(const BtCursor*);
const void *sqlite3BtreeKeyFetch(BtCursor*, int *pAmt);
const void *sqlite3BtreeDataFetch(BtCursor*, int *pAmt);
int sqlite3BtreeDataSize(BtCursor*, u32 *pSize);
diff --git a/src/vdbemem.c b/src/vdbemem.c
index f5120c86b..6d53c74ae 100644
--- a/src/vdbemem.c
+++ b/src/vdbemem.c
@@ -15,7 +15,7 @@
** only within the VDBE. Interface routines refer to a Mem using the
** name sqlite_value
**
-** $Id: vdbemem.c,v 1.146 2009/05/28 01:00:55 drh Exp $
+** $Id: vdbemem.c,v 1.147 2009/05/28 11:05:57 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "vdbeInt.h"
@@ -848,13 +848,12 @@ int sqlite3VdbeMemFromBtree(
int key, /* If true, retrieve from the btree key, not data. */
Mem *pMem /* OUT: Return data in this Mem structure. */
){
- char *zData; /* Data from the btree layer */
- int available = 0; /* Number of bytes available on the local btree page */
- sqlite3 *db; /* Database connection */
- int rc = SQLITE_OK;
+ char *zData; /* Data from the btree layer */
+ int available = 0; /* Number of bytes available on the local btree page */
+ int rc = SQLITE_OK; /* Return code */
- db = sqlite3BtreeCursorDb(pCur);
- assert( sqlite3_mutex_held(db->mutex) );
+ /* Note: the calls to BtreeKeyFetch() and DataFetch() below assert()
+ ** that both the BtShared and database handle mutexes are held. */
assert( (pMem->flags & MEM_RowSet)==0 );
if( key ){
zData = (char *)sqlite3BtreeKeyFetch(pCur, &available);