Lines Matching refs:pInfo
64756 volatile WalCkptInfo *pInfo;
64766 pInfo = walCkptInfo(pWal);
64767 pInfo->nBackfill = 0;
64768 pInfo->nBackfillAttempted = pWal->hdr.mxFrame;
64769 pInfo->aReadMark[0] = 0;
64774 pInfo->aReadMark[i] = pWal->hdr.mxFrame;
64776 pInfo->aReadMark[i] = READMARK_NOT_USED;
65350 volatile WalCkptInfo *pInfo = walCkptInfo(pWal);
65358 AtomicStore(&pInfo->nBackfill, 0);
65359 pInfo->nBackfillAttempted = 0;
65360 pInfo->aReadMark[1] = 0;
65361 for(i=2; i<WAL_NREADER; i++) pInfo->aReadMark[i] = READMARK_NOT_USED;
65362 assert( pInfo->aReadMark[0]==0 );
65415 volatile WalCkptInfo *pInfo; /* The checkpoint status information */
65420 pInfo = walCkptInfo(pWal);
65421 if( pInfo->nBackfill<pWal->hdr.mxFrame ){
65435 u32 y = AtomicLoad(pInfo->aReadMark+i);
65441 AtomicStore(pInfo->aReadMark+i, iMark);
65453 if( pInfo->nBackfill<mxSafeFrame ){
65454 rc = walIteratorInit(pWal, pInfo->nBackfill, &pIter);
65461 u32 nBackfill = pInfo->nBackfill;
65463 pInfo->nBackfillAttempted = mxSafeFrame;
65525 AtomicStore(&pInfo->nBackfill, mxSafeFrame);
65547 if( pInfo->nBackfill<pWal->hdr.mxFrame ){
65552 assert( pInfo->nBackfill==pWal->hdr.mxFrame );
66077 volatile WalCkptInfo *pInfo; /* Checkpoint information in wal-index */
66159 pInfo = walCkptInfo(pWal);
66160 if( !useWal && AtomicLoad(&pInfo->nBackfill)==pWal->hdr.mxFrame
66209 u32 thisMark = AtomicLoad(pInfo->aReadMark+i);
66222 AtomicStore(pInfo->aReadMark+i,mxFrame);
66275 pWal->minFrame = AtomicLoad(&pInfo->nBackfill)+1;
66277 if( AtomicLoad(pInfo->aReadMark+mxI)!=mxReadMark
66315 volatile WalCkptInfo *pInfo = walCkptInfo(pWal);
66326 u32 i = pInfo->nBackfillAttempted;
66327 for(i=pInfo->nBackfillAttempted; i>AtomicLoad(&pInfo->nBackfill); i--){
66352 pInfo->nBackfillAttempted = i-1;
66400 ** has not yet set the pInfo->nBackfillAttempted variable to indicate
66403 ** before checking pInfo->nBackfillAttempted. */
66439 volatile WalCkptInfo *pInfo = walCkptInfo(pWal);
66442 assert( pInfo->aReadMark[pWal->readLock]<=pSnapshot->mxFrame );
66451 && pSnapshot->mxFrame>=pInfo->nBackfillAttempted
66815 volatile WalCkptInfo *pInfo = walCkptInfo(pWal);
66816 assert( pInfo->nBackfill==pWal->hdr.mxFrame );
66817 if( pInfo->nBackfill>0 ){
69734 CellInfo *pInfo /* Fill in this structure */
69751 surplus = minLocal + (pInfo->nPayload - minLocal)%(pPage->pBt->usableSize-4);
69755 pInfo->nLocal = (u16)surplus;
69757 pInfo->nLocal = (u16)minLocal;
69759 pInfo->nSize = (u16)(&pInfo->pPayload[pInfo->nLocal] - pCell) + 4;
69797 CellInfo *pInfo /* Fill in this structure */
69805 pInfo->nSize = 4 + getVarint(&pCell[4], (u64*)&pInfo->nKey);
69806 pInfo->nPayload = 0;
69807 pInfo->nLocal = 0;
69808 pInfo->pPayload = 0;
69814 CellInfo *pInfo /* Fill in this structure */
69844 ** pIter += getVarint(pIter, (u64*)&pInfo->nKey);
69877 pInfo->nKey = *(i64*)&iKey;
69878 pInfo->nPayload = nPayload;
69879 pInfo->pPayload = pIter;
69886 pInfo->nSize = nPayload + (u16)(pIter - pCell);
69887 if( pInfo->nSize<4 ) pInfo->nSize = 4;
69888 pInfo->nLocal = (u16)nPayload;
69890 btreeParseCellAdjustSizeForOverflow(pPage, pCell, pInfo);
69896 CellInfo *pInfo /* Fill in this structure */
69914 pInfo->nKey = nPayload;
69915 pInfo->nPayload = nPayload;
69916 pInfo->pPayload = pIter;
69923 pInfo->nSize = nPayload + (u16)(pIter - pCell);
69924 if( pInfo->nSize<4 ) pInfo->nSize = 4;
69925 pInfo->nLocal = (u16)nPayload;
69927 btreeParseCellAdjustSizeForOverflow(pPage, pCell, pInfo);
69933 CellInfo *pInfo /* Fill in this structure */
69935 pPage->xParseCell(pPage, findCell(pPage, iCell), pInfo);
75347 CellInfo *pInfo /* Size information about the cell */
75356 assert( pInfo->nLocal!=pInfo->nPayload );
75357 testcase( pCell + pInfo->nSize == pPage->aDataEnd );
75358 testcase( pCell + (pInfo->nSize-1) == pPage->aDataEnd );
75359 if( pCell + pInfo->nSize > pPage->aDataEnd ){
75363 ovflPgno = get4byte(pCell + pInfo->nSize - 4);
75367 nOvfl = (pInfo->nPayload - pInfo->nLocal + ovflPageSize - 1)/ovflPageSize;
75369 (CORRUPT_DB && (pInfo->nPayload + ovflPageSize)<ovflPageSize)
110249 AggInfo *pInfo = pExpr->pAggInfo;
110250 if( pInfo==0
110252 || NEVER(pExpr->iAgg>=pInfo->nFunc)
110257 return pInfo->aFunc[pExpr->iAgg].iMem;
112030 static int addAggInfoColumn(sqlite3 *db, AggInfo *pInfo){
112032 pInfo->aCol = sqlite3ArrayAllocate(
112034 pInfo->aCol,
112035 sizeof(pInfo->aCol[0]),
112036 &pInfo->nColumn,
112046 static int addAggInfoFunc(sqlite3 *db, AggInfo *pInfo){
112048 pInfo->aFunc = sqlite3ArrayAllocate(
112050 pInfo->aFunc,
112051 sizeof(pInfo->aFunc[0]),
112052 &pInfo->nFunc,
116143 analysisInfo *pInfo = (analysisInfo*)pData;
116154 pTable = sqlite3FindTable(pInfo->db, argv[0], pInfo->zDatabase);
116163 pIndex = sqlite3FindIndex(pInfo->db, argv[1], pInfo->zDatabase);
116176 if( pIndex->aiRowEst==0 ) sqlite3OomFault(pInfo->db);
125411 const struct compareInfo *pInfo, /* Information about how to do the compare */
125415 u32 matchOne = pInfo->matchOne; /* "?" or "_" */
125416 u32 matchAll = pInfo->matchAll; /* "*" or "%" */
125417 u8 noCase = pInfo->noCase; /* True if uppercase==lowercase */
125434 if( pInfo->matchSet==0 ){
125442 int bMatch = patternCompare(&zPattern[-1],zString,pInfo,matchOther);
125474 bMatch = patternCompare(zPattern,zString,pInfo,matchOther);
125481 bMatch = patternCompare(zPattern,zString,pInfo,matchOther);
125488 if( pInfo->matchSet==0 ){
125596 struct compareInfo *pInfo = sqlite3_user_data(context);
125633 if( escape==pInfo->matchAll || escape==pInfo->matchOne ){
125634 memcpy(&backupInfo, pInfo, sizeof(backupInfo));
125635 pInfo = &backupInfo;
125636 if( escape==pInfo->matchAll ) pInfo->matchAll = 0;
125637 if( escape==pInfo->matchOne ) pInfo->matchOne = 0;
125640 escape = pInfo->matchSet;
125649 patternCompare(zB, zA, pInfo, escape)==SQLITE_MATCH);
126664 struct compareInfo *pInfo;
126667 pInfo = (struct compareInfo*)&likeInfoAlt;
126670 pInfo = (struct compareInfo*)&likeInfoNorm;
126673 sqlite3CreateFunc(db, "like", 2, SQLITE_UTF8, pInfo, likeFunc, 0, 0, 0, 0, 0);
126674 sqlite3CreateFunc(db, "like", 3, SQLITE_UTF8, pInfo, likeFunc, 0, 0, 0, 0, 0);
129015 AutoincInfo *pInfo;
129031 pInfo = pToplevel->pAinc;
129032 while( pInfo && pInfo->pTab!=pTab ){ pInfo = pInfo->pNext; }
129033 if( pInfo==0 ){
129034 pInfo = sqlite3DbMallocRawNN(pParse->db, sizeof(*pInfo));
129035 sqlite3ParserAddCleanup(pToplevel, sqlite3DbFree, pInfo);
129038 pInfo->pNext = pToplevel->pAinc;
129039 pToplevel->pAinc = pInfo;
129040 pInfo->pTab = pTab;
129041 pInfo->iDb = iDb;
129043 pInfo->regCtr = ++pToplevel->nMem; /* Max rowid register */
129046 memId = pInfo->regCtr;
138858 RowLoadInfo *pInfo /* Info needed to complete the row load */
138860 sqlite3ExprCodeExprList(pParse, pSelect->pEList, pInfo->regResult,
138861 0, pInfo->ecelFlags);
138863 if( pInfo->pExtra ){
138864 sqlite3ExprCodeExprList(pParse, pInfo->pExtra, pInfo->regExtraResult, 0, 0);
138865 sqlite3ExprListDelete(pParse->db, pInfo->pExtra);
139795 KeyInfo *pInfo;
139801 pInfo = sqlite3KeyInfoAlloc(db, nExpr-iStart, nExtra+1);
139802 if( pInfo ){
139803 assert( sqlite3KeyInfoIsWriteable(pInfo) );
139805 pInfo->aColl[i-iStart] = sqlite3ExprNNCollSeq(pParse, pItem->pExpr);
139806 pInfo->aSortFlags[i-iStart] = pItem->fg.sortFlags;
139809 return pInfo;
162680 KeyInfo *pInfo;
162682 pInfo = sqlite3KeyInfoAlloc(pParse->db, 1, 0);
162683 if( pInfo ){
162684 pInfo->aColl[0] = 0;
162685 pInfo->aSortFlags[0] = 0;
162686 sqlite3VdbeAppendP4(v, pInfo, P4_KEYINFO);
181252 static int fts3BestIndexMethod(sqlite3_vtab *pVTab, sqlite3_index_info *pInfo){
181270 pInfo->idxNum = FTS3_FULLSCAN_SEARCH;
181271 pInfo->estimatedCost = 5000000;
181272 for(i=0; i<pInfo->nConstraint; i++){
181274 struct sqlite3_index_constraint *pCons = &pInfo->aConstraint[i];
181282 pInfo->idxNum = FTS3_FULLSCAN_SEARCH;
181283 pInfo->estimatedCost = 1e50;
181284 fts3SetEstimatedRows(pInfo, ((sqlite3_int64)1) << 50);
181294 pInfo->idxNum = FTS3_DOCID_SEARCH;
181295 pInfo->estimatedCost = 1.0;
181311 pInfo->idxNum = FTS3_FULLTEXT_SEARCH + pCons->iColumn;
181312 pInfo->estimatedCost = 2.0;
181339 if( pInfo->idxNum==FTS3_DOCID_SEARCH ) fts3SetUniqueFlag(pInfo);
181343 pInfo->aConstraintUsage[iCons].argvIndex = iIdx++;
181344 pInfo->aConstraintUsage[iCons].omit = 1;
181347 pInfo->idxNum |= FTS3_HAVE_LANGID;
181348 pInfo->aConstraintUsage[iLangidCons].argvIndex = iIdx++;
181351 pInfo->idxNum |= FTS3_HAVE_DOCID_GE;
181352 pInfo->aConstraintUsage[iDocidGe].argvIndex = iIdx++;
181355 pInfo->idxNum |= FTS3_HAVE_DOCID_LE;
181356 pInfo->aConstraintUsage[iDocidLe].argvIndex = iIdx++;
181362 if( pInfo->nOrderBy==1 ){
181363 struct sqlite3_index_orderby *pOrder = &pInfo->aOrderBy[0];
181366 pInfo->idxStr = "DESC";
181368 pInfo->idxStr = "ASC";
181370 pInfo->orderByConsumed = 1;
185911 sqlite3_index_info *pInfo
185923 if( pInfo->nOrderBy==1
185924 && pInfo->aOrderBy[0].iColumn==0
185925 && pInfo->aOrderBy[0].desc==0
185927 pInfo->orderByConsumed = 1;
185932 for(i=0; i<pInfo->nConstraint; i++){
185933 if( pInfo->aConstraint[i].usable ){
185934 int op = pInfo->aConstraint[i].op;
185935 int iCol = pInfo->aConstraint[i].iColumn;
185951 pInfo->idxNum = FTS4AUX_EQ_CONSTRAINT;
185952 pInfo->aConstraintUsage[iEq].argvIndex = iNext++;
185953 pInfo->estimatedCost = 5;
185955 pInfo->idxNum = 0;
185956 pInfo->estimatedCost = 20000;
185958 pInfo->idxNum += FTS4AUX_GE_CONSTRAINT;
185959 pInfo->aConstraintUsage[iGe].argvIndex = iNext++;
185960 pInfo->estimatedCost /= 2;
185963 pInfo->idxNum += FTS4AUX_LE_CONSTRAINT;
185964 pInfo->aConstraintUsage[iLe].argvIndex = iNext++;
185965 pInfo->estimatedCost /= 2;
185969 pInfo->aConstraintUsage[iLangid].argvIndex = iNext++;
185970 pInfo->estimatedCost--;
189662 sqlite3_index_info *pInfo
189667 for(i=0; i<pInfo->nConstraint; i++){
189668 if( pInfo->aConstraint[i].usable
189669 && pInfo->aConstraint[i].iColumn==0
189670 && pInfo->aConstraint[i].op==SQLITE_INDEX_CONSTRAINT_EQ
189672 pInfo->idxNum = 1;
189673 pInfo->aConstraintUsage[i].argvIndex = 1;
189674 pInfo->aConstraintUsage[i].omit = 1;
189675 pInfo->estimatedCost = 1;
189680 pInfo->idxNum = 0;
189681 assert( pInfo->estimatedCost>1000000.0 );
196710 static size_t fts3MatchinfoSize(MatchInfo *pInfo, char cArg){
196723 nVal = pInfo->nCol;
196727 nVal = pInfo->nCol * pInfo->nPhrase;
196731 nVal = pInfo->nPhrase * ((pInfo->nCol + 31) / 32);
196736 nVal = pInfo->nCol * pInfo->nPhrase * 3;
196839 ** column are written into the first nCol elements of the pInfo->aMatchinfo[]
196843 ** data written to the first nCol elements of pInfo->aMatchinfo[] is
196846 static int fts3MatchinfoLcs(Fts3Cursor *pCsr, MatchInfo *pInfo){
196860 for(i=0; i<pInfo->nPhrase; i++){
196866 for(iCol=0; iCol<pInfo->nCol; iCol++){
196870 for(i=0; i<pInfo->nPhrase; i++){
196889 for(i=0; i<pInfo->nPhrase; i++){
196909 pInfo->aMatchinfo[iCol] = nLcs;
196918 ** Populate the buffer pInfo->aMatchinfo[] with an array of integers to
196922 ** string has already been validated and the pInfo->aMatchinfo[] array
196932 ** pInfo->aMatchinfo[] buffer is left in is undefined.
196937 MatchInfo *pInfo, /* Matchinfo context object */
196946 pInfo->flag = zArg[i];
196949 if( bGlobal ) pInfo->aMatchinfo[0] = pInfo->nPhrase;
196953 if( bGlobal ) pInfo->aMatchinfo[0] = pInfo->nCol;
196960 pInfo->aMatchinfo[0] = (u32)nDoc;
196973 for(iCol=0; iCol<pInfo->nCol; iCol++){
196982 pInfo->aMatchinfo[iCol] = iVal;
196995 for(iCol=0; iCol<pInfo->nCol; iCol++){
197002 pInfo->aMatchinfo[iCol] = (u32)nToken;
197012 rc = fts3MatchinfoLcs(pCsr, pInfo);
197018 size_t nZero = fts3MatchinfoSize(pInfo, zArg[i]) * sizeof(u32);
197019 memset(pInfo->aMatchinfo, 0, nZero);
197020 rc = fts3ExprLHitGather(pCsr->pExpr, pInfo);
197032 rc = fts3MatchinfoSelectDoctotal(pTab, &pSelect, &pInfo->nDoc,0,0);
197035 rc = fts3ExprIterate(pExpr, fts3ExprGlobalHitsCb,(void*)pInfo);
197039 (void)fts3ExprIterate(pExpr, fts3ExprLocalHitsCb,(void*)pInfo);
197044 pInfo->aMatchinfo += fts3MatchinfoSize(pInfo, zArg[i]);
201283 sqlite3_rtree_query_info *pInfo; /* xGeom and xQueryFunc argument */
202046 sqlite3_rtree_query_info *pInfo = pCsr->aConstraint[i].pInfo;
202047 if( pInfo ){
202048 if( pInfo->xDelUser ) pInfo->xDelUser(pInfo->pUser);
202049 sqlite3_free(pInfo);
202148 sqlite3_rtree_query_info *pInfo = pConstraint->pInfo; /* Callback info */
202149 int nCoord = pInfo->nCoord; /* No. of coordinates */
202158 pInfo->iRowid = readInt64(pCellData);
202193 rc = pConstraint->u.xGeom((sqlite3_rtree_geometry*)pInfo,
202198 pInfo->aCoord = aCoord;
202199 pInfo->iLevel = pSearch->iLevel - 1;
202200 pInfo->rScore = pInfo->rParentScore = pSearch->rScore;
202201 pInfo->eWithin = pInfo->eParentWithin = pSearch->eWithin;
202202 rc = pConstraint->u.xQueryFunc(pInfo);
202203 if( pInfo->eWithin<*peWithin ) *peWithin = pInfo->eWithin;
202204 if( pInfo->rScore<*prScore || *prScore<RTREE_ZERO ){
202205 *prScore = pInfo->rScore;
202750 sqlite3_rtree_query_info *pInfo; /* Callback information */
202754 pInfo = (sqlite3_rtree_query_info*)
202755 sqlite3_malloc64( sizeof(*pInfo)+pSrc->iSize );
202756 if( !pInfo ) return SQLITE_NOMEM;
202757 memset(pInfo, 0, sizeof(*pInfo));
202758 pBlob = (RtreeMatchArg*)&pInfo[1];
202760 pInfo->pContext = pBlob->cb.pContext;
202761 pInfo->nParam = pBlob->nParam;
202762 pInfo->aParam = pBlob->aParam;
202763 pInfo->apSqlParam = pBlob->apSqlParam;
202771 pCons->pInfo = pInfo;
202852 p->pInfo->nCoord = pRtree->nDim2;
202853 p->pInfo->anQueue = pCsr->anQueue;
202854 p->pInfo->mxLevel = pRtree->iDepth + 1;
207215 RtreeGeomCallback *pInfo = (RtreeGeomCallback*)p;
207216 if( pInfo->xDestructor ) pInfo->xDestructor(pInfo->pContext);
237375 static int fts5BestIndexMethod(sqlite3_vtab *pVTab, sqlite3_index_info *pInfo){
237406 idxStr = (char*)sqlite3_malloc(pInfo->nConstraint * 8 + 1);
237408 pInfo->idxStr = idxStr;
237409 pInfo->needToFreeIdxStr = 1;
237411 for(i=0; i<pInfo->nConstraint; i++){
237412 struct sqlite3_index_constraint *p = &pInfo->aConstraint[i];
237421 pInfo->estimatedCost = 1e50;
237422 assert( iIdxStr < pInfo->nConstraint*6 + 1 );
237437 pInfo->aConstraintUsage[i].argvIndex = ++iCons;
237438 pInfo->aConstraintUsage[i].omit = 1;
237446 pInfo->aConstraintUsage[i].argvIndex = ++iCons;
237451 pInfo->aConstraintUsage[i].argvIndex = ++iCons;
237457 for(i=0; i<pInfo->nConstraint; i++){
237458 struct sqlite3_index_constraint *p = &pInfo->aConstraint[i];
237464 pInfo->aConstraintUsage[i].argvIndex = ++iCons;
237470 pInfo->aConstraintUsage[i].argvIndex = ++iCons;
237479 if( pInfo->nOrderBy==1 ){
237480 int iSort = pInfo->aOrderBy[0].iColumn;
237487 pInfo->orderByConsumed = 1;
237488 if( pInfo->aOrderBy[0].desc ){
237496 pInfo->estimatedCost = bSeenMatch ? 100.0 : 10.0;
237497 if( bSeenMatch==0 ) fts5SetUniqueFlag(pInfo);
237499 pInfo->estimatedCost = bSeenMatch ? 500.0 : 250000.0;
237501 pInfo->estimatedCost = bSeenMatch ? 750.0 : 750000.0;
237503 pInfo->estimatedCost = bSeenMatch ? 1000.0 : 1000000.0;
237506 pInfo->idxNum = idxFlags;
243730 sqlite3_index_info *pInfo
243741 for(i=0; i<pInfo->nConstraint; i++){
243742 struct sqlite3_index_constraint *p = &pInfo->aConstraint[i];
243755 pInfo->aConstraintUsage[iTermEq].argvIndex = ++nArg;
243756 pInfo->estimatedCost = 100;
243758 pInfo->estimatedCost = 1000000;
243761 pInfo->aConstraintUsage[iTermGe].argvIndex = ++nArg;
243762 pInfo->estimatedCost = pInfo->estimatedCost / 2;
243766 pInfo->aConstraintUsage[iTermLe].argvIndex = ++nArg;
243767 pInfo->estimatedCost = pInfo->estimatedCost / 2;
243776 if( pInfo->nOrderBy==1
243777 && pInfo->aOrderBy[0].iColumn==0
243778 && pInfo->aOrderBy[0].desc==0
243780 pInfo->orderByConsumed = 1;
243783 pInfo->idxNum = idxNum;