Restructure and simplify the feature-detection #defines of the recovery support in shell.c.in and disable it when building fiddle because it uses features we elide from the wasm build (e.g. utf16), leading to link errors.
FossilOrigin-Name: ddd10c05c5d16d7205c347c5c1e73a75faecb2b7ec88a4a15875856765e1b143
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
C Expose\ssqlite3_randomness()\sto\sWASM\sand\sadd\sa\scustom\sbinding\sfor\sit\swhich\scan\spopulate\sa\sJS\sbyte\sarray.\sAdd\sWhWasmUtil.isPtr().
|
||||
D 2022-10-27T03:03:16.460
|
||||
C Restructure\sand\ssimplify\sthe\sfeature-detection\s#defines\sof\sthe\srecovery\ssupport\sin\sshell.c.in\sand\sdisable\sit\swhen\sbuilding\sfiddle\sbecause\sit\suses\sfeatures\swe\selide\sfrom\sthe\swasm\sbuild\s(e.g.\sutf16),\sleading\sto\slink\serrors.
|
||||
D 2022-10-27T03:56:01.987
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
@@ -636,7 +636,7 @@ F src/random.c 546d6feb15ec69c1aafe9bb351a277cbb498fd5410e646add673acb805714960
|
||||
F src/resolve.c efea4e5fbecfd6d0a9071b0be0d952620991673391b6ffaaf4c277b0bb674633
|
||||
F src/rowset.c ba9515a922af32abe1f7d39406b9d35730ed65efab9443dc5702693b60854c92
|
||||
F src/select.c 8a709a8e19b32d2c411eaae1a10e2ee214cf740288859a9f9a362fcb2f50eaf1
|
||||
F src/shell.c.in c4497295b826971f35a7ec77c5fb33aea192c935d670a690cec71379b007eca4
|
||||
F src/shell.c.in cd16f24f755460f1168672dee4eff3d3cbf08057ef3f6fbe15b965fbd689d2f2
|
||||
F src/sqlite.h.in d9c8a6243fc0a1c270d69db33758e34b810af3462f9bc5b4af113b347e07c69d
|
||||
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
|
||||
F src/sqlite3ext.h 5336beea1868d99d2f62e628dbea55e97267dbff8193291ab175e960c5df9141
|
||||
@@ -2052,8 +2052,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 346a3b12b861ce7ba369e98cd336f79a1d4f7a7bb9acd7a4f63f37b391755bf5
|
||||
R 5867ff413088cae7742d2b15dc451b3e
|
||||
P 333e67076b4bc967bb543ef8e265c63f6e3498c38ac121a7d1eff4a1d7a71c63
|
||||
R c4eec01d7f5a0771483022a51027cd3b
|
||||
U stephan
|
||||
Z c456212142f768a2abd7eb0069fb1a57
|
||||
Z f124a6c3a0b7b44b68f7fc7038529120
|
||||
# Remove this line to create a well-formed Fossil manifest.
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
333e67076b4bc967bb543ef8e265c63f6e3498c38ac121a7d1eff4a1d7a71c63
|
||||
ddd10c05c5d16d7205c347c5c1e73a75faecb2b7ec88a4a15875856765e1b143
|
||||
+19
-10
@@ -1057,7 +1057,17 @@ 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)
|
||||
#if !defined(SQLITE_OMIT_VIRTUALTABLE) \
|
||||
&& defined(SQLITE_ENABLE_DBPAGE_VTAB) \
|
||||
&& !defined(SQLITE_SHELL_FIDDLE)
|
||||
/* Including the recovery API causes the fiddle build to fail because
|
||||
** recovery-related code invokes mutex- and UTF16-related APIs which
|
||||
** we specifically disable in the wasm builds. */
|
||||
#define SQLITE_SHELL_HAVE_RECOVER 1
|
||||
#else
|
||||
#define SQLITE_SHELL_HAVE_RECOVER 0
|
||||
#endif
|
||||
#if SQLITE_SHELL_HAVE_RECOVER
|
||||
INCLUDE ../ext/recover/dbdata.c
|
||||
INCLUDE ../ext/recover/sqlite3recover.h
|
||||
INCLUDE ../ext/recover/sqlite3recover.c
|
||||
@@ -4357,7 +4367,7 @@ static const char *(azHelp[]) = {
|
||||
".connection [close] [#] Open or close an auxiliary database connection",
|
||||
".databases List names and files of attached databases",
|
||||
".dbconfig ?op? ?val? List or change sqlite3_db_config() options",
|
||||
#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
|
||||
#if SQLITE_SHELL_HAVE_RECOVER
|
||||
".dbinfo ?DB? Show status information about the database",
|
||||
#endif
|
||||
".dump ?OBJECTS? Render database content as SQL",
|
||||
@@ -4505,7 +4515,7 @@ static const char *(azHelp[]) = {
|
||||
".read FILE Read input from FILE or command output",
|
||||
" If FILE begins with \"|\", it is a command that generates the input.",
|
||||
#endif
|
||||
#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
|
||||
#if SQLITE_SHELL_HAVE_RECOVER
|
||||
".recover Recover as much data as possible from corrupt db.",
|
||||
" --freelist-corrupt Assume the freelist is corrupt",
|
||||
" --recovery-db NAME Store recovery metadata in database file NAME",
|
||||
@@ -5120,7 +5130,7 @@ static void open_db(ShellState *p, int openFlags){
|
||||
sqlite3_fileio_init(p->db, 0, 0);
|
||||
sqlite3_completion_init(p->db, 0, 0);
|
||||
#endif
|
||||
#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
|
||||
#if SQLITE_SHELL_HAVE_RECOVER
|
||||
sqlite3_dbdata_init(p->db, 0, 0);
|
||||
#endif
|
||||
#ifdef SQLITE_HAVE_ZLIB
|
||||
@@ -6005,8 +6015,7 @@ static int shell_dbinfo_command(ShellState *p, int nArg, char **azArg){
|
||||
utf8_printf(p->out, "%-20s %u\n", "data version", iDataVersion);
|
||||
return 0;
|
||||
}
|
||||
#endif /* !defined(SQLITE_OMIT_VIRTUALTABLE)
|
||||
&& defined(SQLITE_ENABLE_DBPAGE_VTAB) */
|
||||
#endif /* SQLITE_SHELL_HAVE_RECOVER */
|
||||
|
||||
/*
|
||||
** Print the current sqlite3_errmsg() value to stderr and return 1.
|
||||
@@ -7279,7 +7288,7 @@ end_ar_command:
|
||||
*******************************************************************************/
|
||||
#endif /* !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB) */
|
||||
|
||||
#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
|
||||
#if SQLITE_SHELL_HAVE_RECOVER
|
||||
|
||||
/*
|
||||
** This function is used as a callback by the recover extension. Simply
|
||||
@@ -7349,7 +7358,7 @@ static int recoverDatabaseCmd(ShellState *pState, int nArg, char **azArg){
|
||||
rc = sqlite3_recover_finish(p);
|
||||
return rc;
|
||||
}
|
||||
#endif /* !(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB) */
|
||||
#endif /* SQLITE_SHELL_HAVE_RECOVER */
|
||||
|
||||
|
||||
/*
|
||||
@@ -7941,7 +7950,7 @@ static int do_meta_command(char *zLine, ShellState *p){
|
||||
}
|
||||
}else
|
||||
|
||||
#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
|
||||
#if SQLITE_SHELL_HAVE_RECOVER
|
||||
if( c=='d' && n>=3 && cli_strncmp(azArg[0], "dbinfo", n)==0 ){
|
||||
rc = shell_dbinfo_command(p, nArg, azArg);
|
||||
}else
|
||||
@@ -7950,7 +7959,7 @@ static int do_meta_command(char *zLine, ShellState *p){
|
||||
open_db(p, 0);
|
||||
rc = recoverDatabaseCmd(p, nArg, azArg);
|
||||
}else
|
||||
#endif /* !(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB) */
|
||||
#endif /* SQLITE_SHELL_HAVE_RECOVER */
|
||||
|
||||
if( c=='d' && cli_strncmp(azArg[0], "dump", n)==0 ){
|
||||
char *zLike = 0;
|
||||
|
||||
Reference in New Issue
Block a user