The -DSQLITE_OMIT_ATTACH=1 option now omits both the ATTACH and VACUUM
commands. Ticket #2268. The regression test suite depends on both of these commands and will not run if compiled with this option. (CVS 3727) FossilOrigin-Name: cbebfb89603044e48b3a87b79d1eefbbc5b4c8a5
This commit is contained in:
parent
a4124a06cc
commit
fdbcdee5ff
22
manifest
22
manifest
@ -1,5 +1,5 @@
|
||||
C Fix\soff-by-one\serrors\sin\sthe\sheader\scomments\sof\sbtree.c.\s\sTicket\s#2272.\s(CVS\s3726)
|
||||
D 2007-03-27T14:05:23
|
||||
C The\s-DSQLITE_OMIT_ATTACH=1\soption\snow\somits\sboth\sthe\sATTACH\sand\sVACUUM\r\ncommands.\sTicket\s#2268.\r\n\sThe\sregression\stest\ssuite\sdepends\son\sboth\sof\sthese\scommands\r\nand\swill\snot\srun\sif\scompiled\swith\sthis\soption.\s(CVS\s3727)
|
||||
D 2007-03-27T14:44:51
|
||||
F Makefile.in 1fe3d0b46e40fd684e1e61f8e8056cefed16de9f
|
||||
F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
|
||||
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
||||
@ -56,7 +56,7 @@ F sqlite3.def a96c1d0d39362b763d2ddba220a32da41a15c4b4
|
||||
F sqlite3.pc.in 985b9bf34192a549d7d370e0f0b6b34a4f61369a
|
||||
F src/alter.c 2c79ec40f65e33deaf90ca493422c74586e481a3
|
||||
F src/analyze.c 7d2b7ab9a9c2fd6e55700f69064dfdd3e36d7a8a
|
||||
F src/attach.c 9b5a9c50fb92883e3404353b225674142da826cd
|
||||
F src/attach.c 12fa4f4c46a42659feabd2e33affccd3dddad18d
|
||||
F src/auth.c 902f4722661c796b97f007d9606bd7529c02597f
|
||||
F src/btree.c 27e62fc50dba2ac0b4210402804ac12321ad8e59
|
||||
F src/btree.h 066444ee25bd6e6accb997bfd2cf5ace14dbcd00
|
||||
@ -88,7 +88,7 @@ F src/os_win.c 13708a58aa24a9960fa45ac4a681e34f881ae77c
|
||||
F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
|
||||
F src/pager.c 7a60e7e1f8b5abe841282a3dc90823b73fefe8b8
|
||||
F src/pager.h 3c16500c25051536e43fb19e246e58fc7cb51d9f
|
||||
F src/parse.y bcfe366c1fd61cfc40e5344eb69a31997a821af0
|
||||
F src/parse.y 207ab04273ae13aa4a729b96008d294d5f334ab3
|
||||
F src/pragma.c 9cb8b94e7d38ba35a86037bd517d07ba9870b4b2
|
||||
F src/prepare.c 37207b2b2ccb41d379b01dd62231686bcc48ef1f
|
||||
F src/printf.c aade23a789d7cc88b397ec0d33a0a01a33a7a9c1
|
||||
@ -101,7 +101,7 @@ F src/sqlite3ext.h 832e13de075d920e2c76584e2b7af1054bb212df
|
||||
F src/sqliteInt.h 7a3d16cd517dfce73eeac10963275454d6421f82
|
||||
F src/table.c 6d0da66dde26ee75614ed8f584a1996467088d06
|
||||
F src/tclsqlite.c cd2b3b86ab07c0e0779f6c6e71e72c6c7dc1e704
|
||||
F src/test1.c 7c8f2786dbd55bab35c7529045a3d72f54c7f98b
|
||||
F src/test1.c 439bba8da10fbc61c731019cf2894e6057578878
|
||||
F src/test2.c dc48c84ce68b3bc2f2d01871d709f20dc77003b0
|
||||
F src/test3.c b40ca2eb1390a4c5a41bc8c545284a32aca69991
|
||||
F src/test4.c 8b784cd82de158a2317cb4ac4bc86f91ad315e25
|
||||
@ -121,8 +121,8 @@ F src/trigger.c 8c55d31876013ed4e97ee7ce24478fbe00db49bb
|
||||
F src/update.c 876b3142b8db9ce6ddf8374a2ced65e576acabc7
|
||||
F src/utf.c 67ecb1032bc0b42c105e88d65ef9d9f626eb0e1f
|
||||
F src/util.c 8e8180ee5597f2474c1da311ff3c464b6966c0f1
|
||||
F src/vacuum.c 327c6ffa38935163db7c1e256ff5f788e901b318
|
||||
F src/vdbe.c b452ec53e3b8d81b0f21af980ed8fd1547cb6f5a
|
||||
F src/vacuum.c b74b11077318f69e3ab0a474d31c3af87efa35bd
|
||||
F src/vdbe.c b68f3a86177fa4d10512a4e276a8961d5c1e2ccf
|
||||
F src/vdbe.h 0025259af1939fb264a545816c69e4b5b8d52691
|
||||
F src/vdbeInt.h b2ca85ca8abfbba86e380b06c7673dc81c6784c3
|
||||
F src/vdbeapi.c 6cff63a5b3a52af04b2bef0f7e27ed7ea6f85183
|
||||
@ -375,7 +375,7 @@ F tool/lempar.c fdc1672e97f72f72e76553038501da40fec9d251
|
||||
F tool/memleak.awk 4e7690a51bf3ed757e611273d43fe3f65b510133
|
||||
F tool/memleak2.awk 9cc20c8e8f3c675efac71ea0721ee6874a1566e8
|
||||
F tool/memleak3.tcl 7707006ee908cffff210c98158788d85bb3fcdbf
|
||||
F tool/mkkeywordhash.c eb7cd7244b9725e9e77270d0572de8b22a96e83a
|
||||
F tool/mkkeywordhash.c 520d0016eaac0d783ea8ffb7f91d150d0bf06e81
|
||||
F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e x
|
||||
F tool/mksqlite3c.tcl ca566a1482d187433f3aea97a83a1ca9fb6af071
|
||||
F tool/omittest.tcl e6b3d6a1285f9813bc1dea53bb522b4b72774710
|
||||
@ -442,7 +442,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
|
||||
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
||||
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
|
||||
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
|
||||
P c8a8a189a82500aab501e9949f5b197c0b80b3a9
|
||||
R 4093f5fe8a47b839b227af98195abbcf
|
||||
P a70ea7202d8ffb0321ff8f2e5036731bb1742eb8
|
||||
R 8e21b5a1896b3369f1a4fc1488f3d566
|
||||
U drh
|
||||
Z 6e347bdb933f7ff4141334d59e940f6d
|
||||
Z d85839b7a4f0c45571bb293ebd535ea5
|
||||
|
@ -1 +1 @@
|
||||
a70ea7202d8ffb0321ff8f2e5036731bb1742eb8
|
||||
cbebfb89603044e48b3a87b79d1eefbbc5b4c8a5
|
@ -11,10 +11,11 @@
|
||||
*************************************************************************
|
||||
** This file contains code used to implement the ATTACH and DETACH commands.
|
||||
**
|
||||
** $Id: attach.c,v 1.55 2007/03/24 16:45:05 danielk1977 Exp $
|
||||
** $Id: attach.c,v 1.56 2007/03/27 14:44:51 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
#ifndef SQLITE_OMIT_ATTACH
|
||||
/*
|
||||
** Resolve an expression that was part of an ATTACH or DETACH statement. This
|
||||
** is slightly different from resolving a normal SQL expression, because simple
|
||||
@ -351,14 +352,17 @@ void sqlite3Detach(Parse *pParse, Expr *pDbname){
|
||||
void sqlite3Attach(Parse *pParse, Expr *p, Expr *pDbname, Expr *pKey){
|
||||
codeAttach(pParse, SQLITE_ATTACH, "sqlite_attach", 3, p, p, pDbname, pKey);
|
||||
}
|
||||
#endif /* SQLITE_OMIT_ATTACH */
|
||||
|
||||
/*
|
||||
** Register the functions sqlite_attach and sqlite_detach.
|
||||
*/
|
||||
void sqlite3AttachFunctions(sqlite3 *db){
|
||||
#ifndef SQLITE_OMIT_ATTACH
|
||||
static const int enc = SQLITE_UTF8;
|
||||
sqlite3CreateFunc(db, "sqlite_attach", 3, enc, db, attachFunc, 0, 0);
|
||||
sqlite3CreateFunc(db, "sqlite_detach", 1, enc, db, detachFunc, 0, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
15
src/parse.y
15
src/parse.y
@ -14,7 +14,7 @@
|
||||
** the parser. Lemon will also generate a header file containing
|
||||
** numeric codes for all of the tokens.
|
||||
**
|
||||
** @(#) $Id: parse.y,v 1.215 2007/02/02 12:44:37 drh Exp $
|
||||
** @(#) $Id: parse.y,v 1.216 2007/03/27 14:44:51 drh Exp $
|
||||
*/
|
||||
|
||||
// All token codes are small integers with #defines that begin with "TK_"
|
||||
@ -890,8 +890,10 @@ cmd ::= DROP INDEX ifexists(E) fullname(X). {sqlite3DropIndex(pParse, X, E);}
|
||||
///////////////////////////// The VACUUM command /////////////////////////////
|
||||
//
|
||||
%ifndef SQLITE_OMIT_VACUUM
|
||||
%ifndef SQLITE_OMIT_ATTACH
|
||||
cmd ::= VACUUM. {sqlite3Vacuum(pParse);}
|
||||
cmd ::= VACUUM nm. {sqlite3Vacuum(pParse);}
|
||||
%endif SQLITE_OMIT_ATTACH
|
||||
%endif SQLITE_OMIT_VACUUM
|
||||
|
||||
///////////////////////////// The PRAGMA command /////////////////////////////
|
||||
@ -1018,9 +1020,14 @@ cmd ::= DROP TRIGGER ifexists(NOERR) fullname(X). {
|
||||
%endif !SQLITE_OMIT_TRIGGER
|
||||
|
||||
//////////////////////// ATTACH DATABASE file AS name /////////////////////////
|
||||
%ifndef SQLITE_OMIT_ATTACH
|
||||
cmd ::= ATTACH database_kw_opt expr(F) AS expr(D) key_opt(K). {
|
||||
sqlite3Attach(pParse, F, D, K);
|
||||
}
|
||||
cmd ::= DETACH database_kw_opt expr(D). {
|
||||
sqlite3Detach(pParse, D);
|
||||
}
|
||||
|
||||
%type key_opt {Expr *}
|
||||
%destructor key_opt {sqlite3ExprDelete($$);}
|
||||
key_opt(A) ::= . { A = 0; }
|
||||
@ -1028,11 +1035,7 @@ key_opt(A) ::= KEY expr(X). { A = X; }
|
||||
|
||||
database_kw_opt ::= DATABASE.
|
||||
database_kw_opt ::= .
|
||||
|
||||
//////////////////////// DETACH DATABASE name /////////////////////////////////
|
||||
cmd ::= DETACH database_kw_opt expr(D). {
|
||||
sqlite3Detach(pParse, D);
|
||||
}
|
||||
%endif SQLITE_OMIT_ATTACH
|
||||
|
||||
////////////////////////// REINDEX collation //////////////////////////////////
|
||||
%ifndef SQLITE_OMIT_REINDEX
|
||||
|
10
src/test1.c
10
src/test1.c
@ -13,7 +13,7 @@
|
||||
** is not included in the SQLite library. It is used for automated
|
||||
** testing of the SQLite library.
|
||||
**
|
||||
** $Id: test1.c,v 1.230 2007/03/26 22:05:02 drh Exp $
|
||||
** $Id: test1.c,v 1.231 2007/03/27 14:44:51 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "tcl.h"
|
||||
@ -3758,6 +3758,12 @@ static void set_options(Tcl_Interp *interp){
|
||||
Tcl_SetVar2(interp, "sqlite_options", "analyze", "1", TCL_GLOBAL_ONLY);
|
||||
#endif
|
||||
|
||||
#ifdef SQLITE_OMIT_ATTACH
|
||||
Tcl_SetVar2(interp, "sqlite_options", "attach", "0", TCL_GLOBAL_ONLY);
|
||||
#else
|
||||
Tcl_SetVar2(interp, "sqlite_options", "attach", "1", TCL_GLOBAL_ONLY);
|
||||
#endif
|
||||
|
||||
#ifdef SQLITE_OMIT_AUTHORIZATION
|
||||
Tcl_SetVar2(interp, "sqlite_options", "auth", "0", TCL_GLOBAL_ONLY);
|
||||
#else
|
||||
@ -4016,7 +4022,7 @@ static void set_options(Tcl_Interp *interp){
|
||||
Tcl_SetVar2(interp, "sqlite_options", "utf16", "1", TCL_GLOBAL_ONLY);
|
||||
#endif
|
||||
|
||||
#ifdef SQLITE_OMIT_VACUUM
|
||||
#if defined(SQLITE_OMIT_VACUUM) || defined(SQLITE_OMIT_ATTACH)
|
||||
Tcl_SetVar2(interp, "sqlite_options", "vacuum", "0", TCL_GLOBAL_ONLY);
|
||||
#else
|
||||
Tcl_SetVar2(interp, "sqlite_options", "vacuum", "1", TCL_GLOBAL_ONLY);
|
||||
|
@ -14,13 +14,13 @@
|
||||
** Most of the code in this file may be omitted by defining the
|
||||
** SQLITE_OMIT_VACUUM macro.
|
||||
**
|
||||
** $Id: vacuum.c,v 1.67 2007/03/06 16:03:56 danielk1977 Exp $
|
||||
** $Id: vacuum.c,v 1.68 2007/03/27 14:44:51 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "vdbeInt.h"
|
||||
#include "os.h"
|
||||
|
||||
#ifndef SQLITE_OMIT_VACUUM
|
||||
#if !defined(SQLITE_OMIT_VACUUM) && !defined(SQLITE_OMIT_ATTACH)
|
||||
/*
|
||||
** Execute zSql on database db. Return an error code.
|
||||
*/
|
||||
@ -271,4 +271,4 @@ end_of_vacuum:
|
||||
|
||||
return rc;
|
||||
}
|
||||
#endif /* SQLITE_OMIT_VACUUM */
|
||||
#endif /* SQLITE_OMIT_VACUUM && SQLITE_OMIT_ATTACH */
|
||||
|
@ -43,7 +43,7 @@
|
||||
** in this file for details. If in doubt, do not deviate from existing
|
||||
** commenting and indentation practices when changing or adding code.
|
||||
**
|
||||
** $Id: vdbe.c,v 1.593 2007/03/27 13:36:37 drh Exp $
|
||||
** $Id: vdbe.c,v 1.594 2007/03/27 14:44:51 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "os.h"
|
||||
@ -4511,7 +4511,7 @@ case OP_AggFinal: { /* no-push */
|
||||
}
|
||||
|
||||
|
||||
#ifndef SQLITE_OMIT_VACUUM
|
||||
#if !defined(SQLITE_OMIT_VACUUM) && !defined(SQLITE_OMIT_ATTACH)
|
||||
/* Opcode: Vacuum * * *
|
||||
**
|
||||
** Vacuum the entire database. This opcode will cause other virtual
|
||||
|
@ -15,7 +15,7 @@ static const char zHdr[] =
|
||||
"**\n"
|
||||
"** The code in this file has been automatically generated by\n"
|
||||
"**\n"
|
||||
"** $Header: /home/drh/sqlite/trans/cvs/sqlite/sqlite/tool/mkkeywordhash.c,v 1.25 2007/02/21 16:44:33 drh Exp $\n"
|
||||
"** $Header: /home/drh/sqlite/trans/cvs/sqlite/sqlite/tool/mkkeywordhash.c,v 1.26 2007/03/27 14:44:52 drh Exp $\n"
|
||||
"**\n"
|
||||
"** The code in this file implements a function that determines whether\n"
|
||||
"** or not a given identifier is really an SQL keyword. The same thing\n"
|
||||
@ -114,7 +114,7 @@ struct Keyword {
|
||||
#else
|
||||
# define TRIGGER 0x00002000
|
||||
#endif
|
||||
#ifdef SQLITE_OMIT_VACUUM
|
||||
#if defined(SQLITE_OMIT_VACUUM) || defined(SQLITE_OMIT_ATTACH)
|
||||
# define VACUUM 0
|
||||
#else
|
||||
# define VACUUM 0x00004000
|
||||
|
Loading…
x
Reference in New Issue
Block a user