** Implementation of SQL scalar function "page_is_used". This function ** is used as part of the procedure for locating orphan rows for the ** lost-and-found table, and it depends on those routines having populated ** the sqlite3_recover.laf.pUsed variable. ** ** The only argument to this function is a page-number. It returns true ** if the page has already been used somehow during data recovery,
| 14117 | ** SELECT page_is_used(<pgno>); |
| 14118 | */ |
| 14119 | static void recoverPageIsUsed( |
| 14120 | sqlite3_context *pCtx, |
| 14121 | int nArg, |
| 14122 | sqlite3_value **apArg |
| 14123 | ){ |
| 14124 | sqlite3_recover *p = (sqlite3_recover*)sqlite3_user_data(pCtx); |
| 14125 | i64 pgno = sqlite3_value_int64(apArg[0]); |
| 14126 | assert( nArg==1 ); |
| 14127 | sqlite3_result_int(pCtx, recoverBitmapQuery(p->laf.pUsed, pgno)); |
| 14128 | } |
| 14129 | |
| 14130 | /* |
| 14131 | ** The implementation of a user-defined SQL function invoked by the |
nothing calls this directly
no test coverage detected