1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-12-21 13:38:01 +03:00

Additional information about the unixShm shown.

FossilOrigin-Name: 85846c7fbeeaf5fccfcbe11a4b87c4ee49781456ccb4da1d090b7823d7b456d6
This commit is contained in:
drh
2025-10-25 14:06:36 +00:00
parent dcc07d3ca6
commit ab29c24dc3
3 changed files with 13 additions and 9 deletions

View File

@@ -4564,9 +4564,13 @@ struct unixShm {
static void unixDescribeShm(sqlite3_str *pStr, unixShm *pShm){
unixShmNode *pNode = pShm->pShmNode;
char aLck[16];
sqlite3_str_appendf(pStr, "{\"sharedMask\":%d", pShm->sharedMask);
sqlite3_str_appendf(pStr, "{\"h\":%d", pNode->hShm);
unixEnterMutex();
sqlite3_str_appendf(pStr, ",\"nRef\":%d", pNode->nRef);
unixLeaveMutex();
sqlite3_str_appendf(pStr, ",\"id\":%d", pShm->id);
sqlite3_str_appendf(pStr, ",\"sharedMask\":%d", pShm->sharedMask);
sqlite3_str_appendf(pStr, ",\"exclMask\":%d", pShm->exclMask);
sqlite3_str_appendf(pStr, ",\"hShm\":%d", pNode->hShm);
if( unixPosixAdvisoryLocks(pNode->hShm, aLck)==SQLITE_OK ){
sqlite3_str_appendf(pStr, ",\"pal\":\"%s\"", aLck);
}