1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

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:
drh
2007-03-27 14:44:50 +00:00
parent a4124a06cc
commit fdbcdee5ff
8 changed files with 41 additions and 28 deletions

View File

@@ -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
}
/*