MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / recoverOpenRecovery

Function recoverOpenRecovery

modules/dasSQLITE/sqlite/shell.c:14477–14486  ·  view source on GitHub ↗

** Attach the auxiliary database 'recovery' to the output database handle. ** This temporary database is used during the recovery process and then ** discarded. */

Source from the content-addressed store, hash-verified

14475** discarded.
14476*/
14477static void recoverOpenRecovery(sqlite3_recover *p){
14478 char *zSql = recoverMPrintf(p, "ATTACH %Q AS recovery;", p->zStateDb);
14479 recoverExec(p, p->dbOut, zSql);
14480 recoverExec(p, p->dbOut,
14481 "PRAGMA writable_schema = 1;"
14482 "CREATE TABLE recovery.map(pgno INTEGER PRIMARY KEY, parent INT);"
14483 "CREATE TABLE recovery.schema(type, name, tbl_name, rootpage, sql);"
14484 );
14485 sqlite3_free(zSql);
14486}
14487
14488
14489/*

Callers 1

recoverStepFunction · 0.85

Calls 2

recoverMPrintfFunction · 0.85
recoverExecFunction · 0.85

Tested by

no test coverage detected