Home | History | Annotate | Download | only in dist

Lines Matching refs:pList

9074 ** Expr.x.pList is a list of arguments if the expression is an SQL function,
9078 ** Expr.flags mask, then Expr.x.pSelect is valid. Otherwise, Expr.x.pList is
9115 ** the subtrees in Expr.x.pList or Expr.x.pSelect are always separately
9135 ExprList *pList; /* Function arguments or in "<expr> IN (<expr-list)" */
9175 #define EP_xIsSelect 0x0800 /* x.pSelect is valid (otherwise x.pList is) */
31350 static struct RowSetEntry *rowSetListToTree(struct RowSetEntry *pList){
31355 assert( pList!=0 );
31356 p = pList;
31357 pList = p->pRight;
31359 for(iDepth=1; pList; iDepth++){
31361 p = pList;
31362 pList = p->pRight;
31364 p->pRight = rowSetNDeepTree(&pList, iDepth);
34273 static int pager_write_pagelist(PgHdr *pList){
34277 if( NEVER(pList==0) ) return SQLITE_OK;
34278 pPager = pList->pPager;
34308 while( rc==SQLITE_OK && pList ){
34309 Pgno pgno = pList->pgno;
34321 if( pgno<=pPager->dbSize && 0==(pList->flags&PGHDR_DONT_WRITE) ){
34326 CODEC2(pPager, pList->pData, pgno, 6, return SQLITE_NOMEM, pData);
34343 sqlite3BackupUpdate(pPager->pBackup, pgno, (u8*)pList->pData);
34346 PAGERID(pPager), pgno, pager_pagehash(pList)));
34354 pList->pageHash = pager_pagehash(pList);
34356 pList = pList->pDirty;
39702 BtShared *pList;
39713 pList = GLOBAL(BtShared*,sqlite3SharedCacheList);
39714 while( ALWAYS(pList) && pList->pNext!=pBt ){
39715 pList=pList->pNext;
39717 if( ALWAYS(pList) ){
39718 pList->pNext = pBt->pNext;
59226 if( sqlite3WalkExprList(pWalker, pExpr->x.pList) ) return WRC_Abort;
59616 assert( pExpr->x.pList==0 );
59821 ExprList *pList = pExpr->x.pList; /* The argument list */
59822 int n = pList ? pList->nExpr : 0; /* Number of arguments */
59878 sqlite3WalkExprList(pWalker, pList);
60828 ** argument. An expression with no children, Expr.pList or
60840 heightOfExprList(p->x.pList, &nHeight);
61020 SQLITE_PRIVATE Expr *sqlite3ExprFunction(Parse *pParse, ExprList *pList, Token *pToken){
61026 sqlite3ExprListDelete(db, pList); /* Avoid memory leak when malloc fails */
61029 pNew->x.pList = pList;
61132 sqlite3ExprListDelete(db, p->x.pList);
61195 if( p->pLeft || p->pRight || p->pColl || p->x.pList ){
61228 ** descended from the Expr.x.pList or Expr.x.pSelect variables).
61302 /* Fill in the pNew->x.pSelect or pNew->x.pList member. */
61306 pNew->x.pList = sqlite3ExprListDup(db, p->x.pList, isReduced);
61475 ** Add a new element to the end of an expression list. If pList is
61484 ExprList *pList, /* List to which to append. Might be NULL */
61488 if( pList==0 ){
61489 pList = sqlite3DbMallocZero(db, sizeof(ExprList) );
61490 if( pList==0 ){
61493 assert( pList->nAlloc==0 );
61495 if( pList->nAlloc<=pList->nExpr ){
61497 int n = pList->nAlloc*2 + 4;
61498 a = sqlite3DbRealloc(db, pList->a, n*sizeof(pList->a[0]));
61502 pList->a = a;
61503 pList->nAlloc = sqlite3DbMallocSize(db, a)/sizeof(a[0]);
61505 assert( pList->a!=0 );
61507 struct ExprList_item *pItem = &pList->a[pList->nExpr++];
61511 return pList;
61516 sqlite3ExprListDelete(db, pList);
61524 ** pList might be NULL following an OOM error. But pName should never be
61530 ExprList *pList, /* List to which to add the span. */
61534 assert( pList!=0 || pParse->db->mallocFailed!=0 );
61535 if( pList ){
61537 assert( pList->nExpr>0 );
61538 pItem = &pList->a[pList->nExpr-1];
61549 ** pList might be NULL following an OOM error. But pSpan should never be
61555 ExprList *pList, /* List to which to add the span. */
61559 assert( pList!=0 || db->mallocFailed!=0 );
61560 if( pList ){
61561 struct ExprList_item *pItem = &pList->a[pList->nExpr-1];
61562 assert( pList->nExpr>0 );
61590 SQLITE_PRIVATE void sqlite3ExprListDelete(sqlite3 *db, ExprList *pList){
61593 if( pList==0 ) return;
61594 assert( pList->a!=0 || (pList->nExpr==0 && pList->nAlloc==0) );
61595 assert( pList->nExpr<=pList->nAlloc );
61596 for(pItem=pList->a, i=0; i<pList->nExpr; i++, pItem++){
61601 sqlite3DbFree(db, pList->a);
61602 sqlite3DbFree(db, pList);
62155 }else if( pExpr->x.pList!=0 ){
62164 ExprList *pList = pExpr->x.pList;
62177 for(i=pList->nExpr, pItem=pList->a; i>0; i--, pItem++){
63077 pFarg = pExpr->x.pList;
63186 ** Y is stored in pExpr->pList->a[0].pExpr.
63187 ** Z is stored in pExpr->pList->a[1].pExpr.
63191 struct ExprList_item *pLItem = pExpr->x.pList->a;
63285 ** Ei is in pExpr->pList->a[i*2] and Ri is pExpr->pList->a[i*2+1].
63304 assert( !ExprHasProperty(pExpr, EP_xIsSelect) && pExpr->x.pList );
63305 assert((pExpr->x.pList->nExpr % 2) == 0);
63306 assert(pExpr->x.pList->nExpr > 0);
63307 pEList = pExpr->x.pList;
63535 ExprList *pList = pExpr->x.pList;
63537 if( pList ){
63538 int i = pList->nExpr;
63539 struct ExprList_item *pItem = pList->a;
63582 ExprList *pList, /* The expression list to be coded */
63588 assert( pList!=0 );
63590 n = pList->nExpr;
63591 for(pItem=pList->a, i=0; i<n; i++, pItem++){
63640 compLeft.pRight = pExpr->x.pList->a[0].pExpr;
63643 compRight.pRight = pExpr->x.pList->a[1].pExpr;
63959 if( pA->x.pList && pB->x.pList ){
63960 if( pA->x.pList->nExpr!=pB->x.pList->nExpr ) return 0;
63961 for(i=0; i<pA->x.pList->nExpr; i++){
63962 Expr *pExprA = pA->x.pList->a[i].pExpr;
63963 Expr *pExprB = pB->x.pList->a[i].pExpr;
63966 }else if( pA->x.pList || pB->x.pList ){
64129 pExpr->x.pList ? pExpr->x.pList->nExpr : 0, enc, 0);
64184 SQLITE_PRIVATE void sqlite3ExprAnalyzeAggList(NameContext *pNC, ExprList *pList){
64187 if( pList ){
64188 for(pItem=pList->a, i=0; i<pList->nExpr; i++, pItem++){
66131 SrcList *pList /* The Source list to check and modify */
66137 if( NEVER(pList==0) ) return 0;
66139 for(i=0, pItem=pList->a; i<pList->nSrc; i++, pItem++){
66186 if( sqlite3FixExprList(pFix, pExpr->x.pList) ) return 1;
66197 ExprList *pList /* The expression to be fixed to one database */
66201 if( pList==0 ) return 0;
66202 for(i=0, pItem=pList->a; i<pList->nExpr; i++, pItem++){
67588 ** Designate the PRIMARY KEY for the table. pList is a list of names
67589 ** of columns that form the primary key. If pList is NULL, then the
67607 ExprList *pList, /* List of field names to be indexed */
67622 if( pList==0 ){
67626 for(i=0; i<pList->nExpr; i++){
67628 if( sqlite3StrICmp(pList->a[i].zName, pTab->aCol[iCol].zName)==0 ){
67636 if( pList->nExpr>1 ) iCol = -1;
67654 p = sqlite3CreateIndex(pParse, 0, 0, 0, pList, onError, 0, 0, sortOrder, 0);
67658 pList = 0;
67662 sqlite3ExprListDelete(pParse->db, pList);
68843 ** pList is a list of columns to be indexed. pList will be NULL if this
68856 ExprList *pList, /* A list of columns to be indexed */
68860 int sortOrder, /* Sort order of primary key when pList==NULL */
68876 struct ExprList_item *pListItem; /* For looping over pList */
69012 /* If pList==0, it means this routine was called to make a primary
69016 if( pList==0 ){
69019 pList = sqlite3ExprListAppend(pParse, 0, 0);
69020 if( pList==0 ) goto exit_create_index;
69021 sqlite3ExprListSetName(pParse, pList, &nullId, 0);
69022 pList->a[0].sortOrder = (u8)sortOrder;
69028 for(i=0; i<pList->nExpr; i++){
69029 Expr *pExpr = pList->a[i].pExpr;
69044 nCol = pList->nExpr;
69065 pIndex->nColumn = pList->nExpr;
69088 for(i=0, pListItem=pList->a; i<pList->nExpr; i++, pListItem++){
69309 sqlite3ExprListDelete(db, pList);
69472 SQLITE_PRIVATE IdList *sqlite3IdListAppend(sqlite3 *db, IdList *pList, Token *pToken){
69474 if( pList==0 ){
69475 pList = sqlite3DbMallocZero(db, sizeof(IdList) );
69476 if( pList==0 ) return 0;
69477 pList->nAlloc = 0;
69479 pList->a = sqlite3ArrayAllocate(
69481 pList->a,
69482 sizeof(pList->a[0]),
69484 &pList->nId,
69485 &pList->nAlloc,
69489 sqlite3IdListDelete(db, pList);
69492 pList->a[i].zName = sqlite3NameFromToken(db, pToken);
69493 return pList;
69499 SQLITE_PRIVATE void sqlite3IdListDelete(sqlite3 *db, IdList *pList){
69501 if( pList==0 ) return;
69502 for(i=0; i<pList->nId; i++){
69503 sqlite3DbFree(db, pList->a[i].zName);
69505 sqlite3DbFree(db, pList->a);
69506 sqlite3DbFree(db, pList);
69510 ** Return the index in pList of the identifier named zId. Return -1
69513 SQLITE_PRIVATE int sqlite3IdListIndex(IdList *pList, const char *zName){
69515 if( pList==0 ) return -1;
69516 for(i=0; i<pList->nId; i++){
69517 if( sqlite3StrICmp(pList->a[i].zName, zName)==0 ) return i;
69595 ** a new one. If an OOM error does occurs, then the prior value of pList
69625 SrcList *pList, /* Append to this SrcList. NULL creates a new SrcList */
69631 if( pList==0 ){
69632 pList = sqlite3DbMallocZero(db, sizeof(SrcList) );
69633 if( pList==0 ) return 0;
69634 pList->nAlloc = 1;
69636 pList = sqlite3SrcListEnlarge(db, pList, 1, pList->nSrc);
69638 sqlite3SrcListDelete(db, pList);
69641 pItem = &pList->a[pList->nSrc-1];
69652 return pList;
69658 SQLITE_PRIVATE void sqlite3SrcListAssignCursors(Parse *pParse, SrcList *pList){
69661 assert(pList || pParse->db->mallocFailed );
69662 if( pList ){
69663 for(i=0, pItem=pList->a; i<pList->nSrc; i++, pItem++){
69676 SQLITE_PRIVATE void sqlite3SrcListDelete(sqlite3 *db, SrcList *pList){
69679 if( pList==0 ) return;
69680 for(pItem=pList->a, i=0; i<pList->nSrc; i++, pItem++){
69690 sqlite3DbFree(db, pList);
72684 || !pExpr->x.pList
72685 || pExpr->x.pList->nExpr!=2
73766 ExprList *pList = 0; /* Changes list if ON UPDATE CASCADE */
73839 pList = sqlite3ExprListAppend(pParse, pList, pNew);
73840 sqlite3ExprListSetName(pParse, pList, &tFromCol, 0);
73887 pStep->pExprList = sqlite3ExprListDup(db, pList, EXPRDUP_REDUCE);
73900 sqlite3ExprListDelete(db, pList);
74335 ** The pList parameter holds EXPRLIST in the first form of the INSERT
74336 ** statement above, and pSelect is NULL. For the second form, pList is
74430 ExprList *pList, /* List of values to be inserted */
74549 assert( pList==0 );
74668 nColumn = pList ? pList->nExpr : 0;
74670 if( sqlite3ResolveExprNames(&sNC, pList->a[i].pExpr) ){
74822 sqlite3ExprCode(pParse, pList->a[keyColumn].pExpr, regCols);
74851 sqlite3ExprCodeAndCache(pParse, pList->a[j].pExpr, regCols+i+1);
74889 sqlite3ExprCode(pParse, pList->a[keyColumn].pExpr, regRowid);
74956 sqlite3ExprCode(pParse, pList->a[j].pExpr, iRegStore);
75038 sqlite3ExprListDelete(db, pList);
79624 IdList *pList = pRight->pUsing;
79625 for(j=0; j<pList->nId; j++){
79631 zName = pList->a[j].zName;
79989 static KeyInfo *keyInfoFromExprList(Parse *pParse, ExprList *pList){
79996 nExpr = pList->nExpr;
80003 for(i=0, pItem=pList->a; i<nExpr; i++, pItem++){
81661 substExprList(db, pExpr->x.pList, iTable, pEList);
81668 ExprList *pList, /* List to scan and in which to make substitutes */
81673 if( pList==0 ) return;
81674 for(i=0; i<pList->nExpr; i++){
81675 pList->a[i].pExpr = substExpr(db, pList->a[i].pExpr, iTable, pEList);
81824 ExprList *pList; /* The result set of the outer query */
82114 pList = pParent->pEList;
82115 for(i=0; i<pList->nExpr; i++){
82116 if( pList->a[i].zName==0 ){
82117 const char *zSpan = pList->a[i].zSpan;
82119 pList->a[i].zName = sqlite3DbStrDup(db, zSpan);
82199 pEList = pExpr->x.pList;
82657 if( pE->x.pList==0 || pE->x.pList->nExpr!=1 ){
82662 KeyInfo *pKeyInfo = keyInfoFromExprList(pParse, pE->x.pList);
82679 ExprList *pList = pF->pExpr->x.pList;
82681 sqlite3VdbeAddOp4(v, OP_AggFinal, pF->iMem, pList ? pList->nExpr : 0, 0,
82702 ExprList *pList = pF->pExpr->x.pList;
82704 if( pList ){
82705 nArg = pList->nExpr;
82707 sqlite3ExprCodeExprList(pParse, pList, regAgg, 0);
82721 assert( pList!=0 ); /* pList!=0 if pF->pFunc has NEEDCOLL */
82722 for(j=0, pItem=pList->a; !pColl && j<nArg; j++, pItem++){
83066 sqlite3ExprAnalyzeAggList(&sNC, sAggInfo.aFunc[i].pExpr->x.pList);
83361 pMinMax = sqlite3ExprListDup(db, p->pEList->a[0].pExpr->x.pList,0);
83462 SQLITE_PRIVATE void sqlite3PrintExprList(ExprList *pList){
83464 for(i=0; i<pList->nExpr; i++){
83465 sqlite3PrintExpr(pList->a[i].pExpr);
83466 if( i<pList->nExpr-1 ){
83773 Trigger *pList = 0; /* List of triggers to return */
83786 pTrig->pNext = (pList ? pList : pTab->pTrigger);
83787 pList = pTrig;
83792 return (pList ? pList : pTab->pTrigger);
84349 Trigger *pList = sqlite3TriggerList(pParse, pTab);
84351 assert( pList==0 || IsVirtual(pTab)==0 );
84352 for(p=pList; p; p=p->pNext){
84360 return (mask ? pList : 0);
87196 mask |= exprListTableUsage(pMaskSet, p->x.pList);
87200 static Bitmask exprListTableUsage(WhereMaskSet *pMaskSet, ExprList *pList){
87203 if( pList ){
87204 for(i=0; i<pList->nExpr; i++){
87205 mask |= exprTableUsage(pMaskSet, pList->a[i].pExpr);
87386 ExprList *pList; /* List of operands to the LIKE operator */
87401 pList = pExpr->x.pList;
87402 pLeft = pList->a[1].pExpr;
87423 pRight = pList->a[0].pExpr;
87488 ExprList *pList;
87496 pList = pExpr->x.pList;
87497 if( pList->nExpr!=2 ){
87500 if( pList->a[1].pExpr->op != TK_COLUMN ){
87788 ExprList *pList = 0; /* The RHS of the IN operator */
87798 pList = sqlite3ExprListAppend(pWC->pParse, pList, pDup);
87808 pNew->x.pList = pList;
87816 sqlite3ExprListDelete(db, pList);
87874 pTerm->prereqRight = exprListTableUsage(pMaskSet, pExpr->x.pList);
87948 ExprList *pList = pExpr->x.pList;
87951 assert( pList!=0 );
87952 assert( pList->nExpr==2 );
87958 sqlite3ExprDup(db, pList->a[i].pExpr, 0), 0);
88001 pLeft = pExpr->x.pList->a[1].pExpr;
88050 pRight = pExpr->x.pList->a[0].pExpr;
88051 pLeft = pExpr->x.pList->a[1].pExpr;
88081 ** Return TRUE if any of the expressions in pList->a[iFirst...] contain
88085 ExprList *pList, /* Search expressions in ths list */
88091 while( iFirst<pList->nExpr ){
88092 if( (exprTableUsage(pMaskSet, pList->a[iFirst++].pExpr)&allowed)!=0 ){
89118 }else if( pExpr->x.pList ){
89119 nInMul *= pExpr->x.pList->nExpr + 1;
93585 ExprList *pList;
93586 pList = sqlite3ExprListAppend(pParse,0, yymsp[-1].minor.yy346.pExpr);
93587 pList = sqlite3ExprListAppend(pParse,pList
93589 pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy346.pExpr);
93591 yygotominor.yy346.pExpr = sqlite3ExprFunction(pParse, pList, &yymsp[-2].minor.yy96.eOperator);
93628 ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy346.pExpr);
93629 pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy346.pExpr);
93632 yygotominor.yy346.pExpr->x.pList = pList;
93634 sqlite3ExprListDelete(pParse->db, pList);
93645 yygotominor.yy346.pExpr->x.pList = yymsp[-1].minor.yy14;
93718 yygotominor.yy346.pExpr->x.pList = yymsp[-2].minor.yy14;
100410 char *pList; /* Pointer to token doclist */
100411 int nList; /* Size of buffer at pList */
100413 rc = fts3TermSelect(p, iCol, z, n, isPrefix, isTermPos, &nList, &pList);
100417 pOut = pList;
100425 ** so that it is safe to use pList as the output as well as an input
100432 fts3DoclistMerge(mergetype, 0, 0, pList, &nOut, pOut, nOut, pList, nList);
100434 pOut = pList;
104336 PendingList *pList;
104346 pList = (PendingList *)fts3HashFind(&p->pendingTerms, zToken, nToken);
104347 if( pList ){
104348 p->nPendingData -= (pList->nData + nToken + sizeof(Fts3HashElem));
104350 if( fts3PendingListAppend(&pList, p->iPrevDocid, iCol, iPos, &rc) ){
104351 if( pList==fts3HashInsert(&p->pendingTerms, zToken, nToken, pList) ){
104356 sqlite3_free(pList);
104361 p->nPendingData += (pList->nData + nToken + sizeof(Fts3HashElem));
104613 PendingList *pList = (PendingList *)fts3HashData(pElem);
104616 pReader->nNode = pReader->nDoclist = pList->nData + 1;
104617 pReader->aNode = pReader->aDoclist = pList->aData;
105674 char *pList = *ppList;
105676 char *pEnd = &pList[nList];
105678 char *p = pList;
105686 nList = (int)(p - pList);
105690 nList -= (int)(p - pList);
105691 pList = p;
105695 p = &pList[1];
105699 *ppList = pList;
105849 char *pList;
105853 fts3SegReaderNextDocid(apSegment[0], &pList, &nList);
105864 fts3ColumnFilter(pFilter->iCol, &pList, &nList);
105882 memcpy(&aBuffer[nDoclist], pList, nList);
107031 char *pList = apList[i];
107033 if( !pList ){
107042 if( 0==((*pList)&0xFE) ){
107046 fts3GetDeltaPosition(&pList, &iPrev);
107050 apList[i] = pList;