Lines Matching refs:pFrom
12282 Table *pFrom; /* Table containing the REFERENCES clause (aka: Child) */ member
19912 sqlite3_mutex_methods const *pFrom; in sqlite3MutexInit() local
19916 pFrom = sqlite3DefaultMutex(); in sqlite3MutexInit()
19918 pFrom = sqlite3NoopMutex(); in sqlite3MutexInit()
19920 pTo->xMutexInit = pFrom->xMutexInit; in sqlite3MutexInit()
19921 pTo->xMutexEnd = pFrom->xMutexEnd; in sqlite3MutexInit()
19922 pTo->xMutexFree = pFrom->xMutexFree; in sqlite3MutexInit()
19923 pTo->xMutexEnter = pFrom->xMutexEnter; in sqlite3MutexInit()
19924 pTo->xMutexTry = pFrom->xMutexTry; in sqlite3MutexInit()
19925 pTo->xMutexLeave = pFrom->xMutexLeave; in sqlite3MutexInit()
19926 pTo->xMutexHeld = pFrom->xMutexHeld; in sqlite3MutexInit()
19927 pTo->xMutexNotheld = pFrom->xMutexNotheld; in sqlite3MutexInit()
19929 pTo->xMutexAlloc = pFrom->xMutexAlloc; in sqlite3MutexInit()
61361 static void copyNodeContent(MemPage *pFrom, MemPage *pTo, int *pRC){
61363 BtShared * const pBt = pFrom->pBt;
61364 u8 * const aFrom = pFrom->aData;
61366 int const iFromHdr = pFrom->hdrOffset;
61372 assert( pFrom->isInit );
61373 assert( pFrom->nFree>=iToHdr );
61379 memcpy(&aTo[iToHdr], &aFrom[iFromHdr], pFrom->cellOffset + 2*pFrom->nCell);
64904 SQLITE_PRIVATE int sqlite3BtreeCopyFile(Btree *pTo, Btree *pFrom){
64909 sqlite3BtreeEnter(pFrom);
64914 i64 nByte = sqlite3BtreeGetPageSize(pFrom)*(i64)sqlite3BtreeLastPage(pFrom);
64926 b.pSrcDb = pFrom->db;
64927 b.pSrc = pFrom;
64932 sqlite3PagerAlignReserve(sqlite3BtreePager(pTo), sqlite3BtreePager(pFrom));
64953 sqlite3BtreeLeave(pFrom);
65740 static SQLITE_NOINLINE void vdbeClrCopy(Mem *pTo, const Mem *pFrom, int eType){
65743 sqlite3VdbeMemShallowCopy(pTo, pFrom, eType);
65745 SQLITE_PRIVATE void sqlite3VdbeMemShallowCopy(Mem *pTo, const Mem *pFrom, int srcType){
65746 assert( (pFrom->flags & MEM_RowSet)==0 );
65747 assert( pTo->db==pFrom->db );
65748 if( VdbeMemDynamic(pTo) ){ vdbeClrCopy(pTo,pFrom,srcType); return; }
65749 memcpy(pTo, pFrom, MEMCELLSIZE);
65750 if( (pFrom->flags&MEM_Static)==0 ){
65761 SQLITE_PRIVATE int sqlite3VdbeMemCopy(Mem *pTo, const Mem *pFrom){
65767 assert( pTo->db==pFrom->db || pFrom->db==0 );
65768 assert( (pFrom->flags & MEM_RowSet)==0 );
65770 memcpy(pTo, pFrom, MEMCELLSIZE);
65773 if( 0==(pFrom->flags&MEM_Static) ){
65788 SQLITE_PRIVATE void sqlite3VdbeMemMove(Mem *pTo, Mem *pFrom){
65789 assert( pFrom->db==0 || sqlite3_mutex_held(pFrom->db->mutex) );
65791 assert( pFrom->db==0 || pTo->db==0 || pFrom->db==pTo->db );
65794 memcpy(pTo, pFrom, sizeof(Mem));
65795 pFrom->flags = MEM_Null;
65796 pFrom->szMalloc = 0;
72440 Vdbe *pFrom = (Vdbe*)pFromStmt;
72443 assert( pTo->db==pFrom->db );
72444 assert( pTo->nVar==pFrom->nVar );
72446 for(i=0; i<pFrom->nVar; i++){
72447 sqlite3VdbeMemMove(&pTo->aVar[i], &pFrom->aVar[i]);
72467 Vdbe *pFrom = (Vdbe*)pFromStmt;
72469 if( pFrom->nVar!=pTo->nVar ){
72475 if( pFrom->isPrepareV2 && pFrom->expmask ){
72476 pFrom->expired = 1;
89473 zWhere = whereOrName(pParse->db, zWhere, p->pFrom->zName);
89759 Table *pFrom = p->pFrom;
89760 if( pFrom!=pTab ){
89761 reloadTableSchema(pParse, p->pFrom, pFrom->zName);
90362 static void sampleCopy(Stat4Accum *p, Stat4Sample *pTo, Stat4Sample *pFrom){
90363 pTo->isPSample = pFrom->isPSample;
90364 pTo->iCol = pFrom->iCol;
90365 pTo->iHash = pFrom->iHash;
90366 memcpy(pTo->anEq, pFrom->anEq, sizeof(tRowcnt)*p->nCol);
90367 memcpy(pTo->anLt, pFrom->anLt, sizeof(tRowcnt)*p->nCol);
90368 memcpy(pTo->anDLt, pFrom->anDLt, sizeof(tRowcnt)*p->nCol);
90369 if( pFrom->nRowid ){
90370 sampleSetRowid(p->db, pTo, pFrom->nRowid, pFrom->u.aRowid);
90372 sampleSetRowidInt64(p->db, pTo, pFrom->u.iRowid);
95437 pFKey->pFrom = p;
97774 SrcList *pFrom;
97778 pFrom = sqlite3SrcListAppend(db, 0, 0, 0);
97779 if( pFrom ){
97780 assert( pFrom->nSrc==1 );
97781 pFrom->a[0].zName = sqlite3DbStrDup(db, pView->zName);
97782 pFrom->a[0].zDatabase = sqlite3DbStrDup(db, db->aDb[iDb].zName);
97783 assert( pFrom->a[0].pOn==0 );
97784 assert( pFrom->a[0].pUsing==0 );
97786 pSel = sqlite3SelectNew(pParse, 0, pFrom, pWhere, 0, 0, 0, 0, 0, 0);
100655 pFKey->pFrom->zName, pFKey->zTo);
100743 if( pTab==pFKey->pFrom && nIncr==1 ){
100775 if( pTab==pFKey->pFrom && nIncr==1 ){
100958 zCol = pFKey->pFrom->aCol[iCol].zName;
100975 if( pTab==pFKey->pFrom && nIncr>0 ){
101381 pItem->pTab = pFKey->pFrom;
101382 pItem->zName = pFKey->pFrom->zName;
101569 tFromCol.z = pFKey->pFrom->aCol[iFromCol].zName;
101614 Expr *pDflt = pFKey->pFrom->aCol[iFromCol].pDflt;
101629 zFrom = pFKey->pFrom->zName;
112511 SQLITE_PRIVATE int sqlite3IndexedByLookup(Parse *pParse, struct SrcList_item *pFrom){
112512 if( pFrom->pTab && pFrom->fg.isIndexedBy ){
112513 Table *pTab = pFrom->pTab;
112514 char *zIndexedBy = pFrom->u1.zIndexedBy;
112525 pFrom->pIBIndex = pIdx;
112668 struct SrcList_item *pFrom
112675 assert( pFrom->pTab==0 );
112677 pCte = searchWith(pParse->pWith, pFrom, &pWith);
112695 assert( pFrom->pTab==0 );
112696 pFrom->pTab = pTab = sqlite3DbMallocZero(db, sizeof(Table));
112703 pFrom->pSelect = sqlite3SelectDup(db, pCte->pSelect, 0);
112705 assert( pFrom->pSelect );
112708 pSel = pFrom->pSelect;
112712 SrcList *pSrc = pFrom->pSelect->pSrc;
112821 struct SrcList_item *pFrom;
112848 for(i=0, pFrom=pTabList->a; i<pTabList->nSrc; i++, pFrom++){
112850 assert( pFrom->fg.isRecursive==0 || pFrom->pTab!=0 );
112851 if( pFrom->fg.isRecursive ) continue;
112852 assert( pFrom->pTab==0 );
112854 if( withExpand(pWalker, pFrom) ) return WRC_Abort;
112855 if( pFrom->pTab ) {} else
112857 if( pFrom->zName==0 ){
112859 Select *pSel = pFrom->pSelect;
112862 assert( pFrom->pTab==0 );
112864 pFrom->pTab = pTab = sqlite3DbMallocZero(db, sizeof(Table));
112876 assert( pFrom->pTab==0 );
112877 pFrom->pTab = pTab = sqlite3LocateTableItem(pParse, 0, pFrom);
112882 pFrom->pTab = 0;
112890 assert( pFrom->pSelect==0 );
112891 if( pFrom->fg.isTabFunc && !IsVirtual(pTab) ){
112895 pFrom->pSelect = sqlite3SelectDup(db, pTab->pSelect, 0);
112896 sqlite3SelectSetName(pFrom->pSelect, pTab->zName);
112899 sqlite3WalkSelect(pWalker, pFrom->pSelect);
112906 if( sqlite3IndexedByLookup(pParse, pFrom) ){
112971 for(i=0, pFrom=pTabList->a; i<pTabList->nSrc; i++, pFrom++){
112972 Table *pTab = pFrom->pTab;
112973 Select *pSub = pFrom->pSelect;
112974 char *zTabName = pFrom->zAlias;
113013 if( (pFrom->fg.jointype & JT_NATURAL)!=0
113020 if( sqlite3IdListIndex(pFrom->pUsing, zName)>=0 ){
113145 struct SrcList_item *pFrom;
113152 for(i=0, pFrom=pTabList->a; i<pTabList->nSrc; i++, pFrom++){
113153 Table *pTab = pFrom->pTab;
113157 Select *pSel = pFrom->pSelect;
115251 static void transferParseError(Parse *pTo, Parse *pFrom){
115252 assert( pFrom->zErrMsg==0 || pFrom->nErr );
115255 pTo->zErrMsg = pFrom->zErrMsg;
115256 pTo->nErr = pFrom->nErr;
115257 pTo->rc = pFrom->rc;
115259 sqlite3DbFree(pFrom->db, pFrom->zErrMsg);
120846 SrcList *pFrom, /* The FROM clause */
120863 iCur = pFrom->a[i].iCursor;
120864 for(pIdx=pFrom->a[i].pTab->pIndex; pIdx; pIdx=pIdx->pNext){
123121 static int whereLoopXfer(sqlite3 *db, WhereLoop *pTo, WhereLoop *pFrom){
123123 if( whereLoopResize(db, pTo, pFrom->nLTerm) ){
123127 memcpy(pTo, pFrom, WHERE_LOOP_XFER_SZ);
123128 memcpy(pTo->aLTerm, pFrom->aLTerm, pTo->nLTerm*sizeof(pTo->aLTerm[0]));
123129 if( pFrom->wsFlags & WHERE_VIRTUALTABLE ){
123130 pFrom->u.vtab.needFree = 0;
123131 }else if( (pFrom->wsFlags & WHERE_AUTO_INDEX)!=0 ){
123132 pFrom->u.btree.pIndex = 0;
124870 WherePath *pFrom; /* An element of aFrom[] that we are working on */
124908 for(ii=mxChoice*2, pFrom=aTo; ii>0; ii--, pFrom++, pX += nLoop){
124909 pFrom->aLoop = pX;
124947 for(ii=0, pFrom=aFrom; ii<nFrom; ii++, pFrom++){
124952 i8 isOrdered = pFrom->isOrdered; /* isOrdered for (pFrom+pWLoop) */
124956 if( (pWLoop->prereq & ~pFrom->maskLoop)!=0 ) continue;
124957 if( (pWLoop->maskSelf & pFrom->maskLoop)!=0 ) continue;
124960 rUnsorted = sqlite3LogEstAdd(pWLoop->rSetup,pWLoop->rRun + pFrom->nRow);
124961 rUnsorted = sqlite3LogEstAdd(rUnsorted, pFrom->rUnsorted);
124962 nOut = pFrom->nRow + pWLoop->nOut;
124963 maskNew = pFrom->maskLoop | pWLoop->maskSelf;
124966 pWInfo->pOrderBy, pFrom, pWInfo->wctrlFlags,
124969 revMask = pFrom->revLoop;
125017 wherePathName(pFrom, iLoop, pWLoop), rCost, nOut,
125036 wherePathName(pFrom, iLoop, pWLoop), rCost, nOut,
125050 wherePathName(pFrom, iLoop, pWLoop), rCost, nOut,
125068 wherePathName(pFrom, iLoop, pWLoop), rCost, nOut,
125077 pTo->maskLoop = pFrom->maskLoop | pWLoop->maskSelf;
125083 memcpy(pTo->aLoop, pFrom->aLoop, sizeof(WhereLoop*)*iLoop);
125119 pFrom = aTo;
125121 aFrom = pFrom;
125132 pFrom = aFrom;
125134 if( pFrom->rCost>aFrom[ii].rCost ) pFrom = &aFrom[ii];
125140 pLevel->pWLoop = pWLoop = pFrom->aLoop[iLoop];
125150 int rc = wherePathSatisfiesOrderBy(pWInfo, pWInfo->pResultSet, pFrom,
125151 WHERE_DISTINCTBY, nLoop-1, pFrom->aLoop[nLoop-1], ¬Used);
125158 if( pFrom->isOrdered==pWInfo->pOrderBy->nExpr ){
125162 pWInfo->nOBSat = pFrom->isOrdered;
125164 pWInfo->revMask = pFrom->revLoop;
125171 pFrom, 0, nLoop-1, pFrom->aLoop[nLoop-1], &revMask
125182 pWInfo->nRowOut = pFrom->nRow;
128447 SrcList *pFrom;
128451 pFrom = sqlite3SrcListAppendFromTerm(pParse,0,0,0,&x,pRhs,0,0);
128452 pRhs = sqlite3SelectNew(pParse,0,pFrom,0,0,0,0,0,0,0);
147162 static int fts3SegReaderRequire(Fts3SegReader *pReader, char *pFrom, int nByte){
147165 || (pFrom>=pReader->aNode && pFrom<&pReader->aNode[pReader->nNode])
147168 && (pFrom - pReader->aNode + nByte)>pReader->nPopulate