1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Avoid unnecessary calls to pager_unwritelock() when in exclusive-access mode.

Add the speed2.test script to the test suite. (CVS 3718)

FossilOrigin-Name: ab53f5086334ea2f6c20c8f9d043baff39fae8d7
This commit is contained in:
drh
2007-03-26 13:48:12 +00:00
parent c5859718af
commit e4dd73b4fa
6 changed files with 293 additions and 16 deletions

View File

@@ -18,7 +18,7 @@
** file simultaneously, or one process from reading the database while
** another is writing.
**
** @(#) $Id: pager.c,v 1.297 2007/03/26 12:26:27 danielk1977 Exp $
** @(#) $Id: pager.c,v 1.298 2007/03/26 13:48:13 drh Exp $
*/
#ifndef SQLITE_OMIT_DISKIO
#include "sqliteInt.h"
@@ -3014,7 +3014,7 @@ int sqlite3PagerUnref(DbPage *pPg){
*/
pPager->nRef--;
assert( pPager->nRef>=0 );
if( pPager->nRef==0 ){
if( pPager->nRef==0 && !pPager->exclusiveMode ){
pagerUnlockAndRollback(pPager);
}
}