Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | It is possible for sqlite3.pUnlockConnection to be non-NULL when sqlite3.pBlockingConnection is NULL, as the notify1.test script demonstrates. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | experimental |
Files: | files | file ages | folders |
SHA1: |
95ff76ef67d6189f54375973fa485d6e |
User & Date: | drh 2010-04-17 16:10:19.000 |
Original Comment: | It is possible for sqlite3.pUnlockConnection to be non-NULL when sqlite3.pBlockingConnection is NULL, as the notify1.test script demonstrates. |
Context
2010-04-23
| ||
14:29 | Merge of notify.c changes from experimental. Reset stored blocking connection when registered unlock_notify callback is cleared. (check-in: e79dac3c2f user: shaneh tags: trunk) | |
2010-04-17
| ||
16:10 | It is possible for sqlite3.pUnlockConnection to be non-NULL when sqlite3.pBlockingConnection is NULL, as the notify1.test script demonstrates. (Closed-Leaf check-in: 95ff76ef67 user: drh tags: experimental) | |
2010-04-16
| ||
22:05 | Changes for branch coverage of notify.c. Fixed quirk of unlock_notify() where it would still think it was blocked after a callback was cleared (even after the transaction on the blocking connection was closed). (check-in: c54e8dad01 user: shaneh tags: experimental) | |
Changes
Changes to src/notify.c.
︙ | ︙ | |||
193 194 195 196 197 198 199 | ** This function is called while stepping or preparing a statement ** associated with connection db. The operation will return SQLITE_LOCKED ** to the user because it requires a lock that will not be available ** until connection pBlocker concludes its current transaction. */ void sqlite3ConnectionBlocked(sqlite3 *db, sqlite3 *pBlocker){ enterMutex(); | | < < < < < | 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | ** This function is called while stepping or preparing a statement ** associated with connection db. The operation will return SQLITE_LOCKED ** to the user because it requires a lock that will not be available ** until connection pBlocker concludes its current transaction. */ void sqlite3ConnectionBlocked(sqlite3 *db, sqlite3 *pBlocker){ enterMutex(); if( db->pBlockingConnection==0 && db->pUnlockConnection==0 ){ addToBlockedList(db); } db->pBlockingConnection = pBlocker; leaveMutex(); } /* |
︙ | ︙ | |||
303 304 305 306 307 308 309 | xUnlockNotify = p->xUnlockNotify; p->pUnlockConnection = 0; p->xUnlockNotify = 0; p->pUnlockArg = 0; } /* Step 3. */ | | < < < < < < < < | 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 | xUnlockNotify = p->xUnlockNotify; p->pUnlockConnection = 0; p->xUnlockNotify = 0; p->pUnlockArg = 0; } /* Step 3. */ if( p->pBlockingConnection==0 && p->pUnlockConnection==0 ){ /* Remove connection p from the blocked connections list. */ *pp = p->pNextBlocked; p->pNextBlocked = 0; }else{ pp = &p->pNextBlocked; } } |
︙ | ︙ |