Merge trunk changes into covering-index-expr branch.
FossilOrigin-Name: 89d775ada39aed4dc532374ace02156d07dc06e8ae54a194608af0c5a582d20f
This commit is contained in:
+34
-1
@@ -1072,6 +1072,9 @@ INCLUDE ../ext/recover/dbdata.c
|
||||
INCLUDE ../ext/recover/sqlite3recover.c
|
||||
# endif
|
||||
#endif
|
||||
#ifdef SQLITE_SHELL_EXTSRC
|
||||
# include SHELL_STRINGIFY(SQLITE_SHELL_EXTSRC)
|
||||
#endif
|
||||
|
||||
#if defined(SQLITE_ENABLE_SESSION)
|
||||
/*
|
||||
@@ -5117,6 +5120,7 @@ static void open_db(ShellState *p, int openFlags){
|
||||
}
|
||||
exit(1);
|
||||
}
|
||||
|
||||
#ifndef SQLITE_OMIT_LOAD_EXTENSION
|
||||
sqlite3_enable_load_extension(p->db, 1);
|
||||
#endif
|
||||
@@ -5139,6 +5143,34 @@ static void open_db(ShellState *p, int openFlags){
|
||||
sqlite3_sqlar_init(p->db, 0, 0);
|
||||
}
|
||||
#endif
|
||||
#ifdef SQLITE_SHELL_EXTFUNCS
|
||||
/* Create a preprocessing mechanism for extensions to make
|
||||
* their own provisions for being built into the shell.
|
||||
* This is a short-span macro. See further below for usage.
|
||||
*/
|
||||
#define SHELL_SUB_MACRO(base, variant) base ## _ ## variant
|
||||
#define SHELL_SUBMACRO(base, variant) SHELL_SUB_MACRO(base, variant)
|
||||
/* Let custom-included extensions get their ..._init() called.
|
||||
* The WHATEVER_INIT( db, pzErrorMsg, pApi ) macro should cause
|
||||
* the extension's sqlite3_*_init( db, pzErrorMsg, pApi )
|
||||
* inititialization routine to be called.
|
||||
*/
|
||||
{
|
||||
int irc = SHELL_SUBMACRO(SQLITE_SHELL_EXTFUNCS, INIT)(p->db);
|
||||
/* Let custom-included extensions expose their functionality.
|
||||
* The WHATEVER_EXPOSE( db, pzErrorMsg ) macro should cause
|
||||
* the SQL functions, virtual tables, collating sequences or
|
||||
* VFS's implemented by the extension to be registered.
|
||||
*/
|
||||
if( irc==SQLITE_OK
|
||||
|| irc==SQLITE_OK_LOAD_PERMANENTLY ){
|
||||
SHELL_SUBMACRO(SQLITE_SHELL_EXTFUNCS, EXPOSE)(p->db, 0);
|
||||
}
|
||||
#undef SHELL_SUB_MACRO
|
||||
#undef SHELL_SUBMACRO
|
||||
}
|
||||
#endif
|
||||
|
||||
sqlite3_create_function(p->db, "shell_add_schema", 3, SQLITE_UTF8, 0,
|
||||
shellAddSchemaName, 0, 0);
|
||||
sqlite3_create_function(p->db, "shell_module_schema", 1, SQLITE_UTF8, 0,
|
||||
@@ -5159,6 +5191,7 @@ static void open_db(ShellState *p, int openFlags){
|
||||
sqlite3_create_function(p->db, "edit", 2, SQLITE_UTF8, 0,
|
||||
editFunc, 0, 0);
|
||||
#endif
|
||||
|
||||
if( p->openMode==SHELL_OPEN_ZIPFILE ){
|
||||
char *zSql = sqlite3_mprintf(
|
||||
"CREATE VIRTUAL TABLE zip USING zipfile(%Q);", zDbFilename);
|
||||
@@ -10658,7 +10691,7 @@ static int do_meta_command(char *zLine, ShellState *p){
|
||||
}
|
||||
}else{
|
||||
output_file_close(p->traceOut);
|
||||
p->traceOut = output_file_open(azArg[1], 0);
|
||||
p->traceOut = output_file_open(z, 0);
|
||||
}
|
||||
}
|
||||
if( p->traceOut==0 ){
|
||||
|
||||
@@ -7709,6 +7709,7 @@ static int SQLITE_TCLAPI tclLoadStaticExtensionCmd(
|
||||
){
|
||||
extern int sqlite3_amatch_init(sqlite3*,char**,const sqlite3_api_routines*);
|
||||
extern int sqlite3_appendvfs_init(sqlite3*,char**,const sqlite3_api_routines*);
|
||||
extern int sqlite3_basexx_init(sqlite3*,char**,const sqlite3_api_routines*);
|
||||
extern int sqlite3_carray_init(sqlite3*,char**,const sqlite3_api_routines*);
|
||||
extern int sqlite3_closure_init(sqlite3*,char**,const sqlite3_api_routines*);
|
||||
extern int sqlite3_csv_init(sqlite3*,char**,const sqlite3_api_routines*);
|
||||
@@ -7740,6 +7741,7 @@ static int SQLITE_TCLAPI tclLoadStaticExtensionCmd(
|
||||
} aExtension[] = {
|
||||
{ "amatch", sqlite3_amatch_init },
|
||||
{ "appendvfs", sqlite3_appendvfs_init },
|
||||
{ "basexx", sqlite3_basexx_init },
|
||||
{ "carray", sqlite3_carray_init },
|
||||
{ "closure", sqlite3_closure_init },
|
||||
{ "csv", sqlite3_csv_init },
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ Trigger *sqlite3TriggerList(Parse *pParse, Table *pTab){
|
||||
if( pTrig->pTabSchema==pTab->pSchema
|
||||
&& pTrig->table
|
||||
&& 0==sqlite3StrICmp(pTrig->table, pTab->zName)
|
||||
&& pTrig->pTabSchema!=pTmpSchema
|
||||
&& (pTrig->pTabSchema!=pTmpSchema || pTrig->bReturning)
|
||||
){
|
||||
pTrig->pNext = pList;
|
||||
pList = pTrig;
|
||||
|
||||
Reference in New Issue
Block a user