Lines Matching refs:pInfo

61179     volatile WalCkptInfo *pInfo;
61189 pInfo = walCkptInfo(pWal);
61190 pInfo->nBackfill = 0;
61191 pInfo->nBackfillAttempted = pWal->hdr.mxFrame;
61192 pInfo->aReadMark[0] = 0;
61197 pInfo->aReadMark[i] = pWal->hdr.mxFrame;
61199 pInfo->aReadMark[i] = READMARK_NOT_USED;
61745 volatile WalCkptInfo *pInfo = walCkptInfo(pWal);
61753 AtomicStore(&pInfo->nBackfill, 0);
61754 pInfo->nBackfillAttempted = 0;
61755 pInfo->aReadMark[1] = 0;
61756 for(i=2; i<WAL_NREADER; i++) pInfo->aReadMark[i] = READMARK_NOT_USED;
61757 assert( pInfo->aReadMark[0]==0 );
61808 volatile WalCkptInfo *pInfo; /* The checkpoint status information */
61813 pInfo = walCkptInfo(pWal);
61814 if( pInfo->nBackfill<pWal->hdr.mxFrame ){
61828 u32 y = AtomicLoad(pInfo->aReadMark+i);
61834 AtomicStore(pInfo->aReadMark+i, iMark);
61846 if( pInfo->nBackfill<mxSafeFrame ){
61847 rc = walIteratorInit(pWal, pInfo->nBackfill, &pIter);
61854 u32 nBackfill = pInfo->nBackfill;
61856 pInfo->nBackfillAttempted = mxSafeFrame;
61916 AtomicStore(&pInfo->nBackfill, mxSafeFrame);
61938 if( pInfo->nBackfill<pWal->hdr.mxFrame ){
61943 assert( pInfo->nBackfill==pWal->hdr.mxFrame );
62465 volatile WalCkptInfo *pInfo; /* Checkpoint information in wal-index */
62544 pInfo = walCkptInfo(pWal);
62545 if( !useWal && AtomicLoad(&pInfo->nBackfill)==pWal->hdr.mxFrame
62594 u32 thisMark = AtomicLoad(pInfo->aReadMark+i);
62607 AtomicStore(pInfo->aReadMark+i,mxFrame);
62660 pWal->minFrame = AtomicLoad(&pInfo->nBackfill)+1;
62662 if( AtomicLoad(pInfo->aReadMark+mxI)!=mxReadMark
62700 volatile WalCkptInfo *pInfo = walCkptInfo(pWal);
62711 u32 i = pInfo->nBackfillAttempted;
62712 for(i=pInfo->nBackfillAttempted; i>AtomicLoad(&pInfo->nBackfill); i--){
62736 pInfo->nBackfillAttempted = i-1;
62784 ** has not yet set the pInfo->nBackfillAttempted variable to indicate
62787 ** before checking pInfo->nBackfillAttempted. */
62823 volatile WalCkptInfo *pInfo = walCkptInfo(pWal);
62826 assert( pInfo->aReadMark[pWal->readLock]<=pSnapshot->mxFrame );
62835 && pSnapshot->mxFrame>=pInfo->nBackfillAttempted
63199 volatile WalCkptInfo *pInfo = walCkptInfo(pWal);
63200 assert( pInfo->nBackfill==pWal->hdr.mxFrame );
63201 if( pInfo->nBackfill>0 ){
66074 CellInfo *pInfo /* Fill in this structure */
66091 surplus = minLocal + (pInfo->nPayload - minLocal)%(pPage->pBt->usableSize-4);
66095 pInfo->nLocal = (u16)surplus;
66097 pInfo->nLocal = (u16)minLocal;
66099 pInfo->nSize = (u16)(&pInfo->pPayload[pInfo->nLocal] - pCell) + 4;
66137 CellInfo *pInfo /* Fill in this structure */
66145 pInfo->nSize = 4 + getVarint(&pCell[4], (u64*)&pInfo->nKey);
66146 pInfo->nPayload = 0;
66147 pInfo->nLocal = 0;
66148 pInfo->pPayload = 0;
66154 CellInfo *pInfo /* Fill in this structure */
66184 ** pIter += getVarint(pIter, (u64*)&pInfo->nKey);
66203 pInfo->nKey = *(i64*)&iKey;
66204 pInfo->nPayload = nPayload;
66205 pInfo->pPayload = pIter;
66212 pInfo->nSize = nPayload + (u16)(pIter - pCell);
66213 if( pInfo->nSize<4 ) pInfo->nSize = 4;
66214 pInfo->nLocal = (u16)nPayload;
66216 btreeParseCellAdjustSizeForOverflow(pPage, pCell, pInfo);
66222 CellInfo *pInfo /* Fill in this structure */
66240 pInfo->nKey = nPayload;
66241 pInfo->nPayload = nPayload;
66242 pInfo->pPayload = pIter;
66249 pInfo->nSize = nPayload + (u16)(pIter - pCell);
66250 if( pInfo->nSize<4 ) pInfo->nSize = 4;
66251 pInfo->nLocal = (u16)nPayload;
66253 btreeParseCellAdjustSizeForOverflow(pPage, pCell, pInfo);
66259 CellInfo *pInfo /* Fill in this structure */
66261 pPage->xParseCell(pPage, findCell(pPage, iCell), pInfo);
71377 ** size information about the cell in pInfo.
71382 CellInfo *pInfo /* Size information about the cell */
71391 pPage->xParseCell(pPage, pCell, pInfo);
71392 if( pInfo->nLocal==pInfo->nPayload ){
71395 testcase( pCell + pInfo->nSize == pPage->aDataEnd );
71396 testcase( pCell + (pInfo->nSize-1) == pPage->aDataEnd );
71397 if( pCell + pInfo->nSize > pPage->aDataEnd ){
71401 ovflPgno = get4byte(pCell + pInfo->nSize - 4);
71405 nOvfl = (pInfo->nPayload - pInfo->nLocal + ovflPageSize - 1)/ovflPageSize;
71407 (CORRUPT_DB && (pInfo->nPayload + ovflPageSize)<ovflPageSize)
104806 AggInfo *pInfo = pExpr->pAggInfo;
104807 if( pInfo==0
104809 || NEVER(pExpr->iAgg>=pInfo->nFunc)
104814 return pInfo->aFunc[pExpr->iAgg].iMem;
106484 static int addAggInfoColumn(sqlite3 *db, AggInfo *pInfo){
106486 pInfo->aCol = sqlite3ArrayAllocate(
106488 pInfo->aCol,
106489 sizeof(pInfo->aCol[0]),
106490 &pInfo->nColumn,
106500 static int addAggInfoFunc(sqlite3 *db, AggInfo *pInfo){
106502 pInfo->aFunc = sqlite3ArrayAllocate(
106504 pInfo->aFunc,
106505 sizeof(pInfo->aFunc[0]),
106506 &pInfo->nFunc,
110316 analysisInfo *pInfo = (analysisInfo*)pData;
110327 pTable = sqlite3FindTable(pInfo->db, argv[0], pInfo->zDatabase);
110336 pIndex = sqlite3FindIndex(pInfo->db, argv[1], pInfo->zDatabase);
110349 if( pIndex->aiRowEst==0 ) sqlite3OomFault(pInfo->db);
119106 const struct compareInfo *pInfo, /* Information about how to do the compare */
119110 u32 matchOne = pInfo->matchOne; /* "?" or "_" */
119111 u32 matchAll = pInfo->matchAll; /* "*" or "%" */
119112 u8 noCase = pInfo->noCase; /* True if uppercase==lowercase */
119129 if( pInfo->matchSet==0 ){
119137 int bMatch = patternCompare(&zPattern[-1],zString,pInfo,matchOther);
119169 bMatch = patternCompare(zPattern,zString,pInfo,matchOther);
119176 bMatch = patternCompare(zPattern,zString,pInfo,matchOther);
119183 if( pInfo->matchSet==0 ){
119279 struct compareInfo *pInfo = sqlite3_user_data(context);
119316 if( escape==pInfo->matchAll || escape==pInfo->matchOne ){
119317 memcpy(&backupInfo, pInfo, sizeof(backupInfo));
119318 pInfo = &backupInfo;
119319 if( escape==pInfo->matchAll ) pInfo->matchAll = 0;
119320 if( escape==pInfo->matchOne ) pInfo->matchOne = 0;
119323 escape = pInfo->matchSet;
119332 patternCompare(zB, zA, pInfo, escape)==SQLITE_MATCH);
120257 struct compareInfo *pInfo;
120260 pInfo = (struct compareInfo*)&likeInfoAlt;
120263 pInfo = (struct compareInfo*)&likeInfoNorm;
120266 sqlite3CreateFunc(db, "like", 2, SQLITE_UTF8, pInfo, likeFunc, 0, 0, 0, 0, 0);
120267 sqlite3CreateFunc(db, "like", 3, SQLITE_UTF8, pInfo, likeFunc, 0, 0, 0, 0, 0);
122521 AutoincInfo *pInfo;
122537 pInfo = pToplevel->pAinc;
122538 while( pInfo && pInfo->pTab!=pTab ){ pInfo = pInfo->pNext; }
122539 if( pInfo==0 ){
122540 pInfo = sqlite3DbMallocRawNN(pParse->db, sizeof(*pInfo));
122541 sqlite3ParserAddCleanup(pToplevel, sqlite3DbFree, pInfo);
122544 pInfo->pNext = pToplevel->pAinc;
122545 pToplevel->pAinc = pInfo;
122546 pInfo->pTab = pTab;
122547 pInfo->iDb = iDb;
122549 pInfo->regCtr = ++pToplevel->nMem; /* Max rowid register */
122552 memId = pInfo->regCtr;
131709 RowLoadInfo *pInfo /* Info needed to complete the row load */
131711 sqlite3ExprCodeExprList(pParse, pSelect->pEList, pInfo->regResult,
131712 0, pInfo->ecelFlags);
131714 if( pInfo->pExtra ){
131715 sqlite3ExprCodeExprList(pParse, pInfo->pExtra, pInfo->regExtraResult, 0, 0);
131716 sqlite3ExprListDelete(pParse->db, pInfo->pExtra);
132531 KeyInfo *pInfo;
132537 pInfo = sqlite3KeyInfoAlloc(db, nExpr-iStart, nExtra+1);
132538 if( pInfo ){
132539 assert( sqlite3KeyInfoIsWriteable(pInfo) );
132541 pInfo->aColl[i-iStart] = sqlite3ExprNNCollSeq(pParse, pItem->pExpr);
132542 pInfo->aSortFlags[i-iStart] = pItem->sortFlags;
132545 return pInfo;
171614 static int fts3BestIndexMethod(sqlite3_vtab *pVTab, sqlite3_index_info *pInfo){
171632 pInfo->idxNum = FTS3_FULLSCAN_SEARCH;
171633 pInfo->estimatedCost = 5000000;
171634 for(i=0; i<pInfo->nConstraint; i++){
171636 struct sqlite3_index_constraint *pCons = &pInfo->aConstraint[i];
171644 pInfo->idxNum = FTS3_FULLSCAN_SEARCH;
171645 pInfo->estimatedCost = 1e50;
171646 fts3SetEstimatedRows(pInfo, ((sqlite3_int64)1) << 50);
171656 pInfo->idxNum = FTS3_DOCID_SEARCH;
171657 pInfo->estimatedCost = 1.0;
171673 pInfo->idxNum = FTS3_FULLTEXT_SEARCH + pCons->iColumn;
171674 pInfo->estimatedCost = 2.0;
171701 if( pInfo->idxNum==FTS3_DOCID_SEARCH ) fts3SetUniqueFlag(pInfo);
171705 pInfo->aConstraintUsage[iCons].argvIndex = iIdx++;
171706 pInfo->aConstraintUsage[iCons].omit = 1;
171709 pInfo->idxNum |= FTS3_HAVE_LANGID;
171710 pInfo->aConstraintUsage[iLangidCons].argvIndex = iIdx++;
171713 pInfo->idxNum |= FTS3_HAVE_DOCID_GE;
171714 pInfo->aConstraintUsage[iDocidGe].argvIndex = iIdx++;
171717 pInfo->idxNum |= FTS3_HAVE_DOCID_LE;
171718 pInfo->aConstraintUsage[iDocidLe].argvIndex = iIdx++;
171724 if( pInfo->nOrderBy==1 ){
171725 struct sqlite3_index_orderby *pOrder = &pInfo->aOrderBy[0];
171728 pInfo->idxStr = "DESC";
171730 pInfo->idxStr = "ASC";
171732 pInfo->orderByConsumed = 1;
176256 sqlite3_index_info *pInfo
176268 if( pInfo->nOrderBy==1
176269 && pInfo->aOrderBy[0].iColumn==0
176270 && pInfo->aOrderBy[0].desc==0
176272 pInfo->orderByConsumed = 1;
176277 for(i=0; i<pInfo->nConstraint; i++){
176278 if( pInfo->aConstraint[i].usable ){
176279 int op = pInfo->aConstraint[i].op;
176280 int iCol = pInfo->aConstraint[i].iColumn;
176296 pInfo->idxNum = FTS4AUX_EQ_CONSTRAINT;
176297 pInfo->aConstraintUsage[iEq].argvIndex = iNext++;
176298 pInfo->estimatedCost = 5;
176300 pInfo->idxNum = 0;
176301 pInfo->estimatedCost = 20000;
176303 pInfo->idxNum += FTS4AUX_GE_CONSTRAINT;
176304 pInfo->aConstraintUsage[iGe].argvIndex = iNext++;
176305 pInfo->estimatedCost /= 2;
176308 pInfo->idxNum += FTS4AUX_LE_CONSTRAINT;
176309 pInfo->aConstraintUsage[iLe].argvIndex = iNext++;
176310 pInfo->estimatedCost /= 2;
176314 pInfo->aConstraintUsage[iLangid].argvIndex = iNext++;
176315 pInfo->estimatedCost--;
180002 sqlite3_index_info *pInfo
180007 for(i=0; i<pInfo->nConstraint; i++){
180008 if( pInfo->aConstraint[i].usable
180009 && pInfo->aConstraint[i].iColumn==0
180010 && pInfo->aConstraint[i].op==SQLITE_INDEX_CONSTRAINT_EQ
180012 pInfo->idxNum = 1;
180013 pInfo->aConstraintUsage[i].argvIndex = 1;
180014 pInfo->aConstraintUsage[i].omit = 1;
180015 pInfo->estimatedCost = 1;
180020 pInfo->idxNum = 0;
180021 assert( pInfo->estimatedCost>1000000.0 );
187029 static size_t fts3MatchinfoSize(MatchInfo *pInfo, char cArg){
187042 nVal = pInfo->nCol;
187046 nVal = pInfo->nCol * pInfo->nPhrase;
187050 nVal = pInfo->nPhrase * ((pInfo->nCol + 31) / 32);
187055 nVal = pInfo->nCol * pInfo->nPhrase * 3;
187156 ** column are written into the first nCol elements of the pInfo->aMatchinfo[]
187160 ** data written to the first nCol elements of pInfo->aMatchinfo[] is
187163 static int fts3MatchinfoLcs(Fts3Cursor *pCsr, MatchInfo *pInfo){
187178 for(i=0; i<pInfo->nPhrase; i++){
187184 for(iCol=0; iCol<pInfo->nCol; iCol++){
187188 for(i=0; i<pInfo->nPhrase; i++){
187207 for(i=0; i<pInfo->nPhrase; i++){
187227 pInfo->aMatchinfo[iCol] = nLcs;
187236 ** Populate the buffer pInfo->aMatchinfo[] with an array of integers to
187240 ** string has already been validated and the pInfo->aMatchinfo[] array
187250 ** pInfo->aMatchinfo[] buffer is left in is undefined.
187255 MatchInfo *pInfo, /* Matchinfo context object */
187264 pInfo->flag = zArg[i];
187267 if( bGlobal ) pInfo->aMatchinfo[0] = pInfo->nPhrase;
187271 if( bGlobal ) pInfo->aMatchinfo[0] = pInfo->nCol;
187278 pInfo->aMatchinfo[0] = (u32)nDoc;
187291 for(iCol=0; iCol<pInfo->nCol; iCol++){
187300 pInfo->aMatchinfo[iCol] = iVal;
187313 for(iCol=0; iCol<pInfo->nCol; iCol++){
187320 pInfo->aMatchinfo[iCol] = (u32)nToken;
187330 rc = fts3MatchinfoLcs(pCsr, pInfo);
187336 size_t nZero = fts3MatchinfoSize(pInfo, zArg[i]) * sizeof(u32);
187337 memset(pInfo->aMatchinfo, 0, nZero);
187338 rc = fts3ExprLHitGather(pCsr->pExpr, pInfo);
187350 rc = fts3MatchinfoSelectDoctotal(pTab, &pSelect, &pInfo->nDoc,0,0);
187353 rc = fts3ExprIterate(pExpr, fts3ExprGlobalHitsCb,(void*)pInfo);
187357 (void)fts3ExprIterate(pExpr, fts3ExprLocalHitsCb,(void*)pInfo);
187362 pInfo->aMatchinfo += fts3MatchinfoSize(pInfo, zArg[i]);
191514 sqlite3_rtree_query_info *pInfo; /* xGeom and xQueryFunc argument */
192291 sqlite3_rtree_query_info *pInfo = pCsr->aConstraint[i].pInfo;
192292 if( pInfo ){
192293 if( pInfo->xDelUser ) pInfo->xDelUser(pInfo->pUser);
192294 sqlite3_free(pInfo);
192393 sqlite3_rtree_query_info *pInfo = pConstraint->pInfo; /* Callback info */
192394 int nCoord = pInfo->nCoord; /* No. of coordinates */
192403 pInfo->iRowid = readInt64(pCellData);
192438 rc = pConstraint->u.xGeom((sqlite3_rtree_geometry*)pInfo,
192443 pInfo->aCoord = aCoord;
192444 pInfo->iLevel = pSearch->iLevel - 1;
192445 pInfo->rScore = pInfo->rParentScore = pSearch->rScore;
192446 pInfo->eWithin = pInfo->eParentWithin = pSearch->eWithin;
192447 rc = pConstraint->u.xQueryFunc(pInfo);
192448 if( pInfo->eWithin<*peWithin ) *peWithin = pInfo->eWithin;
192449 if( pInfo->rScore<*prScore || *prScore<RTREE_ZERO ){
192450 *prScore = pInfo->rScore;
192984 sqlite3_rtree_query_info *pInfo; /* Callback information */
192988 pInfo = (sqlite3_rtree_query_info*)
192989 sqlite3_malloc64( sizeof(*pInfo)+pSrc->iSize );
192990 if( !pInfo ) return SQLITE_NOMEM;
192991 memset(pInfo, 0, sizeof(*pInfo));
192992 pBlob = (RtreeMatchArg*)&pInfo[1];
192994 pInfo->pContext = pBlob->cb.pContext;
192995 pInfo->nParam = pBlob->nParam;
192996 pInfo->aParam = pBlob->aParam;
192997 pInfo->apSqlParam = pBlob->apSqlParam;
193005 pCons->pInfo = pInfo;
193086 p->pInfo->nCoord = pRtree->nDim2;
193087 p->pInfo->anQueue = pCsr->anQueue;
193088 p->pInfo->mxLevel = pRtree->iDepth + 1;
197427 RtreeGeomCallback *pInfo = (RtreeGeomCallback*)p;
197428 if( pInfo->xDestructor ) pInfo->xDestructor(pInfo->pContext);
227063 static int fts5BestIndexMethod(sqlite3_vtab *pVTab, sqlite3_index_info *pInfo){
227094 idxStr = (char*)sqlite3_malloc(pInfo->nConstraint * 8 + 1);
227096 pInfo->idxStr = idxStr;
227097 pInfo->needToFreeIdxStr = 1;
227099 for(i=0; i<pInfo->nConstraint; i++){
227100 struct sqlite3_index_constraint *p = &pInfo->aConstraint[i];
227109 pInfo->estimatedCost = 1e50;
227110 assert( iIdxStr < pInfo->nConstraint*6 + 1 );
227125 pInfo->aConstraintUsage[i].argvIndex = ++iCons;
227126 pInfo->aConstraintUsage[i].omit = 1;
227134 pInfo->aConstraintUsage[i].argvIndex = ++iCons;
227139 pInfo->aConstraintUsage[i].argvIndex = ++iCons;
227145 for(i=0; i<pInfo->nConstraint; i++){
227146 struct sqlite3_index_constraint *p = &pInfo->aConstraint[i];
227152 pInfo->aConstraintUsage[i].argvIndex = ++iCons;
227158 pInfo->aConstraintUsage[i].argvIndex = ++iCons;
227167 if( pInfo->nOrderBy==1 ){
227168 int iSort = pInfo->aOrderBy[0].iColumn;
227175 pInfo->orderByConsumed = 1;
227176 if( pInfo->aOrderBy[0].desc ){
227184 pInfo->estimatedCost = bSeenMatch ? 100.0 : 10.0;
227185 if( bSeenMatch==0 ) fts5SetUniqueFlag(pInfo);
227187 pInfo->estimatedCost = bSeenMatch ? 500.0 : 250000.0;
227189 pInfo->estimatedCost = bSeenMatch ? 750.0 : 750000.0;
227191 pInfo->estimatedCost = bSeenMatch ? 1000.0 : 1000000.0;
227194 pInfo->idxNum = idxFlags;
233407 sqlite3_index_info *pInfo
233418 for(i=0; i<pInfo->nConstraint; i++){
233419 struct sqlite3_index_constraint *p = &pInfo->aConstraint[i];
233432 pInfo->aConstraintUsage[iTermEq].argvIndex = ++nArg;
233433 pInfo->estimatedCost = 100;
233435 pInfo->estimatedCost = 1000000;
233438 pInfo->aConstraintUsage[iTermGe].argvIndex = ++nArg;
233439 pInfo->estimatedCost = pInfo->estimatedCost / 2;
233443 pInfo->aConstraintUsage[iTermLe].argvIndex = ++nArg;
233444 pInfo->estimatedCost = pInfo->estimatedCost / 2;
233453 if( pInfo->nOrderBy==1
233454 && pInfo->aOrderBy[0].iColumn==0
233455 && pInfo->aOrderBy[0].desc==0
233457 pInfo->orderByConsumed = 1;
233460 pInfo->idxNum = idxNum;