Lines Matching refs:pTo
23704 sqlite3_mutex_methods *pTo = &sqlite3GlobalConfig.mutex; in sqlite3MutexInit() local
23715 pTo->xMutexInit = pFrom->xMutexInit; in sqlite3MutexInit()
23716 pTo->xMutexEnd = pFrom->xMutexEnd; in sqlite3MutexInit()
23717 pTo->xMutexFree = pFrom->xMutexFree; in sqlite3MutexInit()
23718 pTo->xMutexEnter = pFrom->xMutexEnter; in sqlite3MutexInit()
23719 pTo->xMutexTry = pFrom->xMutexTry; in sqlite3MutexInit()
23720 pTo->xMutexLeave = pFrom->xMutexLeave; in sqlite3MutexInit()
23721 pTo->xMutexHeld = pFrom->xMutexHeld; in sqlite3MutexInit()
23722 pTo->xMutexNotheld = pFrom->xMutexNotheld; in sqlite3MutexInit()
23724 pTo->xMutexAlloc = pFrom->xMutexAlloc; in sqlite3MutexInit()
67539 static void copyNodeContent(MemPage *pFrom, MemPage *pTo, int *pRC){
67543 u8 * const aTo = pTo->aData;
67545 int const iToHdr = ((pTo->pgno==1) ? 100 : 0);
67564 pTo->isInit = 0;
67565 rc = btreeInitPage(pTo);
67575 *pRC = setChildPtrmaps(pTo);
71150 SQLITE_PRIVATE int sqlite3BtreeCopyFile(Btree *pTo, Btree *pFrom){
71154 sqlite3BtreeEnter(pTo);
71157 assert( sqlite3BtreeIsInTrans(pTo) );
71158 pFd = sqlite3PagerFile(sqlite3BtreePager(pTo));
71174 b.pDest = pTo;
71178 sqlite3PagerAlignReserve(sqlite3BtreePager(pTo), sqlite3BtreePager(pFrom));
71192 pTo->pBt->btsFlags &= ~BTS_PAGESIZE_FIXED;
71197 assert( sqlite3BtreeIsInTrans(pTo)==0 );
71200 sqlite3BtreeLeave(pTo);
72043 static SQLITE_NOINLINE void vdbeClrCopy(Mem *pTo, const Mem *pFrom, int eType){
72044 vdbeMemClearExternAndSetNull(pTo);
72045 assert( !VdbeMemDynamic(pTo) );
72046 sqlite3VdbeMemShallowCopy(pTo, pFrom, eType);
72048 SQLITE_PRIVATE void sqlite3VdbeMemShallowCopy(Mem *pTo, const Mem *pFrom, int srcType){
72050 assert( pTo->db==pFrom->db );
72051 if( VdbeMemDynamic(pTo) ){ vdbeClrCopy(pTo,pFrom,srcType); return; }
72052 memcpy(pTo, pFrom, MEMCELLSIZE);
72054 pTo->flags &= ~(MEM_Dyn|MEM_Static|MEM_Ephem);
72056 pTo->flags |= srcType;
72064 SQLITE_PRIVATE int sqlite3VdbeMemCopy(Mem *pTo, const Mem *pFrom){
72068 if( VdbeMemDynamic(pTo) ) vdbeMemClearExternAndSetNull(pTo);
72069 memcpy(pTo, pFrom, MEMCELLSIZE);
72070 pTo->flags &= ~MEM_Dyn;
72071 if( pTo->flags&(MEM_Str|MEM_Blob) ){
72073 pTo->flags |= MEM_Ephem;
72074 rc = sqlite3VdbeMemMakeWriteable(pTo);
72087 SQLITE_PRIVATE void sqlite3VdbeMemMove(Mem *pTo, Mem *pFrom){
72089 assert( pTo->db==0 || sqlite3_mutex_held(pTo->db->mutex) );
72090 assert( pFrom->db==0 || pTo->db==0 || pFrom->db==pTo->db );
72092 sqlite3VdbeMemRelease(pTo);
72093 memcpy(pTo, pFrom, sizeof(Mem));
79300 Vdbe *pTo = (Vdbe*)pToStmt;
79302 assert( pTo->db==pFrom->db );
79303 assert( pTo->nVar==pFrom->nVar );
79304 sqlite3_mutex_enter(pTo->db->mutex);
79306 sqlite3VdbeMemMove(&pTo->aVar[i], &pFrom->aVar[i]);
79308 sqlite3_mutex_leave(pTo->db->mutex);
79327 Vdbe *pTo = (Vdbe*)pToStmt;
79328 if( pFrom->nVar!=pTo->nVar ){
79331 assert( (pTo->prepFlags & SQLITE_PREPARE_SAVESQL)!=0 || pTo->expmask==0 );
79332 if( pTo->expmask ){
79333 pTo->expired = 1;
99193 static void sampleCopy(Stat4Accum *p, Stat4Sample *pTo, Stat4Sample *pFrom){
99194 pTo->isPSample = pFrom->isPSample;
99195 pTo->iCol = pFrom->iCol;
99196 pTo->iHash = pFrom->iHash;
99197 memcpy(pTo->anEq, pFrom->anEq, sizeof(tRowcnt)*p->nCol);
99198 memcpy(pTo->anLt, pFrom->anLt, sizeof(tRowcnt)*p->nCol);
99199 memcpy(pTo->anDLt, pFrom->anDLt, sizeof(tRowcnt)*p->nCol);
99201 sampleSetRowid(p->db, pTo, pFrom->nRowid, pFrom->u.aRowid);
99203 sampleSetRowidInt64(p->db, pTo, pFrom->u.iRowid);
104266 Token *pTo, /* Name of the other table */
104280 assert( pTo!=0 );
104288 p->aCol[iCol].zName, pTo);
104300 nByte = sizeof(*pFKey) + (nCol-1)*sizeof(pFKey->aCol[0]) + pTo->n + 1;
104314 memcpy(z, pTo->z, pTo->n);
104315 z[pTo->n] = 0;
104317 z += pTo->n+1;
110310 Table *pTo; /* Parent table of foreign key pFKey */
110330 pTo = sqlite3FindTable(db, pFKey->zTo, zDb);
110332 pTo = sqlite3LocateTable(pParse, 0, pFKey->zTo, zDb);
110334 if( !pTo || sqlite3FkLocateIndex(pParse, pTo, pFKey, &pIdx, &aiFree) ){
110337 if( pTo==0 ){
110374 char *zCol = pTo->aCol[pIdx ? pIdx->aiColumn[i] : pTo->iPKey].zName;
110375 rcauth = sqlite3AuthReadCol(pParse, pTo->zName, zCol, iDb);
110384 sqlite3TableLock(pParse, iDb, pTo->tnum, 0, pTo->zName);
110391 fkLookupParent(pParse, iDb, pTo, pIdx, pFKey, aiCol, regOld, -1, bIgnore);
110402 fkLookupParent(pParse, iDb, pTo, pIdx, pFKey, aiCol, regNew, +1, bIgnore);
125763 static void transferParseError(Parse *pTo, Parse *pFrom){
125765 assert( pTo->zErrMsg==0 || pTo->nErr );
125766 if( pTo->nErr==0 ){
125767 pTo->zErrMsg = pFrom->zErrMsg;
125768 pTo->nErr = pFrom->nErr;
125769 pTo->rc = pFrom->rc;
134781 static int whereLoopXfer(sqlite3 *db, WhereLoop *pTo, WhereLoop *pFrom){
134782 whereLoopClearUnion(db, pTo);
134783 if( whereLoopResize(db, pTo, pFrom->nLTerm) ){
134784 memset(&pTo->u, 0, sizeof(pTo->u));
134787 memcpy(pTo, pFrom, WHERE_LOOP_XFER_SZ);
134788 memcpy(pTo->aLTerm, pFrom->aLTerm, pTo->nLTerm*sizeof(pTo->aLTerm[0]));
136835 WherePath *pTo; /* An element of aTo[] that we are working on */
136969 for(jj=0, pTo=aTo; jj<nTo; jj++, pTo++){
136970 if( pTo->maskLoop==maskNew
136971 && ((pTo->isOrdered^isOrdered)&0x80)==0
137003 pTo = &aTo[jj];
137020 if( pTo->rCost<rCost
137021 || (pTo->rCost==rCost
137022 && (pTo->nRow<nOut
137023 || (pTo->nRow==nOut && pTo->rUnsorted<=rUnsorted)
137034 wherePathName(pTo, iLoop+1, 0), pTo->rCost, pTo->nRow,
137035 pTo->rUnsorted, pTo->isOrdered>=0 ? pTo->isOrdered+'0' : '?');
137039 testcase( pTo->rCost==rCost );
137042 testcase( pTo->rCost==rCost+1 );
137052 wherePathName(pTo, iLoop+1, 0), pTo->rCost, pTo->nRow,
137053 pTo->rUnsorted, pTo->isOrdered>=0 ? pTo->isOrdered+'0' : '?');
137058 pTo->maskLoop = pFrom->maskLoop | pWLoop->maskSelf;
137059 pTo->revLoop = revMask;
137060 pTo->nRow = nOut;
137061 pTo->rCost = rCost;
137062 pTo->rUnsorted = rUnsorted;
137063 pTo->isOrdered = isOrdered;
137064 memcpy(pTo->aLoop, pFrom->aLoop, sizeof(WhereLoop*)*iLoop);
137065 pTo->aLoop[iLoop] = pWLoop;
137070 for(jj=1, pTo=&aTo[1]; jj<mxChoice; jj++, pTo++){
137071 if( pTo->rCost>mxCost
137072 || (pTo->rCost==mxCost && pTo->rUnsorted>mxUnsorted)
137074 mxCost = pTo->rCost;
137075 mxUnsorted = pTo->rUnsorted;
137086 for(ii=0, pTo=aTo; ii<nTo; ii++, pTo++){
137088 wherePathName(pTo, iLoop+1, 0), pTo->rCost, pTo->nRow,
137089 pTo->isOrdered>=0 ? (pTo->isOrdered+'0') : '?');
137090 if( pTo->isOrdered>0 ){
137091 sqlite3DebugPrintf(" rev=0x%llx\n", pTo->revLoop);
180351 SessionTable *pTo; /* Table zTbl */
180354 rc = sessionFindTable(pSession, zTbl, &pTo);
180355 if( pTo==0 ) goto diff_out;
180356 if( sessionInitTable(pSession, pTo) ){
180370 if( pTo->nCol!=nCol ){
180375 if( pTo->abPK[i]!=abPK[i] ) bMismatch = 1;
180376 if( sqlite3_stricmp(azCol[i], pTo->azCol[i]) ) bMismatch = 1;
180393 zExpr = sessionExprComparePK(pTo->nCol,
180394 zDb, zFrom, pTo->zName, pTo->azCol, pTo->abPK
180400 rc = sessionDiffFindNew(SQLITE_INSERT, pSession, pTo, zDb, zFrom, zExpr);
180405 rc = sessionDiffFindNew(SQLITE_DELETE, pSession, pTo, zFrom, zDb, zExpr);
180410 rc = sessionDiffFindModified(pSession, pTo, zFrom, zExpr);