** This function is a no-op if recover handle p already contains an error ** (if p->errCode!=SQLITE_OK). Zero is returned in this case. ** ** Otherwise, execute "PRAGMA page_count" against the input database. If ** successful, return the integer result. Or, if an error occurs, leave an ** error code and error message in the sqlite3_recover handle and return ** zero. */
| 14059 | ** zero. |
| 14060 | */ |
| 14061 | static i64 recoverPageCount(sqlite3_recover *p){ |
| 14062 | i64 nPg = 0; |
| 14063 | if( p->errCode==SQLITE_OK ){ |
| 14064 | sqlite3_stmt *pStmt = 0; |
| 14065 | pStmt = recoverPreparePrintf(p, p->dbIn, "PRAGMA %Q.page_count", p->zDb); |
| 14066 | if( pStmt ){ |
| 14067 | sqlite3_step(pStmt); |
| 14068 | nPg = sqlite3_column_int64(pStmt, 0); |
| 14069 | } |
| 14070 | recoverFinalize(p, pStmt); |
| 14071 | } |
| 14072 | return nPg; |
| 14073 | } |
| 14074 | |
| 14075 | /* |
| 14076 | ** Implementation of SQL scalar function "read_i32". The first argument to |
no test coverage detected