What does this assert mean? (sqlite3_mutex_held)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

What does this assert mean? (sqlite3_mutex_held)

Deon Brewis
assert( sqlite3_mutex_held(pPage->pBt->mutex) );

Inside this stack:

#4          0x0000000103e89384 in releasePageNotNull at sqlite3.c:62589
#5          0x0000000103e87a94 in btreeReleaseAllCursorPages at sqlite3.c:61069
#6          0x0000000103e8ee00 in sqlite3BtreeCloseCursor at sqlite3.c:64809
#7          0x0000000103e8e874 in sqlite3VdbeFreeCursor at sqlite3.c:75079
#8          0x0000000103e8e4fc in closeCursorsInFrame at sqlite3.c:75105
#9          0x0000000103e8d2e0 in closeAllCursors at sqlite3.c:75155
#10       0x0000000103e8ca58 in sqlite3VdbeHalt at sqlite3.c:75642
#11       0x0000000103e482d8 in sqlite3VdbeReset at sqlite3.c:75890
#12       0x0000000103e48224 in sqlite3_reset at sqlite3.c:77871

Called from:
int errcode = sqlite3_reset(_stmt);

Specifically - under what circumstances would this fire? (Not blaming SQLITE here - trying to debug my code and understand the assert).

- Deon

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: What does this assert mean? (sqlite3_mutex_held)

Richard Hipp-3
On 4/4/18, Deon Brewis <[hidden email]> wrote:
> assert( sqlite3_mutex_held(pPage->pBt->mutex) );

This verifies that the current thread holds the pPage->pBt->mutex
mutex.  The assert() will fire an abort() if the mutex is not held.

--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users