** Attach the auxiliary database 'recovery' to the output database handle. ** This temporary database is used during the recovery process and then ** discarded. */
| 14475 | ** discarded. |
| 14476 | */ |
| 14477 | static 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 | /* |
no test coverage detected