Lines Matching refs:pCheck

9935   Expr *pCheck;        /* The AND of all CHECK constraints */  member
55707 IntegrityCk *pCheck,
55713 if( !pCheck->mxErr ) return;
55714 pCheck->mxErr--;
55715 pCheck->nErr++;
55717 if( pCheck->errMsg.nChar ){
55718 sqlite3StrAccumAppend(&pCheck->errMsg, "\n", 1);
55721 sqlite3StrAccumAppend(&pCheck->errMsg, zMsg1, -1);
55723 sqlite3VXPrintf(&pCheck->errMsg, 1, zFormat, ap);
55725 if( pCheck->errMsg.mallocFailed ){
55726 pCheck->mallocFailed = 1;
55740 static int checkRef(IntegrityCk *pCheck, Pgno iPage, char *zContext){
55742 if( iPage>pCheck->nPage ){
55743 checkAppendMsg(pCheck, zContext, "invalid page number %d", iPage);
55746 if( pCheck->anRef[iPage]==1 ){
55747 checkAppendMsg(pCheck, zContext, "2nd reference to page %d", iPage);
55750 return (pCheck->anRef[iPage]++)>1;
55760 IntegrityCk *pCheck, /* Integrity check context */
55770 rc = ptrmapGet(pCheck->pBt, iChild, &ePtrmapType, &iPtrmapParent);
55772 if( rc==SQLITE_NOMEM || rc==SQLITE_IOERR_NOMEM ) pCheck->mallocFailed = 1;
55773 checkAppendMsg(pCheck, zContext, "Failed to read ptrmap key=%d", iChild);
55778 checkAppendMsg(pCheck, zContext,
55790 IntegrityCk *pCheck, /* Integrity checking context */
55799 while( N-- > 0 && pCheck->mxErr ){
55803 checkAppendMsg(pCheck, zContext,
55808 if( checkRef(pCheck, iPage, zContext) ) break;
55809 if( sqlite3PagerGet(pCheck->pPager, (Pgno)iPage, &pOvflPage) ){
55810 checkAppendMsg(pCheck, zContext, "failed to get page %d", iPage);
55817 if( pCheck->pBt->autoVacuum ){
55818 checkPtrmap(pCheck, iPage, PTRMAP_FREEPAGE, 0, zContext);
55821 if( n>(int)pCheck->pBt->usableSize/4-2 ){
55822 checkAppendMsg(pCheck, zContext,
55829 if( pCheck->pBt->autoVacuum ){
55830 checkPtrmap(pCheck, iFreePage, PTRMAP_FREEPAGE, 0, zContext);
55833 checkRef(pCheck, iFreePage, zContext);
55844 if( pCheck->pBt->autoVacuum && N>0 ){
55846 checkPtrmap(pCheck, i, PTRMAP_OVERFLOW2, iPage, zContext);
55876 IntegrityCk *pCheck, /* Context for the sanity check */
55898 pBt = pCheck->pBt;
55901 if( checkRef(pCheck, iPage, zParentContext) ) return 0;
55903 checkAppendMsg(pCheck, zContext,
55913 checkAppendMsg(pCheck, zContext,
55922 for(i=0; i<pPage->nCell && pCheck->mxErr; i++){
55940 checkAppendMsg(pCheck, zContext,
55953 checkPtrmap(pCheck, pgnoOvfl, PTRMAP_OVERFLOW1, iPage, zContext);
55956 checkList(pCheck, 0, pgnoOvfl, nPage, zContext);
55965 checkPtrmap(pCheck, pgno, PTRMAP_BTREE, iPage, zContext);
55968 d2 = checkTreePage(pCheck, pgno, zContext, &nMinKey, i==0 ? NULL : &nMaxKey);
55970 checkAppendMsg(pCheck, zContext, "Child page depth differs");
55982 checkPtrmap(pCheck, pgno, PTRMAP_BTREE, iPage, zContext);
55985 checkTreePage(pCheck, pgno, zContext, NULL, !pPage->nCell ? NULL : &nMaxKey);
55997 checkAppendMsg(pCheck, zContext,
56003 checkAppendMsg(pCheck, zContext,
56008 checkAppendMsg(pCheck, zContext,
56017 checkAppendMsg(pCheck, zContext,
56030 pCheck->mallocFailed = 1;
56046 checkAppendMsg(pCheck, 0,
56068 checkAppendMsg(pCheck, 0,
56074 checkAppendMsg(pCheck, 0,
79676 sqlite3ExprDelete(db, pTable->pCheck);
80343 pTab->pCheck = sqlite3ExprAnd(db, pTab->pCheck, pCheckExpr);
80614 if( p->pCheck ){
80627 if( sqlite3ResolveExprNames(&sNC, p->pCheck) ){
88096 if( pTab->pCheck && (pParse->db->flags & SQLITE_IgnoreChecks)==0 ){
88099 sqlite3ExprIfTrue(pParse, pTab->pCheck, allOk, SQLITE_JUMPIFNULL);
88614 if( pDest->pCheck && sqlite3ExprCompare(pSrc->pCheck, pDest->pCheck) ){