| OLD | NEW |
| 1 /* | 1 /* |
| 2 ** 2007 August 27 | 2 ** 2007 August 27 |
| 3 ** | 3 ** |
| 4 ** The author disclaims copyright to this source code. In place of | 4 ** The author disclaims copyright to this source code. In place of |
| 5 ** a legal notice, here is a blessing: | 5 ** a legal notice, here is a blessing: |
| 6 ** | 6 ** |
| 7 ** May you do good and not evil. | 7 ** May you do good and not evil. |
| 8 ** May you find forgiveness for yourself and forgive others. | 8 ** May you find forgiveness for yourself and forgive others. |
| 9 ** May you share freely, never taking more than you give. | 9 ** May you share freely, never taking more than you give. |
| 10 ** | 10 ** |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 lockBtreeMutex(pLater); | 134 lockBtreeMutex(pLater); |
| 135 } | 135 } |
| 136 } | 136 } |
| 137 } | 137 } |
| 138 | 138 |
| 139 | 139 |
| 140 /* | 140 /* |
| 141 ** Exit the recursive mutex on a Btree. | 141 ** Exit the recursive mutex on a Btree. |
| 142 */ | 142 */ |
| 143 void sqlite3BtreeLeave(Btree *p){ | 143 void sqlite3BtreeLeave(Btree *p){ |
| 144 assert( sqlite3_mutex_held(p->db->mutex) ); |
| 144 if( p->sharable ){ | 145 if( p->sharable ){ |
| 145 assert( p->wantToLock>0 ); | 146 assert( p->wantToLock>0 ); |
| 146 p->wantToLock--; | 147 p->wantToLock--; |
| 147 if( p->wantToLock==0 ){ | 148 if( p->wantToLock==0 ){ |
| 148 unlockBtreeMutex(p); | 149 unlockBtreeMutex(p); |
| 149 } | 150 } |
| 150 } | 151 } |
| 151 } | 152 } |
| 152 | 153 |
| 153 #ifndef NDEBUG | 154 #ifndef NDEBUG |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 int i; | 292 int i; |
| 292 for(i=0; i<db->nDb; i++){ | 293 for(i=0; i<db->nDb; i++){ |
| 293 Btree *p = db->aDb[i].pBt; | 294 Btree *p = db->aDb[i].pBt; |
| 294 if( p ){ | 295 if( p ){ |
| 295 p->pBt->db = p->db; | 296 p->pBt->db = p->db; |
| 296 } | 297 } |
| 297 } | 298 } |
| 298 } | 299 } |
| 299 #endif /* if SQLITE_THREADSAFE */ | 300 #endif /* if SQLITE_THREADSAFE */ |
| 300 #endif /* ifndef SQLITE_OMIT_SHARED_CACHE */ | 301 #endif /* ifndef SQLITE_OMIT_SHARED_CACHE */ |
| OLD | NEW |