OLD | NEW |
1 /* | 1 /* |
2 ** 2009 March 3 | 2 ** 2009 March 3 |
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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 db->pUnlockConnection = db->pBlockingConnection; | 177 db->pUnlockConnection = db->pBlockingConnection; |
178 db->xUnlockNotify = xNotify; | 178 db->xUnlockNotify = xNotify; |
179 db->pUnlockArg = pArg; | 179 db->pUnlockArg = pArg; |
180 removeFromBlockedList(db); | 180 removeFromBlockedList(db); |
181 addToBlockedList(db); | 181 addToBlockedList(db); |
182 } | 182 } |
183 } | 183 } |
184 | 184 |
185 leaveMutex(); | 185 leaveMutex(); |
186 assert( !db->mallocFailed ); | 186 assert( !db->mallocFailed ); |
187 sqlite3Error(db, rc, (rc?"database is deadlocked":0)); | 187 sqlite3ErrorWithMsg(db, rc, (rc?"database is deadlocked":0)); |
188 sqlite3_mutex_leave(db->mutex); | 188 sqlite3_mutex_leave(db->mutex); |
189 return rc; | 189 return rc; |
190 } | 190 } |
191 | 191 |
192 /* | 192 /* |
193 ** This function is called while stepping or preparing a statement | 193 ** This function is called while stepping or preparing a statement |
194 ** associated with connection db. The operation will return SQLITE_LOCKED | 194 ** associated with connection db. The operation will return SQLITE_LOCKED |
195 ** to the user because it requires a lock that will not be available | 195 ** to the user because it requires a lock that will not be available |
196 ** until connection pBlocker concludes its current transaction. | 196 ** until connection pBlocker concludes its current transaction. |
197 */ | 197 */ |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 ** being closed. The connection is removed from the blocked list. | 323 ** being closed. The connection is removed from the blocked list. |
324 */ | 324 */ |
325 void sqlite3ConnectionClosed(sqlite3 *db){ | 325 void sqlite3ConnectionClosed(sqlite3 *db){ |
326 sqlite3ConnectionUnlocked(db); | 326 sqlite3ConnectionUnlocked(db); |
327 enterMutex(); | 327 enterMutex(); |
328 removeFromBlockedList(db); | 328 removeFromBlockedList(db); |
329 checkListProperties(db); | 329 checkListProperties(db); |
330 leaveMutex(); | 330 leaveMutex(); |
331 } | 331 } |
332 #endif | 332 #endif |
OLD | NEW |