diff options
author | drh <> | 2022-11-02 14:08:26 +0000 |
---|---|---|
committer | drh <> | 2022-11-02 14:08:26 +0000 |
commit | 2cdcc7f01a30d75b9534213c1a0793af3f71ef3b (patch) | |
tree | 6c3eab7f6db6a77e9280e6e9b8fa7733f8018ab4 /src | |
parent | 12de518db46e0a83c9bb812c9127177e7ca52ad4 (diff) | |
download | sqlite-2cdcc7f01a30d75b9534213c1a0793af3f71ef3b.tar.gz sqlite-2cdcc7f01a30d75b9534213c1a0793af3f71ef3b.zip |
Clarify documentation regarding the --recovery-db option to ".recover" and
the magic 789 configuration option it is associated with.
FossilOrigin-Name: f6fa0cffa921ccde8910e7fa4a63c2e4ef8ddb376c8ce99e436b27ac332c4498
Diffstat (limited to 'src')
-rw-r--r-- | src/shell.c.in | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/shell.c.in b/src/shell.c.in index 94be71be2..635361aa9 100644 --- a/src/shell.c.in +++ b/src/shell.c.in @@ -4515,7 +4515,6 @@ static const char *(azHelp[]) = { #if SQLITE_SHELL_HAVE_RECOVER ".recover Recover as much data as possible from corrupt db.", " --ignore-freelist Ignore pages that appear to be on db freelist", - " --recovery-db NAME Store recovery metadata in database file NAME", " --lost-and-found TABLE Alternative name for the lost-and-found table", " --no-rowids Do not attempt to recover rowid values", " that are not also INTEGER PRIMARY KEYs", @@ -7304,7 +7303,7 @@ static int recoverSqlCb(void *pCtx, const char *zSql){ */ static int recoverDatabaseCmd(ShellState *pState, int nArg, char **azArg){ int rc = SQLITE_OK; - const char *zRecoveryDb = ""; /* Name of "recovery" database */ + const char *zRecoveryDb = ""; /* Name of "recovery" database. Debug only */ const char *zLAF = "lost_and_found"; int bFreelist = 1; /* 0 if --ignore-freelist is specified */ int bRowids = 1; /* 0 if --no-rowids */ @@ -7320,6 +7319,11 @@ static int recoverDatabaseCmd(ShellState *pState, int nArg, char **azArg){ bFreelist = 0; }else if( n<=12 && memcmp("-recovery-db", z, n)==0 && i<(nArg-1) ){ + /* This option determines the name of the ATTACH-ed database used + ** internally by the recovery extension. The default is "" which + ** means to use a temporary database that is automatically deleted + ** when closed. This option is undocumented and might disappear at + ** any moment. */ i++; zRecoveryDb = azArg[i]; }else @@ -7341,7 +7345,7 @@ static int recoverDatabaseCmd(ShellState *pState, int nArg, char **azArg){ pState->db, "main", recoverSqlCb, (void*)pState ); - sqlite3_recover_config(p, 789, (void*)zRecoveryDb); + sqlite3_recover_config(p, 789, (void*)zRecoveryDb); /* Debug use only */ sqlite3_recover_config(p, SQLITE_RECOVER_LOST_AND_FOUND, (void*)zLAF); sqlite3_recover_config(p, SQLITE_RECOVER_ROWIDS, (void*)&bRowids); sqlite3_recover_config(p, SQLITE_RECOVER_FREELIST_CORRUPT,(void*)&bFreelist); |