-C Remove\sold\sdeclaration\sof\ssqlite3_pending_byte\s(which\swas\sused\sby\stest\scode).\sIt\shas\sbeen\sreplaced\sby\ssqlite3PendingByte.\sTicket\s#3677.\s(CVS\s6321)
-D 2009-02-24T18:40:50
+C Changes\sto\scomments\sand\sfunctions/procedure\snames\sfor\sclarification.\s\sNo\nchanges\sto\slogic.\s(CVS\s6322)
+D 2009-02-24T18:57:32
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in d64baddbf55cdf33ff030e14da837324711a4ef7
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F src/backup.c 2d3f31148d7b086c5c72d9edcd04fc2751b0aa6e
F src/bitvec.c 44f7059ac1f874d364b34af31b9617e52223ba75
F src/btmutex.c 63c5cc4ad5715690767ffcb741e185d7bc35ec1a
-F src/btree.c 8b8697ab5e8ca9aad12221bb9abfee1aed7a5cd1
+F src/btree.c 10c415effaf89b047a7c4178d10b5ee93a480106
F src/btree.h 96a019c9f28da38e79940512d7800e419cd8c702
F src/btreeInt.h 0a4884e6152d7cae9c741e91b830064c19fd2c05
F src/build.c a1db48aec62c95049d783f231195812ff97ae268
F src/utf.c 1da9c832dba0fa8f865b5b902d93f420a1ee4245
F src/util.c 1363f64351f3b544790f3c523439354c02f8c4e9
F src/vacuum.c 4929a585ef0fb1dfaf46302f8a9c4aa30c2d9cf5
-F src/vdbe.c 13194e2961ab92ec42016f05797f02a898d06729
+F src/vdbe.c e03512022ed2dd57bf2ea9ebe4f54cbc091adb0b
F src/vdbe.h d70a68bee196ab228914a3902c79dbd24342a0f2
F src/vdbeInt.h d12bc259b34d3d610ebf05d648eb6346d48478c3
F src/vdbeapi.c f94fe2eb6f48687e918f0df7eed1409cff9dcf58
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P 3f0baa1b63df31f7dc885fd39290ca12ad2be6df
-R 1a2f353bd0baf8e9e632784c84221af5
-U danielk1977
-Z 680899f7e8365c47fe6ad6bbcc963a0b
+P 44f0162ebb760dd6926ee5691752b6798e3aacb9
+R 94eaff1a860808fd91188cf96085c1fc
+U drh
+Z b49eeab63aacbd5e3c0381ee3e34c6a7
** May you share freely, never taking more than you give.
**
*************************************************************************
-** $Id: btree.c,v 1.568 2009/02/24 16:18:05 drh Exp $
+** $Id: btree.c,v 1.569 2009/02/24 18:57:32 drh Exp $
**
** This file implements a external (disk-based) database using BTrees.
** See the header comment on "btreeInt.h" for additional information.
#ifdef SQLITE_OMIT_SHARED_CACHE
/*
- ** The functions queryTableLock(), lockTable() and unlockAllTables()
+ ** The functions querySharedCacheTableLock(), setSharedCacheTableLock(),
+ ** and clearAllSharedCacheTableLocks()
** manipulate entries in the BtShared.pLock linked list used to store
** shared-cache table level locks. If the library is compiled with the
** shared-cache feature disabled, then there is only ever one user
** of each BtShared structure and so this locking is not necessary.
** So define the lock related functions as no-ops.
*/
- #define queryTableLock(a,b,c) SQLITE_OK
- #define lockTable(a,b,c) SQLITE_OK
- #define unlockAllTables(a)
+ #define querySharedCacheTableLock(a,b,c) SQLITE_OK
+ #define setSharedCacheTableLock(a,b,c) SQLITE_OK
+ #define clearAllSharedCacheTableLocks(a)
#endif
#ifndef SQLITE_OMIT_SHARED_CACHE
/*
** Query to see if btree handle p may obtain a lock of type eLock
** (READ_LOCK or WRITE_LOCK) on the table with root-page iTab. Return
-** SQLITE_OK if the lock may be obtained (by calling lockTable()), or
-** SQLITE_LOCKED if not.
+** SQLITE_OK if the lock may be obtained (by calling
+** setSharedCacheTableLock()), or SQLITE_LOCKED if not.
*/
-static int queryTableLock(Btree *p, Pgno iTab, u8 eLock){
+static int querySharedCacheTableLock(Btree *p, Pgno iTab, u8 eLock){
BtShared *pBt = p->pBt;
BtLock *pIter;
return SQLITE_LOCKED;
}
- /* This (along with lockTable()) is where the ReadUncommitted flag is
- ** dealt with. If the caller is querying for a read-lock on any table
+ /* This (along with setSharedCacheTableLock()) is where
+ ** the ReadUncommitted flag is dealt with.
+ ** If the caller is querying for a read-lock on any table
** other than the sqlite_master table (table 1) and if the ReadUncommitted
** flag is set, then the lock granted even if there are write-locks
** on the table. If a write-lock is requested, the ReadUncommitted flag
** is not considered.
**
- ** In function lockTable(), if a read-lock is demanded and the
+ ** In function setSharedCacheTableLock(), if a read-lock is demanded and the
** ReadUncommitted flag is set, no entry is added to the locks list
** (BtShared.pLock).
**
** SQLITE_OK is returned if the lock is added successfully. SQLITE_BUSY and
** SQLITE_NOMEM may also be returned.
*/
-static int lockTable(Btree *p, Pgno iTable, u8 eLock){
+static int setSharedCacheTableLock(Btree *p, Pgno iTable, u8 eLock){
BtShared *pBt = p->pBt;
BtLock *pLock = 0;
BtLock *pIter;
return SQLITE_OK;
}
- assert( SQLITE_OK==queryTableLock(p, iTable, eLock) );
+ assert( SQLITE_OK==querySharedCacheTableLock(p, iTable, eLock) );
/* If the read-uncommitted flag is set and a read-lock is requested on
** a non-schema table, then the lock is always granted. Return early
** without adding an entry to the BtShared.pLock list. See
- ** comment in function queryTableLock() for more info on handling
- ** the ReadUncommitted flag.
+ ** comment in function querySharedCacheTableLock() for more info
+ ** on handling the ReadUncommitted flag.
*/
if(
(p->db->flags&SQLITE_ReadUncommitted) &&
#ifndef SQLITE_OMIT_SHARED_CACHE
/*
-** Release all the table locks (locks obtained via calls to the lockTable()
-** procedure) held by Btree handle p.
+** Release all the table locks (locks obtained via calls to
+** the setSharedCacheTableLock() procedure) held by Btree handle p.
*/
-static void unlockAllTables(Btree *p){
+static void clearAllSharedCacheTableLocks(Btree *p){
BtShared *pBt = p->pBt;
BtLock **ppIter = &pBt->pLock;
pBt->inTransaction = TRANS_READ;
pBt->inStmt = 0;
}
- unlockAllTables(p);
+ clearAllSharedCacheTableLocks(p);
/* If the handle has any kind of transaction open, decrement the transaction
** count of the shared btree. If the transaction count reaches 0, set
}
#endif
btreeIntegrity(p);
- unlockAllTables(p);
+ clearAllSharedCacheTableLocks(p);
if( p->inTrans==TRANS_WRITE ){
int rc2;
/* Reading a meta-data value requires a read-lock on page 1 (and hence
** the sqlite_master table. We grab this lock regardless of whether or
** not the SQLITE_ReadUncommitted flag is set (the table rooted at page
- ** 1 is treated as a special case by queryTableLock() and lockTable()).
+ ** 1 is treated as a special case by querySharedCacheTableLock()
+ ** and setSharedCacheTableLock()).
*/
- rc = queryTableLock(p, 1, READ_LOCK);
+ rc = querySharedCacheTableLock(p, 1, READ_LOCK);
if( rc!=SQLITE_OK ){
sqlite3BtreeLeave(p);
return rc;
#endif
/* Grab the read-lock on page 1. */
- rc = lockTable(p, 1, READ_LOCK);
+ rc = setSharedCacheTableLock(p, 1, READ_LOCK);
sqlite3BtreeLeave(p);
return rc;
}
int rc;
assert( sqlite3_mutex_held(p->db->mutex) );
sqlite3BtreeEnter(p);
- rc = (queryTableLock(p, MASTER_ROOT, READ_LOCK)!=SQLITE_OK);
+ rc = (querySharedCacheTableLock(p, MASTER_ROOT, READ_LOCK)!=SQLITE_OK);
sqlite3BtreeLeave(p);
return rc;
}
assert( READ_LOCK+1==WRITE_LOCK );
assert( isWriteLock==0 || isWriteLock==1 );
sqlite3BtreeEnter(p);
- rc = queryTableLock(p, iTab, lockType);
+ rc = querySharedCacheTableLock(p, iTab, lockType);
if( rc==SQLITE_OK ){
- rc = lockTable(p, iTab, lockType);
+ rc = setSharedCacheTableLock(p, iTab, lockType);
}
sqlite3BtreeLeave(p);
}