Lines Matching refs:pX
22173 struct tm *pX; in osLocaltime() local
22178 pX = localtime(t); in osLocaltime()
22180 if( sqlite3GlobalConfig.bLocaltimeFault ) pX = 0; in osLocaltime()
22182 if( pX ) *pTm = *pX; in osLocaltime()
22184 rc = pX==0; in osLocaltime()
26042 static int debugMutexHeld(sqlite3_mutex *pX){ in debugMutexHeld() argument
26043 sqlite3_debug_mutex *p = (sqlite3_debug_mutex*)pX; in debugMutexHeld()
26046 static int debugMutexNotheld(sqlite3_mutex *pX){ in debugMutexNotheld() argument
26047 sqlite3_debug_mutex *p = (sqlite3_debug_mutex*)pX; in debugMutexNotheld()
26093 static void debugMutexFree(sqlite3_mutex *pX){ in debugMutexFree() argument
26094 sqlite3_debug_mutex *p = (sqlite3_debug_mutex*)pX; in debugMutexFree()
26116 static void debugMutexEnter(sqlite3_mutex *pX){ in debugMutexEnter() argument
26117 sqlite3_debug_mutex *p = (sqlite3_debug_mutex*)pX; in debugMutexEnter()
26118 assert( p->id==SQLITE_MUTEX_RECURSIVE || debugMutexNotheld(pX) ); in debugMutexEnter()
26121 static int debugMutexTry(sqlite3_mutex *pX){ in debugMutexTry() argument
26122 sqlite3_debug_mutex *p = (sqlite3_debug_mutex*)pX; in debugMutexTry()
26123 assert( p->id==SQLITE_MUTEX_RECURSIVE || debugMutexNotheld(pX) ); in debugMutexTry()
26134 static void debugMutexLeave(sqlite3_mutex *pX){ in debugMutexLeave() argument
26135 sqlite3_debug_mutex *p = (sqlite3_debug_mutex*)pX; in debugMutexLeave()
26136 assert( debugMutexHeld(pX) ); in debugMutexLeave()
26138 assert( p->id==SQLITE_MUTEX_RECURSIVE || debugMutexNotheld(pX) ); in debugMutexLeave()
29614 Window *pX;
29617 for(pX=p->pWin; pX; pX=pX->pNextWin){
29618 sqlite3TreeViewWinFunc(pView, pX, pX->pNextWin!=0);
29644 Window *pX;
29646 for(pX=p->pWinDefn; pX; pX=pX->pNextWin){
29647 sqlite3TreeViewWindow(pView, pX, pX->pNextWin!=0);
30046 Expr *pX = pExpr->pLeft;
30050 sqlite3TreeViewExpr(pView, pX, 1);
38264 unixShm *pX; /* For looping over all siblings */
38307 for(pX=pShmNode->pFirst; pX; pX=pX->pNext){
38308 if( pX==p ) continue;
38309 assert( (pX->exclMask & (p->exclMask|p->sharedMask))==0 );
38310 allMask |= pX->sharedMask;
38332 for(pX=pShmNode->pFirst; pX; pX=pX->pNext){
38333 if( (pX->exclMask & mask)!=0 ){
38337 allShared |= pX->sharedMask;
38357 for(pX=pShmNode->pFirst; pX; pX=pX->pNext){
38358 if( (pX->exclMask & mask)!=0 || (pX->sharedMask & mask)!=0 ){
45657 winShm *pX; /* For looping over all siblings */
45677 for(pX=pShmNode->pFirst; pX; pX=pX->pNext){
45678 if( pX==p ) continue;
45679 assert( (pX->exclMask & (p->exclMask|p->sharedMask))==0 );
45680 allMask |= pX->sharedMask;
45702 for(pX=pShmNode->pFirst; pX; pX=pX->pNext){
45703 if( (pX->exclMask & mask)!=0 ){
45707 allShared |= pX->sharedMask;
45727 for(pX=pShmNode->pFirst; pX; pX=pX->pNext){
45728 if( (pX->exclMask & mask)!=0 || (pX->sharedMask & mask)!=0 ){
49974 PgHdr1 *pX = (PgHdr1*)&zBulk[pCache->szPage];
49975 pX->page.pBuf = zBulk;
49976 pX->page.pExtra = &pX[1];
49977 pX->isBulkLocal = 1;
49978 pX->isAnchor = 0;
49979 pX->pNext = pCache->pFree;
49980 pX->pLruPrev = 0; /* Initializing this saves a valgrind error */
49981 pCache->pFree = pX;
68705 BtCursor *pX; /* Looping over other all cursors */
68751 for(pX=pBt->pCursor; pX; pX=pX->pNext){
68752 if( pX->pgnoRoot==(Pgno)iTable ){
68753 pX->curFlags |= BTCF_Multiple;
70784 const BtreePayload *pX, /* Payload with which to construct the cell */
70808 nPayload = pX->nData + pX->nZero;
70809 pSrc = pX->pData;
70810 nSrc = pX->nData;
70813 nHeader += putVarint(&pCell[nHeader], *(u64*)&pX->nKey);
70815 assert( pX->nKey<=0x7fffffff && pX->pKey!=0 );
70816 nSrc = nPayload = (int)pX->nKey;
70817 pSrc = pX->pKey;
70870 assert( info.nKey==pX->nKey );
72833 const BtreePayload *pX, /* Source of data to write */
72837 int nData = pX->nData - iOffset;
72851 int rc = btreeOverwriteContent(pPage, pDest+nData, pX, iOffset+nData,
72856 if( memcmp(pDest, ((u8*)pX->pData) + iOffset, iAmt)!=0 ){
72863 memmove(pDest, ((u8*)pX->pData) + iOffset, iAmt);
72873 static int btreeOverwriteCell(BtCursor *pCur, const BtreePayload *pX){
72875 int nTotal = pX->nData + pX->nZero; /* Total bytes of to write */
72888 rc = btreeOverwriteContent(pPage, pCur->info.pPayload, pX,
72911 rc = btreeOverwriteContent(pPage, pPage->aData+4, pX,
72954 const BtreePayload *pX, /* Content of the row to be inserted */
72986 assert( (pX->pKey==0)==(pCur->pKeyInfo==0) );
73005 assert( pX->pKey==0 );
73008 invalidateIncrblobCursors(p, pCur->pgnoRoot, pX->nKey, 0);
73016 assert( pX->nKey==pCur->info.nKey );
73025 if( (pCur->curFlags&BTCF_ValidNKey)!=0 && pX->nKey==pCur->info.nKey ){
73028 assert( pX->nData>=0 && pX->nZero>=0 );
73030 && pCur->info.nPayload==(u32)pX->nData+pX->nZero
73033 return btreeOverwriteCell(pCur, pX);
73041 rc = sqlite3BtreeMovetoUnpacked(pCur, 0, pX->nKey, flags!=0, &loc);
73058 if( pX->nMem ){
73061 r.aMem = pX->aMem;
73062 r.nField = pX->nMem;
73070 rc = btreeMoveto(pCur, pX->pKey, pX->nKey, flags!=0, &loc);
73081 if( pCur->info.nKey==pX->nKey ){
73083 x2.pData = pX->pKey;
73084 x2.nData = pX->nKey;
73096 assert( pPage->intKey || pX->nKey>=0 );
73104 pCur->pgnoRoot, pX->nKey, pX->nData, pPage->pgno,
73109 rc = fillInCell(pPage, newCell, pX, &szNew);
73199 pCur->pKey = sqlite3Malloc( pX->nKey );
73203 memcpy(pCur->pKey, pX->pKey, pX->nKey);
73207 pCur->nKey = pX->nKey;
76592 Mem *pX;
76593 for(i=1, pX=pVdbe->aMem+1; i<pVdbe->nMem; i++, pX++){
76594 if( pX->pScopyFrom==pMem ){
76598 (int)(pX - pVdbe->aMem), (int)(pMem - pVdbe->aMem));
76606 mFlags = pMem->flags & pX->flags & pX->mScopyFlags;
76607 assert( (mFlags&(MEM_Int|MEM_IntReal))==0 || pMem->u.i==pX->u.i );
76611 pX->flags = MEM_Undefined;
76612 pX->pScopyFrom = 0;
88868 Btree *pX;
88901 pX = pDb->pBt;
88902 assert( pX!=0 );
88947 rc = sqlite3BtreeCursor(pX, p2, wrFlag, pKeyInfo, pCur->uc.pCursor);
92641 Mem *pX;
92660 pX = &aMem[pOp->p3];
92662 assert( memIsValid(pX) );
92663 memAboutToChange(p, pX);
92664 apArg[i] = pX;
92665 pX++;
101845 static Select *isCandidateForInOpt(Expr *pX){
101851 if( !ExprHasProperty(pX, EP_xIsSelect) ) return 0; /* Not a subquery */
101852 if( ExprHasProperty(pX, EP_VarSelect) ) return 0; /* Correlated subq */
101853 p = pX->x.pSelect;
102002 Expr *pX, /* The IN expression */
102014 assert( pX->op==TK_IN );
102022 if( prRhsHasNull && (pX->flags & EP_xIsSelect) ){
102024 ExprList *pEList = pX->x.pSelect->pEList;
102036 if( pParse->nErr==0 && (p = isCandidateForInOpt(pX))!=0 ){
102074 Expr *pLhs = sqlite3VectorFieldSubexpr(pX->pLeft, i);
102117 Expr *pLhs = sqlite3VectorFieldSubexpr(pX->pLeft, i);
102177 && !ExprHasProperty(pX, EP_xIsSelect)
102178 && (!sqlite3InRhsIsConstant(pX) || pX->x.pList->nExpr<=2)
102195 assert( pX->op==TK_IN );
102196 sqlite3CodeRhsOfIN(pParse, pX, iTab);
102205 n = sqlite3ExprVectorSize(pX->pLeft);
103920 Expr *pX; /* The X expression */
103931 if( (pX = pExpr->pLeft)!=0 ){
103932 pDel = sqlite3ExprDup(db, pX, 0);
103937 testcase( pX->op==TK_COLUMN );
103951 if( pX ){
112375 Expr *pX = p->aCol[ii].pDflt;
112378 if( sqlite3ResolveSelfReference(pParse, p, NC_GenCol, pX, 0) ){
112385 sqlite3ExprDelete(db, pX);
133278 Select *pX;
133279 for(pX=pSubq; pX; pX=pX->pPrior){
133280 assert( (pX->selFlags & (SF_Recursive))==0 );
133457 Select *pX;
133466 for(pX=p; pX && (pX->op==TK_ALL || pX->op==TK_SELECT); pX=pX->pPrior){}
133467 if( pX==0 ) return WRC_Continue;
134029 struct ExprList_item *pX = &pNew->a[pNew->nExpr-1];
134030 sqlite3DbFree(db, pX->zEName);
134032 pX->zEName = sqlite3DbStrDup(db, pSub->pEList->a[j].zEName);
134033 testcase( pX->zEName==0 );
134035 pX->zEName = sqlite3MPrintf(db, "%s.%s.%s",
134037 testcase( pX->zEName==0 );
134039 pX->eEName = ENAME_TAB;
141149 Expr *pX /* The IN expression to be reduced */
141153 pNew = sqlite3ExprDup(db, pX, 0);
141163 if( pLoop->aLTerm[i]->pExpr==pX ){
141203 sqlite3TreeViewExpr(0, pX, 0);
141235 Expr *pX = pTerm->pExpr;
141241 if( pX->op==TK_EQ || pX->op==TK_IS ){
141242 iReg = sqlite3ExprCodeTarget(pParse, pX->pRight, iTarget);
141243 }else if( pX->op==TK_ISNULL ){
141264 assert( pX->op==TK_IN );
141268 if( pLoop->aLTerm[i] && pLoop->aLTerm[i]->pExpr==pX ){
141275 if( pLoop->aLTerm[i]->pExpr==pX ) nEq++;
141279 if( (pX->flags & EP_xIsSelect)==0 || pX->x.pSelect->pEList->nExpr==1 ){
141280 eType = sqlite3FindInIndex(pParse, pX, IN_INDEX_LOOP, 0, 0, &iTab);
141283 pX = removeUnindexableInClauseTerms(pParse, iEq, pLoop, pX);
141287 eType = sqlite3FindInIndex(pParse, pX, IN_INDEX_LOOP, 0, aiMap, &iTab);
141290 sqlite3ExprDelete(db, pX);
141291 pX = pTerm->pExpr;
141318 if( pLoop->aLTerm[i]->pExpr==pX ){
141874 IdxExprTrans *pX = p->u.pIdxTrans;
141875 if( sqlite3ExprCompare(0, pExpr, pX->pIdxExpr, pX->iTabCur)==0 ){
141876 preserveExpr(pX, pExpr);
141879 pExpr->iTable = pX->iIdxCur;
141880 pExpr->iColumn = pX->iIdxCol;
141897 IdxExprTrans *pX = p->u.pIdxTrans;
141898 if( pExpr->iTable==pX->iTabCur && pExpr->iColumn==pX->iTabCol ){
141900 preserveExpr(pX, pExpr);
141902 pExpr->iTable = pX->iIdxCur;
141903 pExpr->iColumn = pX->iIdxCol;
142234 Expr *pX; /* The expression that defines the start bound */
142253 pX = pStart->pExpr;
142254 assert( pX!=0 );
142256 if( sqlite3ExprIsVector(pX->pRight) ){
142258 codeExprOrVector(pParse, pX->pRight, r1, 1);
142259 testcase( pX->op==TK_GT );
142260 testcase( pX->op==TK_GE );
142261 testcase( pX->op==TK_LT );
142262 testcase( pX->op==TK_LE );
142263 op = aMoveOp[((pX->op - TK_GT - 1) & 0x3) | 0x1];
142264 assert( pX->op!=TK_GT || op==OP_SeekGE );
142265 assert( pX->op!=TK_GE || op==OP_SeekGE );
142266 assert( pX->op!=TK_LT || op==OP_SeekLE );
142267 assert( pX->op!=TK_LE || op==OP_SeekLE );
142269 r1 = sqlite3ExprCodeTemp(pParse, pX->pRight, &rTemp);
142271 op = aMoveOp[(pX->op - TK_GT)];
142275 VdbeCoverageIf(v, pX->op==TK_GT);
142276 VdbeCoverageIf(v, pX->op==TK_LE);
142277 VdbeCoverageIf(v, pX->op==TK_LT);
142278 VdbeCoverageIf(v, pX->op==TK_GE);
142286 Expr *pX;
142287 pX = pEnd->pExpr;
142288 assert( pX!=0 );
142293 codeExprOrVector(pParse, pX->pRight, memEndValue, 1);
142294 if( 0==sqlite3ExprIsVector(pX->pRight)
142295 && (pX->op==TK_LT || pX->op==TK_GT)
142301 if( 0==sqlite3ExprIsVector(pX->pRight) ){
145065 Expr *pX; /* An expression being tested */
145087 && (pX = sqlite3ExprSkipCollateAndLikely(pTerm->pExpr->pRight))->op
145092 if( pScan->aiCur[j]==pX->iTable
145093 && pScan->aiColumn[j]==pX->iColumn ){
145098 pScan->aiCur[j] = pX->iTable;
145099 pScan->aiColumn[j] = pX->iColumn;
145108 pX = pTerm->pExpr;
145109 if( !sqlite3IndexAffinityOk(pX, pScan->idxaff) ){
145112 assert(pX->pLeft);
145113 pColl = sqlite3ExprCompareCollSeq(pParse, pX);
145120 && (pX = pTerm->pExpr->pRight)->op==TK_COLUMN
145121 && pX->iTable==pScan->aiCur[0]
145122 && pX->iColumn==pScan->aiColumn[0]
145631 Expr *pX = pTerm->pExpr;
145634 pColl = sqlite3ExprCompareCollSeq(pParse, pX);
146791 const WhereLoop *pX, /* First WhereLoop to compare */
146795 if( pX->nLTerm-pX->nSkip >= pY->nLTerm-pY->nSkip ){
146798 if( pY->nSkip > pX->nSkip ) return 0;
146799 if( pX->rRun >= pY->rRun ){
146800 if( pX->rRun > pY->rRun ) return 0; /* X costs more than Y */
146801 if( pX->nOut > pY->nOut ) return 0; /* X costs more than Y */
146803 for(i=pX->nLTerm-1; i>=0; i--){
146804 if( pX->aLTerm[i]==0 ) continue;
146806 if( pY->aLTerm[j]==pX->aLTerm[i] ) break;
146810 if( (pX->wsFlags&WHERE_IDX_ONLY)!=0
147098 WhereTerm *pTerm, *pX;
147110 pX = pLoop->aLTerm[j];
147111 if( pX==0 ) continue;
147112 if( pX==pTerm ) break;
147113 if( pX->iParent>=0 && (&pWC->a[pX->iParent])==pTerm ) break;
148138 Expr *pX = pHidden->pWC->a[iTerm].pExpr;
148139 if( pX->pLeft ){
148140 pC = sqlite3ExprCompareCollSeq(pHidden->pParse, pX);
148673 Expr *pX = pLoop->aLTerm[j]->pExpr;
148675 if( pLoop->aLTerm[i]->pExpr==pX ){
148914 WhereLoop **pX; /* Used to divy up the pSpace memory */
148948 pX = (WhereLoop**)(aFrom+mxChoice);
148949 for(ii=mxChoice*2, pFrom=aTo; ii>0; ii--, pFrom++, pX += nLoop){
148950 pFrom->aLoop = pX;
148959 aSortCost = (LogEst*)pX;
148963 assert( aSortCost!=0 || &pSpace[nSpace]==(char*)pX );
166434 const unsigned char *pX = (const unsigned char*)pEnd;
166438 u64 c = p<pX ? *p : 0;