Annotation of pkgsrc/databases/sqlite/patches/patch-ab, revision 1.2
1.1 reinoud 1: $NetBSD$
2:
1.2 ! reinoud 3: --- ../sqlite/src/btree.c.orig Sat Nov 10 14:51:08 2001
1.1 reinoud 4: +++ ../sqlite/src/btree.c
5: @@ -60,7 +60,7 @@
6: ** The uptr type must be big enough to hold a pointer.
7: ** Change these typedefs when porting to new architectures.
8: */
9: -typedef unsigned int uptr;
10: +typedef unsigned long long int uptr;
11:
12: /* There are already defined in sqliteInt.h...
13: ** typedef unsigned int u32;
1.2 ! reinoud 14: @@ -829,7 +829,7 @@
1.1 reinoud 15: int sqliteBtreeCursor(Btree *pBt, int iTable, int wrFlag, BtCursor **ppCur){
16: int rc;
17: BtCursor *pCur;
18: - int nLock;
19: + long long int nLock;
20:
21: if( pBt->page1==0 ){
22: rc = lockBtree(pBt);
1.2 ! reinoud 23: @@ -852,7 +852,7 @@
1.1 reinoud 24: if( rc!=SQLITE_OK ){
25: goto create_cursor_exception;
26: }
27: - nLock = (int)sqliteHashFind(&pBt->locks, 0, iTable);
28: + nLock = (long long int)sqliteHashFind(&pBt->locks, 0, iTable);
29: if( nLock<0 || (nLock>0 && wrFlag) ){
30: rc = SQLITE_LOCKED;
31: goto create_cursor_exception;
1.2 ! reinoud 32: @@ -886,7 +886,7 @@
1.1 reinoud 33: ** when the last cursor is closed.
34: */
35: int sqliteBtreeCloseCursor(BtCursor *pCur){
36: - int nLock;
37: + long long int nLock;
38: Btree *pBt = pCur->pBt;
39: if( pCur->pPrev ){
40: pCur->pPrev->pNext = pCur->pNext;
1.2 ! reinoud 41: @@ -900,7 +900,7 @@
1.1 reinoud 42: sqlitepager_unref(pCur->pPage);
43: }
44: unlockBtreeIfUnused(pBt);
45: - nLock = (int)sqliteHashFind(&pBt->locks, 0, pCur->pgnoRoot);
46: + nLock = (long long int)sqliteHashFind(&pBt->locks, 0, pCur->pgnoRoot);
1.2 ! reinoud 47: assert( nLock!=0 || sqlite_malloc_failed );
1.1 reinoud 48: nLock = nLock<0 ? 0 : nLock-1;
49: sqliteHashInsert(&pBt->locks, 0, pCur->pgnoRoot, (void*)nLock);
1.2 ! reinoud 50: @@ -2293,11 +2293,11 @@
1.1 reinoud 51: */
52: int sqliteBtreeClearTable(Btree *pBt, int iTable){
53: int rc;
54: - int nLock;
55: + long long int nLock;
56: if( !pBt->inTrans ){
57: return SQLITE_ERROR; /* Must start a transaction first */
58: }
59: - nLock = (int)sqliteHashFind(&pBt->locks, 0, iTable);
60: + nLock = (long long int)sqliteHashFind(&pBt->locks, 0, iTable);
61: if( nLock ){
62: return SQLITE_LOCKED;
63: }
CVSweb <webmaster@jp.NetBSD.org>