mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Extend the influence of a couple of SQLITE_OMIT_** macros a little bit. (CVS 2243)
FossilOrigin-Name: 5b1a9bf6aa5a5c466b88f649e322e81b8466851f
This commit is contained in:
20
manifest
20
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Changes\sso\sthat\scrash.test\sworks\swhen\sSQLITE_OMIT_PAGER_PRAGMAS\sis\sdefined.\s(CVS\s2242)
|
C Extend\sthe\sinfluence\sof\sa\scouple\sof\sSQLITE_OMIT_**\smacros\sa\slittle\sbit.\s(CVS\s2243)
|
||||||
D 2005-01-20T05:24:33
|
D 2005-01-20T11:32:23
|
||||||
F Makefile.in ffd81f5e926d40b457071b4de8d7c1fa18f39b5a
|
F Makefile.in ffd81f5e926d40b457071b4de8d7c1fa18f39b5a
|
||||||
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
|
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
|
||||||
F README a01693e454a00cc117967e3f9fdab2d4d52e9bc1
|
F README a01693e454a00cc117967e3f9fdab2d4d52e9bc1
|
||||||
@@ -27,20 +27,20 @@ F sqlite.pc.in 30552343140c53304c2a658c080fbe810cd09ca2
|
|||||||
F sqlite3.1 01fdb467ce387a83248857c92f9e801df9e4611c
|
F sqlite3.1 01fdb467ce387a83248857c92f9e801df9e4611c
|
||||||
F sqlite3.def dbaeb20c153e1d366e8f421b55a573f5dfc00863
|
F sqlite3.def dbaeb20c153e1d366e8f421b55a573f5dfc00863
|
||||||
F sqlite3.pc.in 985b9bf34192a549d7d370e0f0b6b34a4f61369a
|
F sqlite3.pc.in 985b9bf34192a549d7d370e0f0b6b34a4f61369a
|
||||||
F src/attach.c e49d09dad9f5f9fb10b4b0c1be5a70ae4c45e689
|
F src/attach.c cecf5ab42cff34416372a0210b14abb50ed48ef9
|
||||||
F src/auth.c 3b81f2a42f48a62c2c9c9b0eda31a157c681edea
|
F src/auth.c 3b81f2a42f48a62c2c9c9b0eda31a157c681edea
|
||||||
F src/btree.c 97101cce85304edbaedafc5f39ab12e2dc78b076
|
F src/btree.c 97101cce85304edbaedafc5f39ab12e2dc78b076
|
||||||
F src/btree.h 74d19cf40ab49fd69abe9e4e12a6c321ad86c497
|
F src/btree.h 74d19cf40ab49fd69abe9e4e12a6c321ad86c497
|
||||||
F src/build.c da5ecd9880f2d19d5e77fe48b722577494dd3290
|
F src/build.c da5ecd9880f2d19d5e77fe48b722577494dd3290
|
||||||
F src/cursor.c de73c00aefc4747ad59b5105cf38bbff0667922e
|
F src/cursor.c de73c00aefc4747ad59b5105cf38bbff0667922e
|
||||||
F src/date.c f3d1f5cd1503dabf426a198f3ebef5afbc122a7f
|
F src/date.c f3d1f5cd1503dabf426a198f3ebef5afbc122a7f
|
||||||
F src/delete.c cbf54c0634c53ef683f7af8ad5c5d5637c9efb90
|
F src/delete.c b3accca9c38d9a67dbd724f67b04151a13735ebd
|
||||||
F src/experimental.c 8cc66b2be6a011055d75ef19ed2584bcfbb585ad
|
F src/experimental.c 8cc66b2be6a011055d75ef19ed2584bcfbb585ad
|
||||||
F src/expr.c 8f8efe75a57d75c6c27fa580c1495214698edab8
|
F src/expr.c 8f8efe75a57d75c6c27fa580c1495214698edab8
|
||||||
F src/func.c dc188d862d7276ea897655b248e2cb17022686e3
|
F src/func.c dc188d862d7276ea897655b248e2cb17022686e3
|
||||||
F src/hash.c a97721a55440b7bea31ffe471bb2f6b4123cddd5
|
F src/hash.c a97721a55440b7bea31ffe471bb2f6b4123cddd5
|
||||||
F src/hash.h 1b0c445e1c89ff2aaad9b4605ba61375af001e84
|
F src/hash.h 1b0c445e1c89ff2aaad9b4605ba61375af001e84
|
||||||
F src/insert.c e5f9a24e892259c4b1da5699f3d87287150b5e21
|
F src/insert.c 037eb46630f027d0f93584db180d08ce163f3dbb
|
||||||
F src/legacy.c d58ea507bce885298a2c8c3cbb0f4bff5d47830b
|
F src/legacy.c d58ea507bce885298a2c8c3cbb0f4bff5d47830b
|
||||||
F src/main.c b489aae242a6123b111f125633799e37c0bab2a8
|
F src/main.c b489aae242a6123b111f125633799e37c0bab2a8
|
||||||
F src/md5.c 7ae1c39044b95de2f62e066f47bb1deb880a1070
|
F src/md5.c 7ae1c39044b95de2f62e066f47bb1deb880a1070
|
||||||
@@ -52,10 +52,10 @@ F src/os_unix.c 77319e31f5284c5714239cf50ae28552286414df
|
|||||||
F src/os_unix.h f3097815e041e82e24d92505e1ff61ba24172d13
|
F src/os_unix.h f3097815e041e82e24d92505e1ff61ba24172d13
|
||||||
F src/os_win.c 3c0b0a3bc33318cf555a1cd130232ad1b9a5a711
|
F src/os_win.c 3c0b0a3bc33318cf555a1cd130232ad1b9a5a711
|
||||||
F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
|
F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
|
||||||
F src/pager.c 6319578f176cbc53eb044940ce484fae244ba6c5
|
F src/pager.c 05d23abbcfa3133f716a99589e53883c10551b1f
|
||||||
F src/pager.h 9eba8c53dd91eae7f3f90743b2ee242da02a9862
|
F src/pager.h 9eba8c53dd91eae7f3f90743b2ee242da02a9862
|
||||||
F src/parse.y 276efb30de5d8582bda9b6a98b17aac6875ab3e9
|
F src/parse.y 276efb30de5d8582bda9b6a98b17aac6875ab3e9
|
||||||
F src/pragma.c ac594f74c90ffec043c43e49358719ffeb491eec
|
F src/pragma.c 8ab313986673aa4c45e8693d8aabb9b95ee7b14a
|
||||||
F src/printf.c 3d20b21cfecadacecac3fb7274e746cb81d3d357
|
F src/printf.c 3d20b21cfecadacecac3fb7274e746cb81d3d357
|
||||||
F src/random.c eff68e3f257e05e81eae6c4d50a51eb88beb4ff3
|
F src/random.c eff68e3f257e05e81eae6c4d50a51eb88beb4ff3
|
||||||
F src/select.c e147c81d57f7146d90a4d5a01f523dfec43808f4
|
F src/select.c e147c81d57f7146d90a4d5a01f523dfec43808f4
|
||||||
@@ -270,7 +270,7 @@ F www/tclsqlite.tcl e73f8f8e5f20e8277619433f7970060ab01088fc
|
|||||||
F www/vdbe.tcl 095f106d93875c94b47367384ebc870517431618
|
F www/vdbe.tcl 095f106d93875c94b47367384ebc870517431618
|
||||||
F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0
|
F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0
|
||||||
F www/whentouse.tcl c3b50d3ac31c54be2a1af9b488a89d22f1e6e746
|
F www/whentouse.tcl c3b50d3ac31c54be2a1af9b488a89d22f1e6e746
|
||||||
P d267fb3ca3f31ee138c9613cb84e873ede7f141a
|
P f0add0a60e0afb833202e42cdba97bafe6a59dfc
|
||||||
R 55044367795c6eaf0d2957842ac9aaf4
|
R b7d0586837ede46bbec162c278e488af
|
||||||
U danielk1977
|
U danielk1977
|
||||||
Z 27da8f82b49b57c87cafc749a59dab56
|
Z 9a530a08d49f6e6af93c82c07243e25f
|
||||||
|
@@ -1 +1 @@
|
|||||||
f0add0a60e0afb833202e42cdba97bafe6a59dfc
|
5b1a9bf6aa5a5c466b88f649e322e81b8466851f
|
10
src/attach.c
10
src/attach.c
@@ -11,7 +11,7 @@
|
|||||||
*************************************************************************
|
*************************************************************************
|
||||||
** This file contains code used to implement the ATTACH and DETACH commands.
|
** This file contains code used to implement the ATTACH and DETACH commands.
|
||||||
**
|
**
|
||||||
** $Id: attach.c,v 1.28 2004/09/06 17:24:12 drh Exp $
|
** $Id: attach.c,v 1.29 2005/01/20 11:32:23 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
|
|
||||||
@@ -251,11 +251,14 @@ int sqlite3FixSrcList(
|
|||||||
pFix->zType, pFix->pName, pItem->zDatabase);
|
pFix->zType, pFix->pName, pItem->zDatabase);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_TRIGGER)
|
||||||
if( sqlite3FixSelect(pFix, pItem->pSelect) ) return 1;
|
if( sqlite3FixSelect(pFix, pItem->pSelect) ) return 1;
|
||||||
if( sqlite3FixExpr(pFix, pItem->pOn) ) return 1;
|
if( sqlite3FixExpr(pFix, pItem->pOn) ) return 1;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_TRIGGER)
|
||||||
int sqlite3FixSelect(
|
int sqlite3FixSelect(
|
||||||
DbFixer *pFix, /* Context of the fixation */
|
DbFixer *pFix, /* Context of the fixation */
|
||||||
Select *pSelect /* The SELECT statement to be fixed to one database */
|
Select *pSelect /* The SELECT statement to be fixed to one database */
|
||||||
@@ -309,6 +312,9 @@ int sqlite3FixExprList(
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef SQLITE_OMIT_TRIGGER
|
||||||
int sqlite3FixTriggerStep(
|
int sqlite3FixTriggerStep(
|
||||||
DbFixer *pFix, /* Context of the fixation */
|
DbFixer *pFix, /* Context of the fixation */
|
||||||
TriggerStep *pStep /* The trigger step be fixed to one database */
|
TriggerStep *pStep /* The trigger step be fixed to one database */
|
||||||
@@ -327,3 +333,5 @@ int sqlite3FixTriggerStep(
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
** This file contains C code routines that are called by the parser
|
** This file contains C code routines that are called by the parser
|
||||||
** in order to generate code for DELETE FROM statements.
|
** in order to generate code for DELETE FROM statements.
|
||||||
**
|
**
|
||||||
** $Id: delete.c,v 1.98 2005/01/19 23:24:50 drh Exp $
|
** $Id: delete.c,v 1.99 2005/01/20 11:32:24 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
|
|
||||||
@@ -43,10 +43,12 @@ int sqlite3IsReadOnly(Parse *pParse, Table *pTab, int viewOk){
|
|||||||
sqlite3ErrorMsg(pParse, "table %s may not be modified", pTab->zName);
|
sqlite3ErrorMsg(pParse, "table %s may not be modified", pTab->zName);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#ifndef SQLITE_OMIT_VIEW
|
||||||
if( !viewOk && pTab->pSelect ){
|
if( !viewOk && pTab->pSelect ){
|
||||||
sqlite3ErrorMsg(pParse,"cannot modify %s because it is a view",pTab->zName);
|
sqlite3ErrorMsg(pParse,"cannot modify %s because it is a view",pTab->zName);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
10
src/insert.c
10
src/insert.c
@@ -12,7 +12,7 @@
|
|||||||
** This file contains C code routines that are called by the parser
|
** This file contains C code routines that are called by the parser
|
||||||
** to handle INSERT statements in SQLite.
|
** to handle INSERT statements in SQLite.
|
||||||
**
|
**
|
||||||
** $Id: insert.c,v 1.133 2005/01/19 23:24:50 drh Exp $
|
** $Id: insert.c,v 1.134 2005/01/20 11:32:24 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
|
|
||||||
@@ -830,6 +830,8 @@ void sqlite3GenerateConstraintChecks(
|
|||||||
}
|
}
|
||||||
sqlite3VdbeAddOp(v, OP_Dup, nCol-1-i, 1);
|
sqlite3VdbeAddOp(v, OP_Dup, nCol-1-i, 1);
|
||||||
addr = sqlite3VdbeAddOp(v, OP_NotNull, 1, 0);
|
addr = sqlite3VdbeAddOp(v, OP_NotNull, 1, 0);
|
||||||
|
assert( onError==OE_Rollback || onError==OE_Abort || onError==OE_Fail
|
||||||
|
|| onError==OE_Ignore || onError==OE_Replace );
|
||||||
switch( onError ){
|
switch( onError ){
|
||||||
case OE_Rollback:
|
case OE_Rollback:
|
||||||
case OE_Abort:
|
case OE_Abort:
|
||||||
@@ -851,7 +853,6 @@ void sqlite3GenerateConstraintChecks(
|
|||||||
sqlite3VdbeAddOp(v, OP_Push, nCol-i, 0);
|
sqlite3VdbeAddOp(v, OP_Push, nCol-i, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: assert(0);
|
|
||||||
}
|
}
|
||||||
sqlite3VdbeChangeP2(v, addr, sqlite3VdbeCurrentAddr(v));
|
sqlite3VdbeChangeP2(v, addr, sqlite3VdbeCurrentAddr(v));
|
||||||
}
|
}
|
||||||
@@ -957,6 +958,8 @@ void sqlite3GenerateConstraintChecks(
|
|||||||
jumpInst2 = sqlite3VdbeAddOp(v, OP_IsUnique, base+iCur+1, 0);
|
jumpInst2 = sqlite3VdbeAddOp(v, OP_IsUnique, base+iCur+1, 0);
|
||||||
|
|
||||||
/* Generate code that executes if the new index entry is not unique */
|
/* Generate code that executes if the new index entry is not unique */
|
||||||
|
assert( onError==OE_Rollback || onError==OE_Abort || onError==OE_Fail
|
||||||
|
|| onError==OE_Ignore || onError==OE_Replace );
|
||||||
switch( onError ){
|
switch( onError ){
|
||||||
case OE_Rollback:
|
case OE_Rollback:
|
||||||
case OE_Abort:
|
case OE_Abort:
|
||||||
@@ -1001,7 +1004,6 @@ void sqlite3GenerateConstraintChecks(
|
|||||||
seenReplace = 1;
|
seenReplace = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: assert(0);
|
|
||||||
}
|
}
|
||||||
contAddr = sqlite3VdbeCurrentAddr(v);
|
contAddr = sqlite3VdbeCurrentAddr(v);
|
||||||
assert( contAddr<(1<<24) );
|
assert( contAddr<(1<<24) );
|
||||||
@@ -1047,11 +1049,13 @@ void sqlite3CompleteInsertion(
|
|||||||
}
|
}
|
||||||
sqlite3VdbeAddOp(v, OP_MakeRecord, pTab->nCol, 0);
|
sqlite3VdbeAddOp(v, OP_MakeRecord, pTab->nCol, 0);
|
||||||
sqlite3TableAffinityStr(v, pTab);
|
sqlite3TableAffinityStr(v, pTab);
|
||||||
|
#ifndef SQLITE_OMIT_TRIGGER
|
||||||
if( newIdx>=0 ){
|
if( newIdx>=0 ){
|
||||||
sqlite3VdbeAddOp(v, OP_Dup, 1, 0);
|
sqlite3VdbeAddOp(v, OP_Dup, 1, 0);
|
||||||
sqlite3VdbeAddOp(v, OP_Dup, 1, 0);
|
sqlite3VdbeAddOp(v, OP_Dup, 1, 0);
|
||||||
sqlite3VdbeAddOp(v, OP_PutIntKey, newIdx, 0);
|
sqlite3VdbeAddOp(v, OP_PutIntKey, newIdx, 0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if( pParse->nested ){
|
if( pParse->nested ){
|
||||||
pik_flags = 0;
|
pik_flags = 0;
|
||||||
}else{
|
}else{
|
||||||
|
@@ -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.183 2005/01/17 01:33:14 danielk1977 Exp $
|
** @(#) $Id: pager.c,v 1.184 2005/01/20 11:32:24 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
@@ -1727,6 +1727,7 @@ static void unlinkPage(PgHdr *pPg){
|
|||||||
unlinkHashChain(pPager, pPg);
|
unlinkHashChain(pPager, pPg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef SQLITE_OMIT_MEMORYDB
|
||||||
/*
|
/*
|
||||||
** This routine is used to truncate an in-memory database. Delete
|
** This routine is used to truncate an in-memory database. Delete
|
||||||
** all pages whose pgno is larger than pPager->dbSize and is unreferenced.
|
** all pages whose pgno is larger than pPager->dbSize and is unreferenced.
|
||||||
@@ -1752,6 +1753,9 @@ static void memoryTruncate(Pager *pPager){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
#define memoryTruncate(p)
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Truncate the file to the number of pages specified.
|
** Truncate the file to the number of pages specified.
|
||||||
@@ -2743,6 +2747,7 @@ int sqlite3pager_iswriteable(void *pData){
|
|||||||
return pPg->dirty;
|
return pPg->dirty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef SQLITE_OMIT_VACUUM
|
||||||
/*
|
/*
|
||||||
** Replace the content of a single page with the information in the third
|
** Replace the content of a single page with the information in the third
|
||||||
** argument.
|
** argument.
|
||||||
@@ -2761,6 +2766,7 @@ int sqlite3pager_overwrite(Pager *pPager, Pgno pgno, void *pData){
|
|||||||
}
|
}
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** A call to this routine tells the pager that it is not necessary to
|
** A call to this routine tells the pager that it is not necessary to
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
*************************************************************************
|
*************************************************************************
|
||||||
** This file contains code used to implement the PRAGMA command.
|
** This file contains code used to implement the PRAGMA command.
|
||||||
**
|
**
|
||||||
** $Id: pragma.c,v 1.83 2005/01/11 10:25:08 danielk1977 Exp $
|
** $Id: pragma.c,v 1.84 2005/01/20 11:32:24 danielk1977 Exp $
|
||||||
*/
|
*/
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
@@ -62,6 +62,7 @@ static int getBoolean(const u8 *z){
|
|||||||
return getSafetyLevel(z)&1;
|
return getSafetyLevel(z)&1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef SQLITE_OMIT_PAGER_PRAGMAS
|
||||||
/*
|
/*
|
||||||
** Interpret the given string as a temp db location. Return 1 for file
|
** Interpret the given string as a temp db location. Return 1 for file
|
||||||
** backed temporary databases, 2 for the Red-Black tree in memory database
|
** backed temporary databases, 2 for the Red-Black tree in memory database
|
||||||
@@ -113,6 +114,7 @@ static int changeTempStorage(Parse *pParse, const char *zStorageType){
|
|||||||
db->temp_store = ts;
|
db->temp_store = ts;
|
||||||
return SQLITE_OK;
|
return SQLITE_OK;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Generate code to return a single integer value.
|
** Generate code to return a single integer value.
|
||||||
|
Reference in New Issue
Block a user