Home | History | Annotate | Download | only in dist

Lines Matching refs:pList

9069 ** Expr.x.pList is a list of arguments if the expression is an SQL function,
9073 ** Expr.flags mask, then Expr.x.pSelect is valid. Otherwise, Expr.x.pList is
9110 ** the subtrees in Expr.x.pList or Expr.x.pSelect are always separately
9130 ExprList *pList; /* Function arguments or in "<expr> IN (<expr-list)" */
9170 #define EP_xIsSelect 0x0800 /* x.pSelect is valid (otherwise x.pList is) */
31345 static struct RowSetEntry *rowSetListToTree(struct RowSetEntry *pList){
31350 assert( pList!=0 );
31351 p = pList;
31352 pList = p->pRight;
31354 for(iDepth=1; pList; iDepth++){
31356 p = pList;
31357 pList = p->pRight;
31359 p->pRight = rowSetNDeepTree(&pList, iDepth);
34268 static int pager_write_pagelist(PgHdr *pList){
34272 if( NEVER(pList==0) ) return SQLITE_OK;
34273 pPager = pList->pPager;
34303 while( rc==SQLITE_OK && pList ){
34304 Pgno pgno = pList->pgno;
34316 if( pgno<=pPager->dbSize && 0==(pList->flags&PGHDR_DONT_WRITE) ){
34321 CODEC2(pPager, pList->pData, pgno, 6, return SQLITE_NOMEM, pData);
34338 sqlite3BackupUpdate(pPager->pBackup, pgno, (u8*)pList->pData);
34341 PAGERID(pPager), pgno, pager_pagehash(pList)));
34349 pList->pageHash = pager_pagehash(pList);
34351 pList = pList->pDirty;
39697 BtShared *pList;
39708 pList = GLOBAL(BtShared*,sqlite3SharedCacheList);
39709 while( ALWAYS(pList) && pList->pNext!=pBt ){
39710 pList=pList->pNext;
39712 if( ALWAYS(pList) ){
39713 pList->pNext = pBt->pNext;
59215 if( sqlite3WalkExprList(pWalker, pExpr->x.pList) ) return WRC_Abort;
59605 assert( pExpr->x.pList==0 );
59810 ExprList *pList = pExpr->x.pList; /* The argument list */
59811 int n = pList ? pList->nExpr : 0; /* Number of arguments */
59867 sqlite3WalkExprList(pWalker, pList);
60817 ** argument. An expression with no children, Expr.pList or
60829 heightOfExprList(p->x.pList, &nHeight);
61009 SQLITE_PRIVATE Expr *sqlite3ExprFunction(Parse *pParse, ExprList *pList, Token *pToken){
61015 sqlite3ExprListDelete(db, pList); /* Avoid memory leak when malloc fails */
61018 pNew->x.pList = pList;
61121 sqlite3ExprListDelete(db, p->x.pList);
61184 if( p->pLeft || p->pRight || p->pColl || p->x.pList ){
61217 ** descended from the Expr.x.pList or Expr.x.pSelect variables).
61291 /* Fill in the pNew->x.pSelect or pNew->x.pList member. */
61295 pNew->x.pList = sqlite3ExprListDup(db, p->x.pList, isReduced);
61464 ** Add a new element to the end of an expression list. If pList is
61473 ExprList *pList, /* List to which to append. Might be NULL */
61477 if( pList==0 ){
61478 pList = sqlite3DbMallocZero(db, sizeof(ExprList) );
61479 if( pList==0 ){
61482 assert( pList->nAlloc==0 );
61484 if( pList->nAlloc<=pList->nExpr ){
61486 int n = pList->nAlloc*2 + 4;
61487 a = sqlite3DbRealloc(db, pList->a, n*sizeof(pList->a[0]));
61491 pList->a = a;
61492 pList->nAlloc = sqlite3DbMallocSize(db, a)/sizeof(a[0]);
61494 assert( pList->a!=0 );
61496 struct ExprList_item *pItem = &pList->a[pList->nExpr++];
61500 return pList;
61505 sqlite3ExprListDelete(db, pList);
61513 ** pList might be NULL following an OOM error. But pName should never be
61519 ExprList *pList, /* List to which to add the span. */
61523 assert( pList!=0 || pParse->db->mallocFailed!=0 );
61524 if( pList ){
61526 assert( pList->nExpr>0 );
61527 pItem = &pList->a[pList->nExpr-1];
61538 ** pList might be NULL following an OOM error. But pSpan should never be
61544 ExprList *pList, /* List to which to add the span. */
61548 assert( pList!=0 || db->mallocFailed!=0 );
61549 if( pList ){
61550 struct ExprList_item *pItem = &pList->a[pList->nExpr-1];
61551 assert( pList->nExpr>0 );
61579 SQLITE_PRIVATE void sqlite3ExprListDelete(sqlite3 *db, ExprList *pList){
61582 if( pList==0 ) return;
61583 assert( pList->a!=0 || (pList->nExpr==0 && pList->nAlloc==0) );
61584 assert( pList->nExpr<=pList->nAlloc );
61585 for(pItem=pList->a, i=0; i<pList->nExpr; i++, pItem++){
61590 sqlite3DbFree(db, pList->a);
61591 sqlite3DbFree(db, pList);
62144 }else if( pExpr->x.pList!=0 ){
62153 ExprList *pList = pExpr->x.pList;
62166 for(i=pList->nExpr, pItem=pList->a; i>0; i--, pItem++){
63066 pFarg = pExpr->x.pList;
63175 ** Y is stored in pExpr->pList->a[0].pExpr.
63176 ** Z is stored in pExpr->pList->a[1].pExpr.
63180 struct ExprList_item *pLItem = pExpr->x.pList->a;
63274 ** Ei is in pExpr->pList->a[i*2] and Ri is pExpr->pList->a[i*2+1].
63293 assert( !ExprHasProperty(pExpr, EP_xIsSelect) && pExpr->x.pList );
63294 assert((pExpr->x.pList->nExpr % 2) == 0);
63295 assert(pExpr->x.pList->nExpr > 0);
63296 pEList = pExpr->x.pList;
63524 ExprList *pList = pExpr->x.pList;
63526 if( pList ){
63527 int i = pList->nExpr;
63528 struct ExprList_item *pItem = pList->a;
63571 ExprList *pList, /* The expression list to be coded */
63577 assert( pList!=0 );
63579 n = pList->nExpr;
63580 for(pItem=pList->a, i=0; i<n; i++, pItem++){
63629 compLeft.pRight = pExpr->x.pList->a[0].pExpr;
63632 compRight.pRight = pExpr->x.pList->a[1].pExpr;
63948 if( pA->x.pList && pB->x.pList ){
63949 if( pA->x.pList->nExpr!=pB->x.pList->nExpr ) return 0;
63950 for(i=0; i<pA->x.pList->nExpr; i++){
63951 Expr *pExprA = pA->x.pList->a[i].pExpr;
63952 Expr *pExprB = pB->x.pList->a[i].pExpr;
63955 }else if( pA->x.pList || pB->x.pList ){
64118 pExpr->x.pList ? pExpr->x.pList->nExpr : 0, enc, 0);
64173 SQLITE_PRIVATE void sqlite3ExprAnalyzeAggList(NameContext *pNC, ExprList *pList){
64176 if( pList ){
64177 for(pItem=pList->a, i=0; i<pList->nExpr; i++, pItem++){
66120 SrcList *pList /* The Source list to check and modify */
66126 if( NEVER(pList==0) ) return 0;
66128 for(i=0, pItem=pList->a; i<pList->nSrc; i++, pItem++){
66175 if( sqlite3FixExprList(pFix, pExpr->x.pList) ) return 1;
66186 ExprList *pList /* The expression to be fixed to one database */
66190 if( pList==0 ) return 0;
66191 for(i=0, pItem=pList->a; i<pList->nExpr; i++, pItem++){
67577 ** Designate the PRIMARY KEY for the table. pList is a list of names
67578 ** of columns that form the primary key. If pList is NULL, then the
67596 ExprList *pList, /* List of field names to be indexed */
67611 if( pList==0 ){
67615 for(i=0; i<pList->nExpr; i++){
67617 if( sqlite3StrICmp(pList->a[i].zName, pTab->aCol[iCol].zName)==0 ){
67625 if( pList->nExpr>1 ) iCol = -1;
67643 p = sqlite3CreateIndex(pParse, 0, 0, 0, pList, onError, 0, 0, sortOrder, 0);
67647 pList = 0;
67651 sqlite3ExprListDelete(pParse->db, pList);
68832 ** pList is a list of columns to be indexed. pList will be NULL if this
68845 ExprList *pList, /* A list of columns to be indexed */
68849 int sortOrder, /* Sort order of primary key when pList==NULL */
68865 struct ExprList_item *pListItem; /* For looping over pList */
69001 /* If pList==0, it means this routine was called to make a primary
69005 if( pList==0 ){
69008 pList = sqlite3ExprListAppend(pParse, 0, 0);
69009 if( pList==0 ) goto exit_create_index;
69010 sqlite3ExprListSetName(pParse, pList, &nullId, 0);
69011 pList->a[0].sortOrder = (u8)sortOrder;
69017 for(i=0; i<pList->nExpr; i++){
69018 Expr *pExpr = pList->a[i].pExpr;
69033 nCol = pList->nExpr;
69054 pIndex->nColumn = pList->nExpr;
69077 for(i=0, pListItem=pList->a; i<pList->nExpr; i++, pListItem++){
69298 sqlite3ExprListDelete(db, pList);
69461 SQLITE_PRIVATE IdList *sqlite3IdListAppend(sqlite3 *db, IdList *pList, Token *pToken){
69463 if( pList==0 ){
69464 pList = sqlite3DbMallocZero(db, sizeof(IdList) );
69465 if( pList==0 ) return 0;
69466 pList->nAlloc = 0;
69468 pList->a = sqlite3ArrayAllocate(
69470 pList->a,
69471 sizeof(pList->a[0]),
69473 &pList->nId,
69474 &pList->nAlloc,
69478 sqlite3IdListDelete(db, pList);
69481 pList->a[i].zName = sqlite3NameFromToken(db, pToken);
69482 return pList;
69488 SQLITE_PRIVATE void sqlite3IdListDelete(sqlite3 *db, IdList *pList){
69490 if( pList==0 ) return;
69491 for(i=0; i<pList->nId; i++){
69492 sqlite3DbFree(db, pList->a[i].zName);
69494 sqlite3DbFree(db, pList->a);
69495 sqlite3DbFree(db, pList);
69499 ** Return the index in pList of the identifier named zId. Return -1
69502 SQLITE_PRIVATE int sqlite3IdListIndex(IdList *pList, const char *zName){
69504 if( pList==0 ) return -1;
69505 for(i=0; i<pList->nId; i++){
69506 if( sqlite3StrICmp(pList->a[i].zName, zName)==0 ) return i;
69584 ** a new one. If an OOM error does occurs, then the prior value of pList
69614 SrcList *pList, /* Append to this SrcList. NULL creates a new SrcList */
69620 if( pList==0 ){
69621 pList = sqlite3DbMallocZero(db, sizeof(SrcList) );
69622 if( pList==0 ) return 0;
69623 pList->nAlloc = 1;
69625 pList = sqlite3SrcListEnlarge(db, pList, 1, pList->nSrc);
69627 sqlite3SrcListDelete(db, pList);
69630 pItem = &pList->a[pList->nSrc-1];
69641 return pList;
69647 SQLITE_PRIVATE void sqlite3SrcListAssignCursors(Parse *pParse, SrcList *pList){
69650 assert(pList || pParse->db->mallocFailed );
69651 if( pList ){
69652 for(i=0, pItem=pList->a; i<pList->nSrc; i++, pItem++){
69665 SQLITE_PRIVATE void sqlite3SrcListDelete(sqlite3 *db, SrcList *pList){
69668 if( pList==0 ) return;
69669 for(pItem=pList->a, i=0; i<pList->nSrc; i++, pItem++){
69679 sqlite3DbFree(db, pList);
72673 || !pExpr->x.pList
72674 || pExpr->x.pList->nExpr!=2
73755 ExprList *pList = 0; /* Changes list if ON UPDATE CASCADE */
73828 pList = sqlite3ExprListAppend(pParse, pList, pNew);
73829 sqlite3ExprListSetName(pParse, pList, &tFromCol, 0);
73876 pStep->pExprList = sqlite3ExprListDup(db, pList, EXPRDUP_REDUCE);
73889 sqlite3ExprListDelete(db, pList);
74324 ** The pList parameter holds EXPRLIST in the first form of the INSERT
74325 ** statement above, and pSelect is NULL. For the second form, pList is
74419 ExprList *pList, /* List of values to be inserted */
74538 assert( pList==0 );
74657 nColumn = pList ? pList->nExpr : 0;
74659 if( sqlite3ResolveExprNames(&sNC, pList->a[i].pExpr) ){
74811 sqlite3ExprCode(pParse, pList->a[keyColumn].pExpr, regCols);
74840 sqlite3ExprCodeAndCache(pParse, pList->a[j].pExpr, regCols+i+1);
74878 sqlite3ExprCode(pParse, pList->a[keyColumn].pExpr, regRowid);
74945 sqlite3ExprCode(pParse, pList->a[j].pExpr, iRegStore);
75027 sqlite3ExprListDelete(db, pList);
79613 IdList *pList = pRight->pUsing;
79614 for(j=0; j<pList->nId; j++){
79620 zName = pList->a[j].zName;
79978 static KeyInfo *keyInfoFromExprList(Parse *pParse, ExprList *pList){
79985 nExpr = pList->nExpr;
79992 for(i=0, pItem=pList->a; i<nExpr; i++, pItem++){
81650 substExprList(db, pExpr->x.pList, iTable, pEList);
81657 ExprList *pList, /* List to scan and in which to make substitutes */
81662 if( pList==0 ) return;
81663 for(i=0; i<pList->nExpr; i++){
81664 pList->a[i].pExpr = substExpr(db, pList->a[i].pExpr, iTable, pEList);
81813 ExprList *pList; /* The result set of the outer query */
82103 pList = pParent->pEList;
82104 for(i=0; i<pList->nExpr; i++){
82105 if( pList->a[i].zName==0 ){
82106 const char *zSpan = pList->a[i].zSpan;
82108 pList->a[i].zName = sqlite3DbStrDup(db, zSpan);
82188 pEList = pExpr->x.pList;
82646 if( pE->x.pList==0 || pE->x.pList->nExpr!=1 ){
82651 KeyInfo *pKeyInfo = keyInfoFromExprList(pParse, pE->x.pList);
82668 ExprList *pList = pF->pExpr->x.pList;
82670 sqlite3VdbeAddOp4(v, OP_AggFinal, pF->iMem, pList ? pList->nExpr : 0, 0,
82691 ExprList *pList = pF->pExpr->x.pList;
82693 if( pList ){
82694 nArg = pList->nExpr;
82696 sqlite3ExprCodeExprList(pParse, pList, regAgg, 0);
82710 assert( pList!=0 ); /* pList!=0 if pF->pFunc has NEEDCOLL */
82711 for(j=0, pItem=pList->a; !pColl && j<nArg; j++, pItem++){
83055 sqlite3ExprAnalyzeAggList(&sNC, sAggInfo.aFunc[i].pExpr->x.pList);
83350 pMinMax = sqlite3ExprListDup(db, p->pEList->a[0].pExpr->x.pList,0);
83451 SQLITE_PRIVATE void sqlite3PrintExprList(ExprList *pList){
83453 for(i=0; i<pList->nExpr; i++){
83454 sqlite3PrintExpr(pList->a[i].pExpr);
83455 if( i<pList->nExpr-1 ){
83762 Trigger *pList = 0; /* List of triggers to return */
83775 pTrig->pNext = (pList ? pList : pTab->pTrigger);
83776 pList = pTrig;
83781 return (pList ? pList : pTab->pTrigger);
84338 Trigger *pList = sqlite3TriggerList(pParse, pTab);
84340 assert( pList==0 || IsVirtual(pTab)==0 );
84341 for(p=pList; p; p=p->pNext){
84349 return (mask ? pList : 0);
87185 mask |= exprListTableUsage(pMaskSet, p->x.pList);
87189 static Bitmask exprListTableUsage(WhereMaskSet *pMaskSet, ExprList *pList){
87192 if( pList ){
87193 for(i=0; i<pList->nExpr; i++){
87194 mask |= exprTableUsage(pMaskSet, pList->a[i].pExpr);
87375 ExprList *pList; /* List of operands to the LIKE operator */
87390 pList = pExpr->x.pList;
87391 pLeft = pList->a[1].pExpr;
87412 pRight = pList->a[0].pExpr;
87477 ExprList *pList;
87485 pList = pExpr->x.pList;
87486 if( pList->nExpr!=2 ){
87489 if( pList->a[1].pExpr->op != TK_COLUMN ){
87777 ExprList *pList = 0; /* The RHS of the IN operator */
87787 pList = sqlite3ExprListAppend(pWC->pParse, pList, pDup);
87797 pNew->x.pList = pList;
87805 sqlite3ExprListDelete(db, pList);
87863 pTerm->prereqRight = exprListTableUsage(pMaskSet, pExpr->x.pList);
87937 ExprList *pList = pExpr->x.pList;
87940 assert( pList!=0 );
87941 assert( pList->nExpr==2 );
87947 sqlite3ExprDup(db, pList->a[i].pExpr, 0), 0);
87990 pLeft = pExpr->x.pList->a[1].pExpr;
88039 pRight = pExpr->x.pList->a[0].pExpr;
88040 pLeft = pExpr->x.pList->a[1].pExpr;
88070 ** Return TRUE if any of the expressions in pList->a[iFirst...] contain
88074 ExprList *pList, /* Search expressions in ths list */
88080 while( iFirst<pList->nExpr ){
88081 if( (exprTableUsage(pMaskSet, pList->a[iFirst++].pExpr)&allowed)!=0 ){
89107 }else if( pExpr->x.pList ){
89108 nInMul *= pExpr->x.pList->nExpr + 1;
93574 ExprList *pList;
93575 pList = sqlite3ExprListAppend(pParse,0, yymsp[-1].minor.yy346.pExpr);
93576 pList = sqlite3ExprListAppend(pParse,pList, yymsp[-3].minor.yy346.pExpr);
93578 pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy346.pExpr);
93580 yygotominor.yy346.pExpr = sqlite3ExprFunction(pParse, pList, &yymsp[-2].minor.yy96.eOperator);
93617 ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy346.pExpr);
93618 pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy346.pExpr);
93621 yygotominor.yy346.pExpr->x.pList = pList;
93623 sqlite3ExprListDelete(pParse->db, pList);
93634 yygotominor.yy346.pExpr->x.pList = yymsp[-1].minor.yy14;
93707 yygotominor.yy346.pExpr->x.pList = yymsp[-2].minor.yy14;
100376 char *pList; /* Pointer to token doclist */
100377 int nList; /* Size of buffer at pList */
100379 rc = fts3TermSelect(p, iCol, z, n, isPrefix, isTermPos, &nList, &pList);
100383 pOut = pList;
100391 ** so that it is safe to use pList as the output as well as an input
100398 fts3DoclistMerge(mergetype, 0, 0, pList, &nOut, pOut, nOut, pList, nList);
100400 pOut = pList;
104296 PendingList *pList;
104306 pList = (PendingList *)fts3HashFind(&p->pendingTerms, zToken, nToken);
104307 if( pList ){
104308 p->nPendingData -= (pList->nData + nToken + sizeof(Fts3HashElem));
104310 if( fts3PendingListAppend(&pList, p->iPrevDocid, iCol, iPos, &rc) ){
104311 if( pList==fts3HashInsert(&p->pendingTerms, zToken, nToken, pList) ){
104316 sqlite3_free(pList);
104321 p->nPendingData += (pList->nData + nToken + sizeof(Fts3HashElem));
104573 PendingList *pList = (PendingList *)fts3HashData(pElem);
104576 pReader->nNode = pReader->nDoclist = pList->nData + 1;
104577 pReader->aNode = pReader->aDoclist = pList->aData;
105634 char *pList = *ppList;
105636 char *pEnd = &pList[nList];
105638 char *p = pList;
105646 nList = (int)(p - pList);
105650 nList -= (int)(p - pList);
105651 pList = p;
105655 p = &pList[1];
105659 *ppList = pList;
105809 char *pList;
105813 fts3SegReaderNextDocid(apSegment[0], &pList, &nList);
105824 fts3ColumnFilter(pFilter->iCol, &pList, &nList);
105842 memcpy(&aBuffer[nDoclist], pList, nList);
106991 char *pList = apList[i];
106993 if( !pList ){
107002 if( 0==((*pList
107006 fts3GetDeltaPosition(&pList, &iPrev);
107010 apList[i] = pList;