1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-16 23:02:26 +03:00

Fixes to the file locking. 109 tests are now failing. (CVS 1548)

FossilOrigin-Name: dc0763455bbf54c1d8728e16033709caedd6e1c6
This commit is contained in:
drh
2004-06-09 17:37:22 +00:00
parent 89ac8c1a70
commit a6abd04193
13 changed files with 380 additions and 264 deletions

View File

@@ -934,7 +934,7 @@ static int vdbeCommit(sqlite *db){
** database) has a transaction active. There is no need for the
** master-journal.
*/
if( nTrans<=1 ){
if( nTrans<=100 ){ /**** FIX ME ****/
for(i=0; rc==SQLITE_OK && i<db->nDb; i++){
Btree *pBt = db->aDb[i].pBt;
if( pBt ){
@@ -964,12 +964,10 @@ static int vdbeCommit(sqlite *db){
/* Select a master journal file name */
do {
int random;
if( zMaster ){
sqliteFree(zMaster);
}
u32 random;
sqliteFree(zMaster);
sqlite3Randomness(sizeof(random), &random);
zMaster = sqlite3_mprintf("%s%d", zMainFile, random);
zMaster = sqlite3MPrintf("%s-mj%08X", zMainFile, random);
if( !zMaster ){
return SQLITE_NOMEM;
}