Lines Matching refs:pFrom
14725 Table *pFrom; /* Table containing the REFERENCES clause (aka: Child) */ member
22755 sqlite3_mutex_methods const *pFrom; in sqlite3MutexInit() local
22759 pFrom = sqlite3DefaultMutex(); in sqlite3MutexInit()
22761 pFrom = sqlite3NoopMutex(); in sqlite3MutexInit()
22763 pTo->xMutexInit = pFrom->xMutexInit; in sqlite3MutexInit()
22764 pTo->xMutexEnd = pFrom->xMutexEnd; in sqlite3MutexInit()
22765 pTo->xMutexFree = pFrom->xMutexFree; in sqlite3MutexInit()
22766 pTo->xMutexEnter = pFrom->xMutexEnter; in sqlite3MutexInit()
22767 pTo->xMutexTry = pFrom->xMutexTry; in sqlite3MutexInit()
22768 pTo->xMutexLeave = pFrom->xMutexLeave; in sqlite3MutexInit()
22769 pTo->xMutexHeld = pFrom->xMutexHeld; in sqlite3MutexInit()
22770 pTo->xMutexNotheld = pFrom->xMutexNotheld; in sqlite3MutexInit()
22772 pTo->xMutexAlloc = pFrom->xMutexAlloc; in sqlite3MutexInit()
65967 static void copyNodeContent(MemPage *pFrom, MemPage *pTo, int *pRC){
65969 BtShared * const pBt = pFrom->pBt;
65970 u8 * const aFrom = pFrom->aData;
65972 int const iFromHdr = pFrom->hdrOffset;
65978 assert( pFrom->isInit );
65979 assert( pFrom->nFree>=iToHdr );
65985 memcpy(&aTo[iToHdr], &aFrom[iFromHdr], pFrom->cellOffset + 2*pFrom->nCell);
69565 SQLITE_PRIVATE int sqlite3BtreeCopyFile(Btree *pTo, Btree *pFrom){
69570 sqlite3BtreeEnter(pFrom);
69575 i64 nByte = sqlite3BtreeGetPageSize(pFrom)*(i64)sqlite3BtreeLastPage(pFrom);
69587 b.pSrcDb = pFrom->db;
69588 b.pSrc = pFrom;
69593 sqlite3PagerAlignReserve(sqlite3BtreePager(pTo), sqlite3BtreePager(pFrom));
69614 sqlite3BtreeLeave(pFrom);
70402 static SQLITE_NOINLINE void vdbeClrCopy(Mem *pTo, const Mem *pFrom, int eType){
70405 sqlite3VdbeMemShallowCopy(pTo, pFrom, eType);
70407 SQLITE_PRIVATE void sqlite3VdbeMemShallowCopy(Mem *pTo, const Mem *pFrom, int srcType){
70408 assert( (pFrom->flags & MEM_RowSet)==0 );
70409 assert( pTo->db==pFrom->db );
70410 if( VdbeMemDynamic(pTo) ){ vdbeClrCopy(pTo,pFrom,srcType); return; }
70411 memcpy(pTo, pFrom, MEMCELLSIZE);
70412 if( (pFrom->flags&MEM_Static)==0 ){
70423 SQLITE_PRIVATE int sqlite3VdbeMemCopy(Mem *pTo, const Mem *pFrom){
70426 assert( (pFrom->flags & MEM_RowSet)==0 );
70428 memcpy(pTo, pFrom, MEMCELLSIZE);
70431 if( 0==(pFrom->flags&MEM_Static) ){
70446 SQLITE_PRIVATE void sqlite3VdbeMemMove(Mem *pTo, Mem *pFrom){
70447 assert( pFrom->db==0 || sqlite3_mutex_held(pFrom->db->mutex) );
70449 assert( pFrom->db==0 || pTo->db==0 || pFrom->db==pTo->db );
70452 memcpy(pTo, pFrom, sizeof(Mem));
70453 pFrom->flags = MEM_Null;
70454 pFrom->szMalloc = 0;
77501 Vdbe *pFrom = (Vdbe*)pFromStmt;
77504 assert( pTo->db==pFrom->db );
77505 assert( pTo->nVar==pFrom->nVar );
77507 for(i=0; i<pFrom->nVar; i++){
77508 sqlite3VdbeMemMove(&pTo->aVar[i], &pFrom->aVar[i]);
77528 Vdbe *pFrom = (Vdbe*)pFromStmt;
77530 if( pFrom->nVar!=pTo->nVar ){
77537 assert( pFrom->isPrepareV2 || pFrom->expmask==0 );
77538 if( pFrom->expmask ){
77539 pFrom->expired = 1;
96161 zWhere = whereOrName(pParse->db, zWhere, p->pFrom->zName);
96447 Table *pFrom = p->pFrom;
96448 if( pFrom!=pTab ){
96449 reloadTableSchema(pParse, p->pFrom, pFrom->zName);
97033 static void sampleCopy(Stat4Accum *p, Stat4Sample *pTo, Stat4Sample *pFrom){
97034 pTo->isPSample = pFrom->isPSample;
97035 pTo->iCol = pFrom->iCol;
97036 pTo->iHash = pFrom->iHash;
97037 memcpy(pTo->anEq, pFrom->anEq, sizeof(tRowcnt)*p->nCol);
97038 memcpy(pTo->anLt, pFrom->anLt, sizeof(tRowcnt)*p->nCol);
97039 memcpy(pTo->anDLt, pFrom->anDLt, sizeof(tRowcnt)*p->nCol);
97040 if( pFrom->nRowid ){
97041 sampleSetRowid(p->db, pTo, pFrom->nRowid, pFrom->u.aRowid);
97043 sampleSetRowidInt64(p->db, pTo, pFrom->u.iRowid);
102125 pFKey->pFrom = p;
104488 SrcList *pFrom;
104492 pFrom = sqlite3SrcListAppend(db, 0, 0, 0);
104493 if( pFrom ){
104494 assert( pFrom->nSrc==1 );
104495 pFrom->a[0].zName = sqlite3DbStrDup(db, pView->zName);
104496 pFrom->a[0].zDatabase = sqlite3DbStrDup(db, db->aDb[iDb].zDbSName);
104497 assert( pFrom->a[0].pOn==0 );
104498 assert( pFrom->a[0].pUsing==0 );
104500 pSel = sqlite3SelectNew(pParse, 0, pFrom, pWhere, 0, 0, 0,
107446 pFKey->pFrom->zName, pFKey->zTo);
107534 if( pTab==pFKey->pFrom && nIncr==1 ){
107566 if( pTab==pFKey->pFrom && nIncr==1 ){
107749 zCol = pFKey->pFrom->aCol[iCol].zName;
107766 if( pTab==pFKey->pFrom && nIncr>0 ){
108172 pItem->pTab = pFKey->pFrom;
108173 pItem->zName = pFKey->pFrom->zName;
108363 sqlite3TokenInit(&tFromCol, pFKey->pFrom->aCol[iFromCol].zName);
108401 Expr *pDflt = pFKey->pFrom->aCol[iFromCol].pDflt;
108416 zFrom = pFKey->pFrom->zName;
120198 SQLITE_PRIVATE int sqlite3IndexedByLookup(Parse *pParse, struct SrcList_item *pFrom){
120199 if( pFrom->pTab && pFrom->fg.isIndexedBy ){
120200 Table *pTab = pFrom->pTab;
120201 char *zIndexedBy = pFrom->u1.zIndexedBy;
120212 pFrom->pIBIndex = pIdx;
120292 static int cannotBeFunction(Parse *pParse, struct SrcList_item *pFrom){
120293 if( pFrom->fg.isTabFunc ){
120294 sqlite3ErrorMsg(pParse, "'%s' is not a function", pFrom->zName);
120369 struct SrcList_item *pFrom
120376 assert( pFrom->pTab==0 );
120378 pCte = searchWith(pParse->pWith, pFrom, &pWith);
120395 if( cannotBeFunction(pParse, pFrom) ) return SQLITE_ERROR;
120397 assert( pFrom->pTab==0 );
120398 pFrom->pTab = pTab = sqlite3DbMallocZero(db, sizeof(Table));
120405 pFrom->pSelect = sqlite3SelectDup(db, pCte->pSelect, 0);
120407 assert( pFrom->pSelect );
120410 pSel = pFrom->pSelect;
120414 SrcList *pSrc = pFrom->pSelect->pSrc;
120534 struct SrcList_item *pFrom;
120561 for(i=0, pFrom=pTabList->a; i<pTabList->nSrc; i++, pFrom++){
120563 assert( pFrom->fg.isRecursive==0 || pFrom->pTab!=0 );
120564 if( pFrom->fg.isRecursive ) continue;
120565 assert( pFrom->pTab==0 );
120567 if( withExpand(pWalker, pFrom) ) return WRC_Abort;
120568 if( pFrom->pTab ) {} else
120570 if( pFrom->zName==0 ){
120572 Select *pSel = pFrom->pSelect;
120575 assert( pFrom->pTab==0 );
120577 pFrom->pTab = pTab = sqlite3DbMallocZero(db, sizeof(Table));
120589 assert( pFrom->pTab==0 );
120590 pFrom->pTab = pTab = sqlite3LocateTableItem(pParse, 0, pFrom);
120595 pFrom->pTab = 0;
120599 if( !IsVirtual(pTab) && cannotBeFunction(pParse, pFrom) ){
120606 assert( pFrom->pSelect==0 );
120607 pFrom->pSelect = sqlite3SelectDup(db, pTab->pSelect, 0);
120608 sqlite3SelectSetName(pFrom->pSelect, pTab->zName);
120611 sqlite3WalkSelect(pWalker, pFrom->pSelect);
120618 if( sqlite3IndexedByLookup(pParse, pFrom) ){
120686 for(i=0, pFrom=pTabList->a; i<pTabList->nSrc; i++, pFrom++){
120687 Table *pTab = pFrom->pTab;
120688 Select *pSub = pFrom->pSelect;
120689 char *zTabName = pFrom->zAlias;
120729 if( (pFrom->fg.jointype & JT_NATURAL)!=0
120736 if( sqlite3IdListIndex(pFrom->pUsing, zName)>=0 ){
120859 struct SrcList_item *pFrom;
120866 for(i=0, pFrom=pTabList->a; i<pTabList->nSrc; i++, pFrom++){
120867 Table *pTab = pFrom->pTab;
120871 Select *pSel = pFrom->pSelect;
122958 static void transferParseError(Parse *pTo, Parse *pFrom){
122959 assert( pFrom->zErrMsg==0 || pFrom->nErr );
122962 pTo->zErrMsg = pFrom->zErrMsg;
122963 pTo->nErr = pFrom->nErr;
122964 pTo->rc = pFrom->rc;
122966 sqlite3DbFree(pFrom->db, pFrom->zErrMsg);
129224 SrcList *pFrom, /* The FROM clause */
129253 iCur = pFrom->a[i].iCursor;
129254 for(pIdx=pFrom->a[i].pTab->pIndex; pIdx; pIdx=pIdx->pNext){
131660 static int whereLoopXfer(sqlite3 *db, WhereLoop *pTo, WhereLoop *pFrom){
131662 if( whereLoopResize(db, pTo, pFrom->nLTerm) ){
131666 memcpy(pTo, pFrom, WHERE_LOOP_XFER_SZ);
131667 memcpy(pTo->aLTerm, pFrom->aLTerm, pTo->nLTerm*sizeof(pTo->aLTerm[0]));
131668 if( pFrom->wsFlags & WHERE_VIRTUALTABLE ){
131669 pFrom->u.vtab.needFree = 0;
131670 }else if( (pFrom->wsFlags & WHERE_AUTO_INDEX)!=0 ){
131671 pFrom->u.btree.pIndex = 0;
133685 WherePath *pFrom; /* An element of aFrom[] that we are working on */
133723 for(ii=mxChoice*2, pFrom=aTo; ii>0; ii--, pFrom++, pX += nLoop){
133724 pFrom->aLoop = pX;
133762 for(ii=0, pFrom=aFrom; ii<nFrom; ii++, pFrom++){
133767 i8 isOrdered = pFrom->isOrdered; /* isOrdered for (pFrom+pWLoop) */
133771 if( (pWLoop->prereq & ~pFrom->maskLoop)!=0 ) continue;
133772 if( (pWLoop->maskSelf & pFrom->maskLoop)!=0 ) continue;
133773 if( (pWLoop->wsFlags & WHERE_AUTO_INDEX)!=0 && pFrom->nRow<10 ){
133781 rUnsorted = sqlite3LogEstAdd(pWLoop->rSetup,pWLoop->rRun + pFrom->nRow);
133782 rUnsorted = sqlite3LogEstAdd(rUnsorted, pFrom->rUnsorted);
133783 nOut = pFrom->nRow + pWLoop->nOut;
133784 maskNew = pFrom->maskLoop | pWLoop->maskSelf;
133787 pWInfo->pOrderBy, pFrom, pWInfo->wctrlFlags,
133790 revMask = pFrom->revLoop;
133838 wherePathName(pFrom, iLoop, pWLoop), rCost, nOut,
133857 wherePathName(pFrom, iLoop, pWLoop), rCost, nOut,
133871 wherePathName(pFrom, iLoop, pWLoop), rCost, nOut,
133889 wherePathName(pFrom, iLoop, pWLoop), rCost, nOut,
133898 pTo->maskLoop = pFrom->maskLoop | pWLoop->maskSelf;
133904 memcpy(pTo->aLoop, pFrom->aLoop, sizeof(WhereLoop*)*iLoop);
133940 pFrom = aTo;
133942 aFrom = pFrom;
133953 pFrom = aFrom;
133955 if( pFrom->rCost>aFrom[ii].rCost ) pFrom = &aFrom[ii];
133961 pLevel->pWLoop = pWLoop = pFrom->aLoop[iLoop];
133971 int rc = wherePathSatisfiesOrderBy(pWInfo, pWInfo->pResultSet, pFrom,
133972 WHERE_DISTINCTBY, nLoop-1, pFrom->aLoop[nLoop-1], ¬Used);
133979 if( pFrom->isOrdered==pWInfo->pOrderBy->nExpr ){
133983 pWInfo->nOBSat = pFrom->isOrdered;
133984 pWInfo->revMask = pFrom->revLoop;
133988 u32 wsFlags = pFrom->aLoop[nLoop-1]->wsFlags;
133993 int rc = wherePathSatisfiesOrderBy(pWInfo, pWInfo->pOrderBy, pFrom,
133994 WHERE_ORDERBY_LIMIT, nLoop-1, pFrom->aLoop[nLoop-1], &m);
134010 pFrom, 0, nLoop-1, pFrom->aLoop[nLoop-1], &revMask
134021 pWInfo->nRowOut = pFrom->nRow;
137407 SrcList *pFrom;
137411 pFrom = sqlite3SrcListAppendFromTerm(pParse,0,0,0,&x,pRhs,0,0);
137412 pRhs = sqlite3SelectNew(pParse,0,pFrom,0,0,0,0,0,0,0);
156603 static int fts3SegReaderRequire(Fts3SegReader *pReader, char *pFrom, int nByte){
156606 || (pFrom>=pReader->aNode && pFrom<&pReader->aNode[pReader->nNode])
156609 && (pFrom - pReader->aNode + nByte)>pReader->nPopulate