Fix building the shell with SQLITE_OMIT_VIRTUAL_TABLE. And without SQLITE_ENABLE_DBPAGE_VTAB.
FossilOrigin-Name: 425d708c3908fe74f69b62e6dd1722a0018088977e12f14b312dad1df0fbb804
This commit is contained in:
parent
0aa01ee42c
commit
1b16216f9e
@ -75,7 +75,6 @@
|
||||
#include "sqlite3ext.h"
|
||||
|
||||
typedef unsigned char u8;
|
||||
typedef unsigned long u32;
|
||||
|
||||
#endif
|
||||
SQLITE_EXTENSION_INIT1
|
||||
@ -313,7 +312,7 @@ static unsigned int get_uint32(unsigned char *a){
|
||||
*/
|
||||
static int dbdataLoadPage(
|
||||
DbdataCursor *pCsr, /* Cursor object */
|
||||
u32 pgno, /* Page number of page to load */
|
||||
unsigned int pgno, /* Page number of page to load */
|
||||
u8 **ppPage, /* OUT: pointer to page buffer */
|
||||
int *pnPage /* OUT: Size of (*ppPage) in bytes */
|
||||
){
|
||||
@ -556,7 +555,7 @@ static int dbdataNext(sqlite3_vtab_cursor *pCursor){
|
||||
/* Load content from overflow pages */
|
||||
if( nPayload>nLocal ){
|
||||
sqlite3_int64 nRem = nPayload - nLocal;
|
||||
u32 pgnoOvfl = get_uint32(&pCsr->aPage[iOff]);
|
||||
unsigned int pgnoOvfl = get_uint32(&pCsr->aPage[iOff]);
|
||||
while( nRem>0 ){
|
||||
u8 *aOvfl = 0;
|
||||
int nOvfl = 0;
|
||||
|
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C Add\scomments\sand\sfix\sformatting\sissues\sin\snew\scode\sin\sshell.c.in.
|
||||
D 2019-04-27T19:36:49.564
|
||||
C Fix\sbuilding\sthe\sshell\swith\sSQLITE_OMIT_VIRTUAL_TABLE.\sAnd\swithout\sSQLITE_ENABLE_DBPAGE_VTAB.
|
||||
D 2019-04-27T20:15:15.393
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
@ -284,7 +284,7 @@ F ext/misc/closure.c dbfd8543b2a017ae6b1a5843986b22ddf99ff126ec9634a2f4047cd14c8
|
||||
F ext/misc/completion.c cec672d40604075bb341a7f11ac48393efdcd90a979269b8fe7977ea62d0547f
|
||||
F ext/misc/compress.c dd4f8a6d0baccff3c694757db5b430f3bbd821d8686d1fc24df55cf9f035b189
|
||||
F ext/misc/csv.c 7f047aeb68f5802e7ce6639292095d622a488bb43526ed04810e0649faa71ceb
|
||||
F ext/misc/dbdata.c fe978dad2df13dd4b377b5d38f4883282801b18711220a229d0fd266a5deab26
|
||||
F ext/misc/dbdata.c 1b3751b02d8f575d25c6bda358670d2e39ace368a0d05595989c308a10c615f6
|
||||
F ext/misc/dbdump.c baf6e37447c9d6968417b1cd34cbedb0b0ab3f91b5329501d8a8d5be3287c336
|
||||
F ext/misc/eval.c 4b4757592d00fd32e44c7a067e6a0e4839c81a4d57abc4131ee7806d1be3104e
|
||||
F ext/misc/explain.c d5c12962d79913ef774b297006872af1fccda388f61a11d37758f9179a09551f
|
||||
@ -520,7 +520,7 @@ F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
|
||||
F src/resolve.c 567888ee3faec14dae06519b4306201771058364a37560186a3e0e755ebc4cb8
|
||||
F src/rowset.c d977b011993aaea002cab3e0bb2ce50cf346000dff94e944d547b989f4b1fe93
|
||||
F src/select.c b7304d2f491c11a03a7fbdf34bc218282ac54052377809d4dc3b4b1e7f4bfc93
|
||||
F src/shell.c.in 2316b9ee7a43e6f127e5abe8d74d69b92f6bbae1be38826ffb58384aab832013
|
||||
F src/shell.c.in 104bbae904a2b67bc6c0c95337447544d15d0594dc46468608aae769d5f51da9
|
||||
F src/sqlite.h.in 38390767acc1914d58930e03149595ee4710afa4e3c43ab6c3a8aea3f1a6b8cd
|
||||
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
|
||||
F src/sqlite3ext.h 9ecc93b8493bd20c0c07d52e2ac0ed8bab9b549c7f7955b59869597b650dd8b5
|
||||
@ -1821,7 +1821,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 67bb88e24c74d02ae0c4ac6ff2f873f6b0035ccefe5cccfc71c5686cbc76b4c3
|
||||
R 1520b643c98e19ff415724ed970cd8b1
|
||||
P b91d819bd16de43fc99e379da0ba9c915b0c5afc68e804a50c3c1662c1f9a740
|
||||
R dcbe5105dfc58103275280fa56f0f458
|
||||
U dan
|
||||
Z 3d67e0e6129b0deb0a86f6c6a9eda8ce
|
||||
Z a7824dfb7c5c59a3dfb17eb398274a3e
|
||||
|
@ -1 +1 @@
|
||||
b91d819bd16de43fc99e379da0ba9c915b0c5afc68e804a50c3c1662c1f9a740
|
||||
425d708c3908fe74f69b62e6dd1722a0018088977e12f14b312dad1df0fbb804
|
@ -948,7 +948,9 @@ INCLUDE ../ext/misc/sqlar.c
|
||||
INCLUDE ../ext/expert/sqlite3expert.h
|
||||
INCLUDE ../ext/expert/sqlite3expert.c
|
||||
|
||||
#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
|
||||
INCLUDE ../ext/misc/dbdata.c
|
||||
#endif
|
||||
|
||||
#if defined(SQLITE_ENABLE_SESSION)
|
||||
/*
|
||||
@ -3576,7 +3578,9 @@ static const char *(azHelp[]) = {
|
||||
".prompt MAIN CONTINUE Replace the standard prompts",
|
||||
".quit Exit this program",
|
||||
".read FILE Read input from FILE",
|
||||
#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
|
||||
".recover Recover as much data as possible from corrupt db.",
|
||||
#endif
|
||||
".restore ?DB? FILE Restore content of DB (default \"main\") from FILE",
|
||||
".save FILE Write in-memory database into FILE",
|
||||
".scanstats on|off Turn sqlite3_stmt_scanstatus() metrics on or off",
|
||||
@ -4121,7 +4125,9 @@ static void open_db(ShellState *p, int openFlags){
|
||||
sqlite3_fileio_init(p->db, 0, 0);
|
||||
sqlite3_shathree_init(p->db, 0, 0);
|
||||
sqlite3_completion_init(p->db, 0, 0);
|
||||
#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
|
||||
sqlite3_dbdata_init(p->db, 0, 0);
|
||||
#endif
|
||||
#ifdef SQLITE_HAVE_ZLIB
|
||||
sqlite3_zipfile_init(p->db, 0, 0);
|
||||
sqlite3_sqlar_init(p->db, 0, 0);
|
||||
@ -5390,10 +5396,7 @@ static int lintDotCommand(
|
||||
return SQLITE_ERROR;
|
||||
}
|
||||
|
||||
#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB)
|
||||
/*********************************************************************************
|
||||
** The ".archive" or ".ar" command.
|
||||
*/
|
||||
#if !defined SQLITE_OMIT_VIRTUALTABLE
|
||||
static void shellPrepare(
|
||||
sqlite3 *db,
|
||||
int *pRc,
|
||||
@ -5464,6 +5467,12 @@ static void shellReset(
|
||||
*pRc = rc;
|
||||
}
|
||||
}
|
||||
#endif /* !defined SQLITE_OMIT_VIRTUALTABLE */
|
||||
|
||||
#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB)
|
||||
/*********************************************************************************
|
||||
** The ".archive" or ".ar" command.
|
||||
*/
|
||||
/*
|
||||
** Structure representing a single ".ar" command.
|
||||
*/
|
||||
@ -6153,6 +6162,7 @@ end_ar_command:
|
||||
**********************************************************************************/
|
||||
#endif /* !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB) */
|
||||
|
||||
#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
|
||||
/*
|
||||
** If (*pRc) is not SQLITE_OK when this function is called, it is a no-op.
|
||||
** Otherwise, the SQL statement or statements in zSql are executed using
|
||||
@ -6775,6 +6785,7 @@ static int recoverDatabaseCmd(ShellState *pState, int nArg, char **azArg){
|
||||
sqlite3_exec(pState->db, "DETACH recovery", 0, 0, 0);
|
||||
return rc;
|
||||
}
|
||||
#endif /* !(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB) */
|
||||
|
||||
|
||||
/*
|
||||
@ -7063,10 +7074,12 @@ static int do_meta_command(char *zLine, ShellState *p){
|
||||
rc = shell_dbinfo_command(p, nArg, azArg);
|
||||
}else
|
||||
|
||||
#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
|
||||
if( c=='r' && strncmp(azArg[0], "recover", n)==0 ){
|
||||
open_db(p, 0);
|
||||
rc = recoverDatabaseCmd(p, nArg, azArg);
|
||||
}else
|
||||
#endif /* !(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB) */
|
||||
|
||||
if( c=='d' && strncmp(azArg[0], "dump", n)==0 ){
|
||||
const char *zLike = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user