** This function is a no-op if recover handle p already contains an error ** (if p->errCode!=SQLITE_OK). ** ** Otherwise, argument zFmt is used as a printf() style format string, ** along with any trailing arguments, to create an SQL statement. This ** SQL statement is prepared against database handle db and, if successful, ** the statment handle returned. Or, if an error occurs - either during *
| 13932 | ** error code and message are left in the recover handle. |
| 13933 | */ |
| 13934 | static sqlite3_stmt *recoverPreparePrintf( |
| 13935 | sqlite3_recover *p, |
| 13936 | sqlite3 *db, |
| 13937 | const char *zFmt, ... |
| 13938 | ){ |
| 13939 | sqlite3_stmt *pStmt = 0; |
| 13940 | if( p->errCode==SQLITE_OK ){ |
| 13941 | va_list ap; |
| 13942 | char *z; |
| 13943 | va_start(ap, zFmt); |
| 13944 | z = sqlite3_vmprintf(zFmt, ap); |
| 13945 | va_end(ap); |
| 13946 | if( z==0 ){ |
| 13947 | p->errCode = SQLITE_NOMEM; |
| 13948 | }else{ |
| 13949 | pStmt = recoverPrepare(p, db, z); |
| 13950 | sqlite3_free(z); |
| 13951 | } |
| 13952 | } |
| 13953 | return pStmt; |
| 13954 | } |
| 13955 | |
| 13956 | /* |
| 13957 | ** Reset SQLite statement handle pStmt. If the call to sqlite3_reset() |
no test coverage detected