1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-27 20:41:58 +03:00

Hold the database mutex for the duration of sqlite3session_diff().

FossilOrigin-Name: 6f33050115562833c43da3c99dd37aeb0bf966b6
This commit is contained in:
dan
2015-04-17 11:31:08 +00:00
parent 92f283c0d4
commit 10dc553c13
3 changed files with 10 additions and 8 deletions

View File

@ -1455,6 +1455,7 @@ int sqlite3session_diff(
memset(&d, 0, sizeof(d));
sessionDiffHooks(pSession, &d);
sqlite3_mutex_enter(sqlite3_db_mutex(pSession->db));
if( pzErrMsg ) *pzErrMsg = 0;
if( rc==SQLITE_OK ){
char *zExpr = 0;
@ -1521,6 +1522,7 @@ int sqlite3session_diff(
diff_out:
sessionPreupdateHooks(pSession);
sqlite3_mutex_leave(sqlite3_db_mutex(pSession->db));
return rc;
}