** This function is a no-op if recover handle p already contains an error ** (if p->errCode!=SQLITE_OK). ** ** Otherwise, it attempts to prepare the SQL statement in zSql against ** database handle db. If successful, the statement handle is returned. ** Or, if an error occurs, NULL is returned and an error left in the ** recover handle. */
| 13907 | ** recover handle. |
| 13908 | */ |
| 13909 | static sqlite3_stmt *recoverPrepare( |
| 13910 | sqlite3_recover *p, |
| 13911 | sqlite3 *db, |
| 13912 | const char *zSql |
| 13913 | ){ |
| 13914 | sqlite3_stmt *pStmt = 0; |
| 13915 | if( p->errCode==SQLITE_OK ){ |
| 13916 | if( sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0) ){ |
| 13917 | recoverDbError(p, db); |
| 13918 | } |
| 13919 | } |
| 13920 | return pStmt; |
| 13921 | } |
| 13922 | |
| 13923 | /* |
| 13924 | ** This function is a no-op if recover handle p already contains an error |
no test coverage detected