Lines Matching defs:pTo

17300     sqlite3_mutex_methods *pTo = &sqlite3GlobalConfig.mutex;
17307 memcpy(pTo, pFrom, offsetof(sqlite3_mutex_methods, xMutexAlloc));
17308 memcpy(&pTo->xMutexFree, &pFrom->xMutexFree,
17309 sizeof(*pTo) - offsetof(sqlite3_mutex_methods, xMutexFree));
17310 pTo->xMutexAlloc = pFrom->xMutexAlloc;
55200 ** on page pFrom to page pTo. If page pFrom was not a leaf page, then
55202 ** parent page stored in the pointer map is page pTo. If pFrom contained
55204 ** map entries are also updated so that the parent page is page pTo.
55207 ** MemPage.apOvfl[] array), they are not copied to pTo.
55209 ** Before returning, page pTo is reinitialized using btreeInitPage().
55215 static void copyNodeContent(MemPage *pFrom, MemPage *pTo, int *pRC){
55219 u8 * const aTo = pTo->aData;
55221 int const iToHdr = ((pTo->pgno==1) ? 100 : 0);
55230 /* Copy the b-tree node content from page pFrom to page pTo. */
55235 /* Reinitialize page pTo so that the contents of the MemPage structure
55236 ** match the new data. The initialization of pTo can actually fail under
55240 pTo->isInit = 0;
55241 rc = btreeInitPage(pTo);
55248 ** for any b-tree or overflow pages that pTo now contains the pointers to.
55251 *pRC = setChildPtrmaps(pTo);
58313 ** The size of file pTo may be reduced by this operation. If anything
58314 ** goes wrong, the transaction on pTo is rolled back. If successful, the
58317 SQLITE_PRIVATE int sqlite3BtreeCopyFile(Btree *pTo, Btree *pFrom){
58319 sqlite3_file *pFd; /* File descriptor for database pTo */
58321 sqlite3BtreeEnter(pTo);
58324 assert( sqlite3BtreeIsInTrans(pTo) );
58325 pFd = sqlite3PagerFile(sqlite3BtreePager(pTo));
58341 b.pDest = pTo;
58355 pTo->pBt->btsFlags &= ~BTS_PAGESIZE_FIXED;
58360 assert( sqlite3BtreeIsInTrans(pTo)==0 );
58363 sqlite3BtreeLeave(pTo);
58979 ** Make an shallow copy of pFrom into pTo. Prior contents of
58980 ** pTo are freed. The pFrom->z field is not duplicated. If
58981 ** pFrom->z is used, then pTo->z points to the same thing as pFrom->z
58984 SQLITE_PRIVATE void sqlite3VdbeMemShallowCopy(Mem *pTo, const Mem *pFrom, int srcType){
58986 VdbeMemRelease(pTo);
58987 memcpy(pTo, pFrom, MEMCELLSIZE);
58988 pTo->xDel = 0;
58990 pTo->flags &= ~(MEM_Dyn|MEM_Static|MEM_Ephem);
58992 pTo->flags |= srcType;
58997 ** Make a full copy of pFrom into pTo. Prior contents of pTo are
59000 SQLITE_PRIVATE int sqlite3VdbeMemCopy(Mem *pTo, const Mem *pFrom){
59004 VdbeMemRelease(pTo);
59005 memcpy(pTo, pFrom, MEMCELLSIZE);
59006 pTo->flags &= ~MEM_Dyn;
59008 if( pTo->flags&(MEM_Str|MEM_Blob) ){
59010 pTo->flags |= MEM_Ephem;
59011 rc = sqlite3VdbeMemMakeWriteable(pTo);
59019 ** Transfer the contents of pFrom to pTo. Any existing value in pTo is
59024 SQLITE_PRIVATE void sqlite3VdbeMemMove(Mem *pTo, Mem *pFrom){
59026 assert( pTo->db==0 || sqlite3_mutex_held(pTo->db->mutex) );
59027 assert( pFrom->db==0 || pTo->db==0 || pFrom->db==pTo->db );
59029 sqlite3VdbeMemRelease(pTo);
59030 memcpy(pTo, pFrom, sizeof(Mem));
63981 Vdbe *pTo = (Vdbe*)pToStmt;
63983 assert( pTo->db==pFrom->db );
63984 assert( pTo->nVar==pFrom->nVar );
63985 sqlite3_mutex_enter(pTo->db->mutex);
63987 sqlite3VdbeMemMove(&pTo->aVar[i], &pFrom->aVar[i]);
63989 sqlite3_mutex_leave(pTo->db->mutex);
64008 Vdbe *pTo = (Vdbe*)pToStmt;
64009 if( pFrom->nVar!=pTo->nVar ){
64012 if( pTo->isPrepareV2 && pTo->expmask ){
64013 pTo->expired = 1;
83392 ** connect the key to the last column inserted. pTo is the name of
83394 ** pTo table that the foreign key points to. flags contains all
83407 Token *pTo, /* Name of the other table */
83421 assert( pTo!=0 );
83429 p->aCol[iCol].zName, pTo);
83441 nByte = sizeof(*pFKey) + (nCol-1)*sizeof(pFKey->aCol[0]) + pTo->n + 1;
83455 memcpy(z, pTo->z, pTo->n);
83456 z[pTo->n] = 0;
83458 z += pTo->n+1;
88473 Table *pTo; /* Parent table of foreign key pFKey */
88474 Index *pIdx = 0; /* Index on key columns in pTo */
88486 pTo = sqlite3FindTable(db, pFKey->zTo, zDb);
88488 pTo = sqlite3LocateTable(pParse, 0, pFKey->zTo, zDb);
88490 if( !pTo || locateFkeyIndex(pParse, pTo, pFKey, &pIdx, &aiFree) ){
88493 if( pTo==0 ){
88529 char *zCol = pTo->aCol[pIdx ? pIdx->aiColumn[i] : pTo->iPKey].zName;
88530 rcauth = sqlite3AuthReadCol(pParse, pTo->zName, zCol, iDb);
88539 sqlite3TableLock(pParse, iDb, pTo->tnum, 0, pTo->zName);
88546 fkLookupParent(pParse, iDb, pTo, pIdx, pFKey, aiCol, regOld, -1,isIgnore);
88551 fkLookupParent(pParse, iDb, pTo, pIdx, pFKey, aiCol, regNew, +1,isIgnore);
100124 ** from pFrom to pTo.
100126 static void transferParseError(Parse *pTo, Parse *pFrom){
100128 assert( pTo->zErrMsg==0 || pTo->nErr );
100129 if( pTo->nErr==0 ){
100130 pTo->zErrMsg = pFrom->zErrMsg;
100131 pTo->nErr = pFrom->nErr;