mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Remove the 'nMaster' argument from various pager and btree functions. (CVS 1737)
FossilOrigin-Name: 4e20720984e1fd6822ead785d758374d2704b7fb
This commit is contained in:
30
manifest
30
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Remove\sdefault_synchronous\sand\stemp_store\spragmas.\sAllow\sthe\ssafety-level\nand\scache-size\sto\sbe\sset\sfor\sattached\sdatabases.\s(CVS\s1736)
|
C Remove\sthe\s'nMaster'\sargument\sfrom\svarious\spager\sand\sbtree\sfunctions.\s(CVS\s1737)
|
||||||
D 2004-06-26T06:37:07
|
D 2004-06-26T08:38:25
|
||||||
F Makefile.in cb7a9889c38723f72b2506c4236ff30a05ff172b
|
F Makefile.in cb7a9889c38723f72b2506c4236ff30a05ff172b
|
||||||
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
|
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
|
||||||
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
|
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
|
||||||
@@ -26,9 +26,9 @@ F sqlite.pc.in 30552343140c53304c2a658c080fbe810cd09ca2
|
|||||||
F sqlite3.def 26f4e7b0a3fbaa55701e020fdec429f1594e2866
|
F sqlite3.def 26f4e7b0a3fbaa55701e020fdec429f1594e2866
|
||||||
F src/attach.c b105aeb8c82fbd097c5067dddde90d5f7fadf8dd
|
F src/attach.c b105aeb8c82fbd097c5067dddde90d5f7fadf8dd
|
||||||
F src/auth.c 60db23b98bb94c8b0178180faaf49dc116674217
|
F src/auth.c 60db23b98bb94c8b0178180faaf49dc116674217
|
||||||
F src/btree.c 0591368af031a0ecc4620140dfdaa177b82885a1
|
F src/btree.c d485d1b2f00d9957a58dae15ad718da0a8596267
|
||||||
F src/btree.h 32f96abef464cf8765b23ca669acfe90d191fcc5
|
F src/btree.h 934d0ad30b5b419e9291a11da878be349df2277e
|
||||||
F src/build.c fc0b51748da8bc9c8266fdb36e57d49393793947
|
F src/build.c ef9fb5bbc951f879145edb6a2278d32565bc77b8
|
||||||
F src/date.c b3e8b2bef1e3f2ce24e5b057203036defb18c3f1
|
F src/date.c b3e8b2bef1e3f2ce24e5b057203036defb18c3f1
|
||||||
F src/delete.c e81545e546f6bc87d7508a93a09ca70695265af3
|
F src/delete.c e81545e546f6bc87d7508a93a09ca70695265af3
|
||||||
F src/encode.c a876af473d1d636faa3dca51c7571f2e007eea37
|
F src/encode.c a876af473d1d636faa3dca51c7571f2e007eea37
|
||||||
@@ -50,8 +50,8 @@ F src/os_unix.c bd62e20d3abfb96c41fe737715b328d1dbb52bf7
|
|||||||
F src/os_unix.h 00c1f82b526ab2fb7ee5ddd555ea4ed68363c93a
|
F src/os_unix.h 00c1f82b526ab2fb7ee5ddd555ea4ed68363c93a
|
||||||
F src/os_win.c 84549f6cc815237533c5d0eb3697352b03478d96
|
F src/os_win.c 84549f6cc815237533c5d0eb3697352b03478d96
|
||||||
F src/os_win.h babd4e912967c6b09088cfe38a45e8005a07ba44
|
F src/os_win.h babd4e912967c6b09088cfe38a45e8005a07ba44
|
||||||
F src/pager.c e3969171742e7d9681977703feed4853f5ee206a
|
F src/pager.c d9f34d9245d4aa0b2073564e3f1d8a0d89f8fedd
|
||||||
F src/pager.h bc58d32a9dee464f7268fb68652c130a4216e438
|
F src/pager.h fe818866f6d1adcffeed88705e8df7e588cbaf13
|
||||||
F src/parse.y e19e066e726a31d7b2d3e6475bdf55f7e339f8a3
|
F src/parse.y e19e066e726a31d7b2d3e6475bdf55f7e339f8a3
|
||||||
F src/pragma.c 16713c1bc440ccd9982a27fb4b38e1a1c95ffd29
|
F src/pragma.c 16713c1bc440ccd9982a27fb4b38e1a1c95ffd29
|
||||||
F src/printf.c 3090c8ff397d549bc0de09b16d8ab7fd37a0c3f7
|
F src/printf.c 3090c8ff397d549bc0de09b16d8ab7fd37a0c3f7
|
||||||
@@ -59,12 +59,12 @@ F src/random.c eff68e3f257e05e81eae6c4d50a51eb88beb4ff3
|
|||||||
F src/select.c f02a65af34231031896e8442161cb5251e191e75
|
F src/select.c f02a65af34231031896e8442161cb5251e191e75
|
||||||
F src/shell.c 24b641700c9d90f361fcfa4f432c5b4aff704e6d
|
F src/shell.c 24b641700c9d90f361fcfa4f432c5b4aff704e6d
|
||||||
F src/sqlite.h.in b70fded2bdfeaddfb06adea3888118b722975136
|
F src/sqlite.h.in b70fded2bdfeaddfb06adea3888118b722975136
|
||||||
F src/sqliteInt.h ed55c1f149875b6484798381e6933f5f5ad1a4ce
|
F src/sqliteInt.h d1911e120fb20ff9ba4cf0115065ac6569268cec
|
||||||
F src/table.c af14284fa36c8d41f6829e3f2819dce07d3e2de2
|
F src/table.c af14284fa36c8d41f6829e3f2819dce07d3e2de2
|
||||||
F src/tclsqlite.c 8d093146332b2f0cbf2a8ebe8597d481619308a3
|
F src/tclsqlite.c 8d093146332b2f0cbf2a8ebe8597d481619308a3
|
||||||
F src/test1.c e4e0ae8af8040c848ef35f92e6a22b2245b9b873
|
F src/test1.c e4e0ae8af8040c848ef35f92e6a22b2245b9b873
|
||||||
F src/test2.c dafd8bd314a554bf376c6d3a8c83fd69219f5a40
|
F src/test2.c dafd8bd314a554bf376c6d3a8c83fd69219f5a40
|
||||||
F src/test3.c 7247090d15a5a43823079b6fd8dad1ed3cccdedf
|
F src/test3.c bacc42bf41fa04d6faf7dd104b595b8bafb9aec9
|
||||||
F src/test4.c a921a69821fd30209589228e64f94e9f715b6fe2
|
F src/test4.c a921a69821fd30209589228e64f94e9f715b6fe2
|
||||||
F src/test5.c b001fa7f1b9e2dc5c2331de62fc641b5ab2bd7a1
|
F src/test5.c b001fa7f1b9e2dc5c2331de62fc641b5ab2bd7a1
|
||||||
F src/tokenize.c 900374b6b37f04748bcd48c2d29a41c251542935
|
F src/tokenize.c 900374b6b37f04748bcd48c2d29a41c251542935
|
||||||
@@ -72,12 +72,12 @@ F src/trigger.c 296e888ae931e9774e1761996b2b66db40f7d216
|
|||||||
F src/update.c b66b1896c9da54678ba3eff2bf0b4d291a95986a
|
F src/update.c b66b1896c9da54678ba3eff2bf0b4d291a95986a
|
||||||
F src/utf.c a8fb39c94ae4ef6606d5216b6f05d9b86f6901b2
|
F src/utf.c a8fb39c94ae4ef6606d5216b6f05d9b86f6901b2
|
||||||
F src/util.c 43d0289d49f43c66847ebbeddfb85a2a0d1ddd2d
|
F src/util.c 43d0289d49f43c66847ebbeddfb85a2a0d1ddd2d
|
||||||
F src/vacuum.c fcb930215a3f6c50087300782555f61ad11dd80c
|
F src/vacuum.c 353c7f69dbeb6738434d81798465cc0698844640
|
||||||
F src/vdbe.c 0d8f2fea386c173997fb8eab555ab999497591fe
|
F src/vdbe.c 423b55e65501ef2b60d8dedabe8d76d06ea62d99
|
||||||
F src/vdbe.h 2d87155e31e84bb00cdc48cc1ce6987a3a484250
|
F src/vdbe.h 2d87155e31e84bb00cdc48cc1ce6987a3a484250
|
||||||
F src/vdbeInt.h 22ab717b69074fe7a28f64e35a39bd436ad9d150
|
F src/vdbeInt.h 22ab717b69074fe7a28f64e35a39bd436ad9d150
|
||||||
F src/vdbeapi.c d3659f3f2982e79c06ab8e338604a39e0ea0d2d3
|
F src/vdbeapi.c d3659f3f2982e79c06ab8e338604a39e0ea0d2d3
|
||||||
F src/vdbeaux.c f28f7fbc56c013f99957ed89318e5467ea629748
|
F src/vdbeaux.c 51f23399819e4c3bcbddf662a90c34465b24392b
|
||||||
F src/vdbemem.c d37e4033f7350e542f715c061bffe23feb51bc9e
|
F src/vdbemem.c d37e4033f7350e542f715c061bffe23feb51bc9e
|
||||||
F src/where.c 6507074d8ce3f78e7a4cd33f667f11e62020553e
|
F src/where.c 6507074d8ce3f78e7a4cd33f667f11e62020553e
|
||||||
F test/all.test 569a92a8ee88f5300c057cc4a8f50fbbc69a3242
|
F test/all.test 569a92a8ee88f5300c057cc4a8f50fbbc69a3242
|
||||||
@@ -229,7 +229,7 @@ F www/tclsqlite.tcl 19191cf2a1010eaeff74c51d83fd5f5a4d899075
|
|||||||
F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9
|
F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9
|
||||||
F www/version3.tcl 563ba3ac02f64da27ab17f3edbe8e56bfd0293fb
|
F www/version3.tcl 563ba3ac02f64da27ab17f3edbe8e56bfd0293fb
|
||||||
F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
|
F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
|
||||||
P 212de3ce66f746036cb2267a9f924fd55fa2f37a
|
P 76da457b8fc8fe838226da14c31c315cf914a505
|
||||||
R 609621fb2d8c2cbffc869dbeea94770a
|
R 98f9db5e6f42c5a7abb1dd3e9055572f
|
||||||
U danielk1977
|
U danielk1977
|
||||||
Z a1f3d16e3f6a21f6f1c6570aa621e99e
|
Z 119b2a1a08cb96489bfef6a509f0c0ea
|
||||||
|
@@ -1 +1 @@
|
|||||||
76da457b8fc8fe838226da14c31c315cf914a505
|
4e20720984e1fd6822ead785d758374d2704b7fb
|
@@ -9,7 +9,7 @@
|
|||||||
** May you share freely, never taking more than you give.
|
** May you share freely, never taking more than you give.
|
||||||
**
|
**
|
||||||
*************************************************************************
|
*************************************************************************
|
||||||
** $Id: btree.c,v 1.172 2004/06/22 14:40:11 drh Exp $
|
** $Id: btree.c,v 1.173 2004/06/26 08:38:25 danielk1977 Exp $
|
||||||
**
|
**
|
||||||
** This file implements a external (disk-based) database using BTrees.
|
** This file implements a external (disk-based) database using BTrees.
|
||||||
** For a detailed discussion of BTrees, refer to
|
** For a detailed discussion of BTrees, refer to
|
||||||
@@ -1231,7 +1231,7 @@ static int newDatabase(Btree *pBt){
|
|||||||
** This is so that appropriate space can be allocated in the journal file
|
** This is so that appropriate space can be allocated in the journal file
|
||||||
** when it is created..
|
** when it is created..
|
||||||
*/
|
*/
|
||||||
int sqlite3BtreeBeginTrans(Btree *pBt, int wrflag, int nMaster){
|
int sqlite3BtreeBeginTrans(Btree *pBt, int wrflag){
|
||||||
int rc = SQLITE_OK;
|
int rc = SQLITE_OK;
|
||||||
|
|
||||||
/* If the btree is already in a write-transaction, or it
|
/* If the btree is already in a write-transaction, or it
|
||||||
@@ -1251,7 +1251,7 @@ int sqlite3BtreeBeginTrans(Btree *pBt, int wrflag, int nMaster){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( rc==SQLITE_OK && wrflag ){
|
if( rc==SQLITE_OK && wrflag ){
|
||||||
rc = sqlite3pager_begin(pBt->pPage1->aData, nMaster);
|
rc = sqlite3pager_begin(pBt->pPage1->aData);
|
||||||
if( rc==SQLITE_OK ){
|
if( rc==SQLITE_OK ){
|
||||||
rc = newDatabase(pBt);
|
rc = newDatabase(pBt);
|
||||||
}
|
}
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
** subsystem. See comments in the source code for a detailed description
|
** subsystem. See comments in the source code for a detailed description
|
||||||
** of what each interface routine does.
|
** of what each interface routine does.
|
||||||
**
|
**
|
||||||
** @(#) $Id: btree.h,v 1.54 2004/06/14 06:03:57 danielk1977 Exp $
|
** @(#) $Id: btree.h,v 1.55 2004/06/26 08:38:25 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#ifndef _BTREE_H_
|
#ifndef _BTREE_H_
|
||||||
#define _BTREE_H_
|
#define _BTREE_H_
|
||||||
@@ -47,7 +47,7 @@ int sqlite3BtreeOpen(
|
|||||||
int sqlite3BtreeClose(Btree*);
|
int sqlite3BtreeClose(Btree*);
|
||||||
int sqlite3BtreeSetCacheSize(Btree*,int);
|
int sqlite3BtreeSetCacheSize(Btree*,int);
|
||||||
int sqlite3BtreeSetSafetyLevel(Btree*,int);
|
int sqlite3BtreeSetSafetyLevel(Btree*,int);
|
||||||
int sqlite3BtreeBeginTrans(Btree*,int,int);
|
int sqlite3BtreeBeginTrans(Btree*,int);
|
||||||
int sqlite3BtreeCommit(Btree*);
|
int sqlite3BtreeCommit(Btree*);
|
||||||
int sqlite3BtreeRollback(Btree*);
|
int sqlite3BtreeRollback(Btree*);
|
||||||
int sqlite3BtreeBeginStmt(Btree*);
|
int sqlite3BtreeBeginStmt(Btree*);
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
** ROLLBACK
|
** ROLLBACK
|
||||||
** PRAGMA
|
** PRAGMA
|
||||||
**
|
**
|
||||||
** $Id: build.c,v 1.232 2004/06/22 13:22:40 drh Exp $
|
** $Id: build.c,v 1.233 2004/06/26 08:38:25 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
@@ -620,7 +620,7 @@ void sqlite3StartTable(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if( db->flags & !db->autoCommit ){
|
if( db->flags & !db->autoCommit ){
|
||||||
rc = sqlite3BtreeBeginTrans(db->aDb[1].pBt, 1, 0);
|
rc = sqlite3BtreeBeginTrans(db->aDb[1].pBt, 1);
|
||||||
if( rc!=SQLITE_OK ){
|
if( rc!=SQLITE_OK ){
|
||||||
sqlite3ErrorMsg(pParse, "unable to get a write lock on "
|
sqlite3ErrorMsg(pParse, "unable to get a write lock on "
|
||||||
"the temporary database file");
|
"the temporary database file");
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
** file simultaneously, or one process from reading the database while
|
** file simultaneously, or one process from reading the database while
|
||||||
** another is writing.
|
** another is writing.
|
||||||
**
|
**
|
||||||
** @(#) $Id: pager.c,v 1.143 2004/06/26 01:48:19 danielk1977 Exp $
|
** @(#) $Id: pager.c,v 1.144 2004/06/26 08:38:25 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#include "os.h" /* Must be first to enable large file support */
|
#include "os.h" /* Must be first to enable large file support */
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
@@ -2361,7 +2361,7 @@ static int pager_open_journal(Pager *pPager){
|
|||||||
**
|
**
|
||||||
** If the database is already reserved for writing, this routine is a no-op.
|
** If the database is already reserved for writing, this routine is a no-op.
|
||||||
*/
|
*/
|
||||||
int sqlite3pager_begin(void *pData, int dummy_fixme){
|
int sqlite3pager_begin(void *pData){
|
||||||
PgHdr *pPg = DATA_TO_PGHDR(pData);
|
PgHdr *pPg = DATA_TO_PGHDR(pData);
|
||||||
Pager *pPager = pPg->pPager;
|
Pager *pPager = pPg->pPager;
|
||||||
int rc = SQLITE_OK;
|
int rc = SQLITE_OK;
|
||||||
@@ -2445,7 +2445,7 @@ int sqlite3pager_write(void *pData){
|
|||||||
** create it if it does not.
|
** create it if it does not.
|
||||||
*/
|
*/
|
||||||
assert( pPager->state!=PAGER_UNLOCK );
|
assert( pPager->state!=PAGER_UNLOCK );
|
||||||
rc = sqlite3pager_begin(pData, 0);
|
rc = sqlite3pager_begin(pData);
|
||||||
if( rc!=SQLITE_OK ){
|
if( rc!=SQLITE_OK ){
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
** subsystem. The page cache subsystem reads and writes a file a page
|
** subsystem. The page cache subsystem reads and writes a file a page
|
||||||
** at a time and provides a journal for rollback.
|
** at a time and provides a journal for rollback.
|
||||||
**
|
**
|
||||||
** @(#) $Id: pager.h,v 1.34 2004/06/14 06:03:57 danielk1977 Exp $
|
** @(#) $Id: pager.h,v 1.35 2004/06/26 08:38:25 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -86,7 +86,7 @@ int sqlite3pager_iswriteable(void*);
|
|||||||
int sqlite3pager_overwrite(Pager *pPager, Pgno pgno, void*);
|
int sqlite3pager_overwrite(Pager *pPager, Pgno pgno, void*);
|
||||||
int sqlite3pager_pagecount(Pager*);
|
int sqlite3pager_pagecount(Pager*);
|
||||||
int sqlite3pager_truncate(Pager*,Pgno);
|
int sqlite3pager_truncate(Pager*,Pgno);
|
||||||
int sqlite3pager_begin(void*,int);
|
int sqlite3pager_begin(void*);
|
||||||
int sqlite3pager_commit(Pager*);
|
int sqlite3pager_commit(Pager*);
|
||||||
int sqlite3pager_sync(Pager*,const char *zMaster);
|
int sqlite3pager_sync(Pager*,const char *zMaster);
|
||||||
int sqlite3pager_rollback(Pager*);
|
int sqlite3pager_rollback(Pager*);
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
*************************************************************************
|
*************************************************************************
|
||||||
** Internal interface definitions for SQLite.
|
** Internal interface definitions for SQLite.
|
||||||
**
|
**
|
||||||
** @(#) $Id: sqliteInt.h,v 1.300 2004/06/26 06:37:07 danielk1977 Exp $
|
** @(#) $Id: sqliteInt.h,v 1.301 2004/06/26 08:38:25 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#ifndef _SQLITEINT_H_
|
#ifndef _SQLITEINT_H_
|
||||||
#define _SQLITEINT_H_
|
#define _SQLITEINT_H_
|
||||||
@@ -388,7 +388,6 @@ struct sqlite {
|
|||||||
int errCode; /* Most recent error code (SQLITE_*) */
|
int errCode; /* Most recent error code (SQLITE_*) */
|
||||||
u8 enc; /* Text encoding for this database. */
|
u8 enc; /* Text encoding for this database. */
|
||||||
u8 autoCommit; /* The auto-commit flag. */
|
u8 autoCommit; /* The auto-commit flag. */
|
||||||
int nMaster; /* Length of master journal name. -1=unknown */
|
|
||||||
void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*);
|
void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*);
|
||||||
void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*);
|
void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*);
|
||||||
void *pCollNeededArg;
|
void *pCollNeededArg;
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
** is not included in the SQLite library. It is used for automated
|
** is not included in the SQLite library. It is used for automated
|
||||||
** testing of the SQLite library.
|
** testing of the SQLite library.
|
||||||
**
|
**
|
||||||
** $Id: test3.c,v 1.44 2004/06/17 00:01:21 danielk1977 Exp $
|
** $Id: test3.c,v 1.45 2004/06/26 08:38:25 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
#include "pager.h"
|
#include "pager.h"
|
||||||
@@ -129,7 +129,7 @@ static int btree_begin_transaction(
|
|||||||
return TCL_ERROR;
|
return TCL_ERROR;
|
||||||
}
|
}
|
||||||
if( Tcl_GetInt(interp, argv[1], (int*)&pBt) ) return TCL_ERROR;
|
if( Tcl_GetInt(interp, argv[1], (int*)&pBt) ) return TCL_ERROR;
|
||||||
rc = sqlite3BtreeBeginTrans(pBt, 1, 0);
|
rc = sqlite3BtreeBeginTrans(pBt, 1);
|
||||||
if( rc!=SQLITE_OK ){
|
if( rc!=SQLITE_OK ){
|
||||||
Tcl_AppendResult(interp, errorName(rc), 0);
|
Tcl_AppendResult(interp, errorName(rc), 0);
|
||||||
return TCL_ERROR;
|
return TCL_ERROR;
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
** Most of the code in this file may be omitted by defining the
|
** Most of the code in this file may be omitted by defining the
|
||||||
** SQLITE_OMIT_VACUUM macro.
|
** SQLITE_OMIT_VACUUM macro.
|
||||||
**
|
**
|
||||||
** $Id: vacuum.c,v 1.23 2004/06/19 09:08:16 danielk1977 Exp $
|
** $Id: vacuum.c,v 1.24 2004/06/26 08:38:25 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
@@ -196,7 +196,7 @@ int sqlite3RunVacuum(char **pzErrMsg, sqlite *db){
|
|||||||
u32 meta;
|
u32 meta;
|
||||||
|
|
||||||
assert( 0==sqlite3BtreeIsInTrans(pMain) );
|
assert( 0==sqlite3BtreeIsInTrans(pMain) );
|
||||||
rc = sqlite3BtreeBeginTrans(pMain, 1, 0);
|
rc = sqlite3BtreeBeginTrans(pMain, 1);
|
||||||
if( rc!=SQLITE_OK ) goto end_of_vacuum;
|
if( rc!=SQLITE_OK ) goto end_of_vacuum;
|
||||||
|
|
||||||
/* Copy Btree meta values 3 and 4. These correspond to SQL layer meta
|
/* Copy Btree meta values 3 and 4. These correspond to SQL layer meta
|
||||||
|
10
src/vdbe.c
10
src/vdbe.c
@@ -43,7 +43,7 @@
|
|||||||
** in this file for details. If in doubt, do not deviate from existing
|
** in this file for details. If in doubt, do not deviate from existing
|
||||||
** commenting and indentation practices when changing or adding code.
|
** commenting and indentation practices when changing or adding code.
|
||||||
**
|
**
|
||||||
** $Id: vdbe.c,v 1.388 2004/06/22 22:54:23 drh Exp $
|
** $Id: vdbe.c,v 1.389 2004/06/26 08:38:25 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
@@ -2300,10 +2300,7 @@ case OP_Transaction: {
|
|||||||
pBt = db->aDb[i].pBt;
|
pBt = db->aDb[i].pBt;
|
||||||
|
|
||||||
if( pBt ){
|
if( pBt ){
|
||||||
if( db->nMaster<0 ){
|
rc = sqlite3BtreeBeginTrans(pBt, pOp->p2);
|
||||||
db->nMaster = strlen(sqlite3BtreeGetFilename(db->aDb[0].pBt))+20;
|
|
||||||
}
|
|
||||||
rc = sqlite3BtreeBeginTrans(pBt, pOp->p2, db->nMaster);
|
|
||||||
if( rc==SQLITE_BUSY ){
|
if( rc==SQLITE_BUSY ){
|
||||||
p->pc = pc;
|
p->pc = pc;
|
||||||
p->rc = SQLITE_BUSY;
|
p->rc = SQLITE_BUSY;
|
||||||
@@ -2535,9 +2532,8 @@ case OP_OpenTemp: {
|
|||||||
if( pCx==0 ) goto no_mem;
|
if( pCx==0 ) goto no_mem;
|
||||||
pCx->nullRow = 1;
|
pCx->nullRow = 1;
|
||||||
rc = sqlite3BtreeFactory(db, 0, 1, TEMP_PAGES, &pCx->pBt);
|
rc = sqlite3BtreeFactory(db, 0, 1, TEMP_PAGES, &pCx->pBt);
|
||||||
|
|
||||||
if( rc==SQLITE_OK ){
|
if( rc==SQLITE_OK ){
|
||||||
rc = sqlite3BtreeBeginTrans(pCx->pBt, 1, 0);
|
rc = sqlite3BtreeBeginTrans(pCx->pBt, 1);
|
||||||
}
|
}
|
||||||
if( rc==SQLITE_OK ){
|
if( rc==SQLITE_OK ){
|
||||||
/* If a transient index is required, create it by calling
|
/* If a transient index is required, create it by calling
|
||||||
|
@@ -772,7 +772,7 @@ int sqlite3VdbeAggReset(sqlite *db, Agg *pAgg, KeyInfo *pKeyInfo){
|
|||||||
assert( pAgg->nTab==0 );
|
assert( pAgg->nTab==0 );
|
||||||
rc = sqlite3BtreeFactory(db, ":memory:", 0, TEMP_PAGES, &pAgg->pBtree);
|
rc = sqlite3BtreeFactory(db, ":memory:", 0, TEMP_PAGES, &pAgg->pBtree);
|
||||||
if( rc!=SQLITE_OK ) return rc;
|
if( rc!=SQLITE_OK ) return rc;
|
||||||
sqlite3BtreeBeginTrans(pAgg->pBtree, 1, 0);
|
sqlite3BtreeBeginTrans(pAgg->pBtree, 1);
|
||||||
rc = sqlite3BtreeCreateTable(pAgg->pBtree, &pAgg->nTab, 0);
|
rc = sqlite3BtreeCreateTable(pAgg->pBtree, &pAgg->nTab, 0);
|
||||||
if( rc!=SQLITE_OK ) return rc;
|
if( rc!=SQLITE_OK ) return rc;
|
||||||
}
|
}
|
||||||
@@ -986,15 +986,16 @@ static int vdbeCommit(sqlite *db){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The simple case - no more than one database file (not counting the TEMP
|
/* The simple case - no more than one database file (not counting the
|
||||||
** database) has a transaction active. There is no need for the
|
** TEMP database) has a transaction active. There is no need for the
|
||||||
** master-journal.
|
** master-journal.
|
||||||
**
|
**
|
||||||
** if db->nMaster==0, it means the main database is :memory:. In that case
|
** If the return value of sqlite3BtreeGetFilename() is a zero length
|
||||||
** we do not support atomic multi-file commits, so use the simple case then
|
** string, it means the main database is :memory:. In that case we do
|
||||||
|
** not support atomic multi-file commits, so use the simple case then
|
||||||
** too.
|
** too.
|
||||||
*/
|
*/
|
||||||
if( db->nMaster<=0 || nTrans<=1 ){
|
if( 0==strlen(sqlite3BtreeGetFilename(db->aDb[0].pBt)) || nTrans<=1 ){
|
||||||
for(i=0; rc==SQLITE_OK && i<db->nDb; i++){
|
for(i=0; rc==SQLITE_OK && i<db->nDb; i++){
|
||||||
Btree *pBt = db->aDb[i].pBt;
|
Btree *pBt = db->aDb[i].pBt;
|
||||||
if( pBt ){
|
if( pBt ){
|
||||||
@@ -1034,7 +1035,6 @@ static int vdbeCommit(sqlite *db){
|
|||||||
}while( sqlite3OsFileExists(zMaster) );
|
}while( sqlite3OsFileExists(zMaster) );
|
||||||
|
|
||||||
/* Open the master journal. */
|
/* Open the master journal. */
|
||||||
assert( strlen(zMaster)<db->nMaster );
|
|
||||||
memset(&master, 0, sizeof(master));
|
memset(&master, 0, sizeof(master));
|
||||||
rc = sqlite3OsOpenExclusive(zMaster, &master, 0);
|
rc = sqlite3OsOpenExclusive(zMaster, &master, 0);
|
||||||
if( rc!=SQLITE_OK ){
|
if( rc!=SQLITE_OK ){
|
||||||
|
Reference in New Issue
Block a user