Make the ".dump" command of the CLI more robust against malformed databases.

See [forum:/forumpost/730b554179|forum post 730b554179].

FossilOrigin-Name: 0573edfb9e0b1fd51e8da20592c71b02040968c33fdec41c31a6b1b7d3e83262
This commit is contained in:
drh 2022-10-25 13:42:10 +00:00
parent 89954fe7ce
commit d5ca2c4b3d
3 changed files with 10 additions and 8 deletions

View File

@ -1,5 +1,5 @@
C Minor\sdoc\stweaks\sin\sthe\sJS\sGNUmakefile.
D 2022-10-25T08:41:00.214
C Make\sthe\s".dump"\scommand\sof\sthe\sCLI\smore\srobust\sagainst\smalformed\sdatabases.\nSee\s[forum:/forumpost/730b554179|forum\spost\s730b554179].
D 2022-10-25T13:42:10.151
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -621,7 +621,7 @@ F src/random.c 546d6feb15ec69c1aafe9bb351a277cbb498fd5410e646add673acb805714960
F src/resolve.c efea4e5fbecfd6d0a9071b0be0d952620991673391b6ffaaf4c277b0bb674633
F src/rowset.c ba9515a922af32abe1f7d39406b9d35730ed65efab9443dc5702693b60854c92
F src/select.c e5b6f930f068c9c5362fc76c704ae5cb5ef1e3f18759c2126f23b0cf04c0e263
F src/shell.c.in 97f4ee3966d7d8ffcd976658ea3b92bc9a670eb988d2e8aeb2243789631689a6
F src/shell.c.in 35873039518a51ce5c5a944183a82f615942ffc3923f41b8afe7d6289a28fdb6
F src/sqlite.h.in d9c8a6243fc0a1c270d69db33758e34b810af3462f9bc5b4af113b347e07c69d
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
F src/sqlite3ext.h 5336beea1868d99d2f62e628dbea55e97267dbff8193291ab175e960c5df9141
@ -2037,8 +2037,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 ecf906b07f50b4fcc551d20326a1bb1189bd6c2274627fd293f9460658ebea07
R 262377d6cc8a0c78206bc5c74f7073d2
U stephan
Z a0e24ff084335de60676ee440f409f2e
P 9c8df130b8137cb4705f805907d1ff754d7f4b07bf181e1d05f1798b7aa5f4f6
R 23401c751a5369145738c4b7f745d240
U drh
Z 40633614ee3a7dbce2fa03715269ae26
# Remove this line to create a well-formed Fossil manifest.

View File

@ -1 +1 @@
9c8df130b8137cb4705f805907d1ff754d7f4b07bf181e1d05f1798b7aa5f4f6
0573edfb9e0b1fd51e8da20592c71b02040968c33fdec41c31a6b1b7d3e83262

View File

@ -4161,6 +4161,8 @@ static int dump_callback(void *pArg, int nArg, char **azArg, char **azNotUsed){
zTable = azArg[0];
zType = azArg[1];
zSql = azArg[2];
if( zTable==0 ) return 0;
if( zType==0 ) return 0;
dataOnly = (p->shellFlgs & SHFLG_DumpDataOnly)!=0;
noSys = (p->shellFlgs & SHFLG_DumpNoSys)!=0;