Lines Matching refs:pDest
7052 sqlite3 *pDest, /* Destination database handle */
42058 SQLITE_PRIVATE int sqlite3PagerReadFileheader(Pager *pPager, int N, unsigned char *pDest){
42060 memset(pDest, 0, N);
42071 rc = sqlite3OsRead(pPager->fd, pDest, N, 0);
57691 Btree *pDest; /* Destination b-tree file */
57788 rc = sqlite3BtreeSetPageSize(p->pDest,sqlite3BtreeGetPageSize(p->pSrc),-1,0);
57839 p->pDest = findBtree(pDestDb, pDestDb, zDestDb);
57845 if( 0==p->pSrc || 0==p->pDest || setDestPgsz(p)==SQLITE_NOMEM ){
57879 Pager * const pDestPager = sqlite3BtreePager(p->pDest);
57881 int nDestPgsz = sqlite3BtreeGetPageSize(p->pDest);
57886 int nDestReserve = sqlite3BtreeGetReserve(p->pDest);
57931 if( iDest==PENDING_BYTE_PAGE(p->pDest->pBt) ) continue;
58003 Pager * const pDestPager = sqlite3BtreePager(p->pDest); /* Dest pager */
58019 && SQLITE_OK==(rc = sqlite3BtreeBeginTrans(p->pDest, 2))
58022 sqlite3BtreeGetMeta(p->pDest, BTREE_SCHEMA_VERSION, &p->iDestSchema);
58037 pgszDest = sqlite3BtreeGetPageSize(p->pDest);
58038 destMode = sqlite3PagerGetJournalMode(sqlite3BtreePager(p->pDest));
58076 rc = sqlite3BtreeUpdateMeta(p->pDest,1,p->iDestSchema+1);
58082 rc = sqlite3BtreeSetVersion(p->pDest, 2);
58100 assert( pgszDest==sqlite3BtreeGetPageSize(p->pDest) );
58104 if( nDestTruncate==(int)PENDING_BYTE_PAGE(p->pDest->pBt) ){
58129 nDestTruncate==(int)(PENDING_BYTE_PAGE(p->pDest->pBt)-1)
58171 && SQLITE_OK==(rc = sqlite3BtreeCommitPhaseTwo(p->pDest, 0))
58233 sqlite3BtreeRollback(p->pDest, SQLITE_OK);
58356 b.pDest = pTo;
58372 sqlite3PagerClearCache(sqlite3BtreePager(b.pDest));
65112 Mem *pDest; /* Where to write the extracted value */
65418 Mem *pDest;
67045 Mem *pDest; /* Where to write the extracted value */
67064 u.an.pDest = &aMem[pOp->p3];
67065 memAboutToChange(p, u.an.pDest);
67125 MemSetTypeFlag(u.an.pDest, MEM_Null);
67280 VdbeMemRelease(u.an.pDest);
67281 … sqlite3VdbeSerialGet((u8 *)&u.an.zRec[u.an.aOffset[u.an.p2]], u.an.aType[u.an.p2], u.an.pDest);
67284 sqlite3VdbeMemMove(&u.an.sMem, u.an.pDest);
67290 sqlite3VdbeSerialGet((u8*)u.an.zData, u.an.aType[u.an.p2], u.an.pDest);
67292 u.an.pDest->enc = encoding;
67295 sqlite3VdbeMemShallowCopy(u.an.pDest, pOp->p4.pMem, MEM_Static);
67297 MemSetTypeFlag(u.an.pDest, MEM_Null);
67308 assert( !(u.an.pDest->flags & MEM_Dyn) );
67309 assert( !(u.an.pDest->flags & (MEM_Blob|MEM_Str)) || u.an.pDest->z==u.an.sMem.z );
67310 u.an.pDest->flags &= ~(MEM_Ephem|MEM_Static);
67311 u.an.pDest->flags |= MEM_Term;
67312 u.an.pDest->z = u.an.sMem.z;
67313 u.an.pDest->zMalloc = u.an.sMem.zMalloc;
67316 rc = sqlite3VdbeMemMakeWriteable(u.an.pDest);
67319 UPDATE_MAX_BLOBSIZE(u.an.pDest);
67320 REGISTER_TRACE(pOp->p3, u.an.pDest);
70814 Mem *pDest;
70821 u.cn.pDest = &aMem[pOp->p3];
70822 memAboutToChange(p, u.cn.pDest);
70824 sqlite3VdbeMemSetNull(u.cn.pDest);
70837 sqlite3VdbeMemMove(&u.cn.sContext.s, u.cn.pDest);
70851 sqlite3VdbeMemMove(u.cn.pDest, &u.cn.sContext.s);
70852 REGISTER_TRACE(pOp->p3, u.cn.pDest);
70853 UPDATE_MAX_BLOBSIZE(u.cn.pDest);
70855 if( sqlite3VdbeMemTooBig(u.cn.pDest) ){
89324 Table *pDest, /* The table we are inserting into */
90549 static int xferCompatibleIndex(Index *pDest, Index *pSrc){
90551 assert( pDest && pSrc );
90552 assert( pDest->pTable!=pSrc->pTable );
90553 if( pDest->nColumn!=pSrc->nColumn ){
90556 if( pDest->onError!=pSrc->onError ){
90560 if( pSrc->aiColumn[i]!=pDest->aiColumn[i] ){
90563 if( pSrc->aSortOrder[i]!=pDest->aSortOrder[i] ){
90566 if( !xferCompatibleCollation(pSrc->azColl[i],pDest->azColl[i]) ){
90602 Table *pDest, /* The table we are inserting into */
90626 if( sqlite3TriggerList(pParse, pDest) ){
90630 if( pDest->tabFlags & TF_Virtual ){
90635 if( pDest->iPKey>=0 ) onError = pDest->keyConf;
90685 if( pSrc==pDest ){
90696 if( pDest->nCol!=pSrc->nCol ){
90699 if( pDest->iPKey!=pSrc->iPKey ){
90702 for(i=0; i<pDest->nCol; i++){
90703 if( pDest->aCol[i].affinity!=pSrc->aCol[i].affinity ){
90706 if( !xferCompatibleCollation(pDest->aCol[i].zColl, pSrc->aCol[i].zColl) ){
90709 if( pDest->aCol[i].notNull && !pSrc->aCol[i].notNull ){
90713 for(pDestIdx=pDest->pIndex; pDestIdx; pDestIdx=pDestIdx->pNext){
90725 if( pDest->pCheck && sqlite3ExprCompare(pSrc->pCheck, pDest->pCheck) ){
90737 if( (pParse->db->flags & SQLITE_ForeignKeys)!=0 && pDest->pFKey!=0 ){
90757 regAutoinc = autoIncBegin(pParse, iDbDest, pDest);
90758 sqlite3OpenTable(pParse, iDest, iDbDest, pDest, OP_OpenWrite);
90759 if( (pDest->iPKey<0 && pDest->pIndex!=0) /* (1) */
90787 if( pDest->iPKey>=0 ){
90794 }else if( pDest->pIndex==0 ){
90798 assert( (pDest->tabFlags & TF_Autoincrement)==0 );
90803 sqlite3VdbeChangeP4(v, -1, pDest->zName, 0);
90805 for(pDestIdx=pDest->pIndex; pDestIdx; pDestIdx=pDestIdx->pNext){
94574 SQLITE_PRIVATE void sqlite3SelectDestInit(SelectDest *pDest, int eDest, int iParm){
94575 pDest->eDest = (u8)eDest;
94576 pDest->iParm = iParm;
94577 pDest->affinity = 0;
94578 pDest->iMem = 0;
94579 pDest->nMem = 0;
95051 SelectDest *pDest, /* Destination of SELECT results */
95054 int eDest = pDest->eDest;
95082 SelectDest *pDest, /* How to dispose of the results */
95090 int eDest = pDest->eDest; /* How to dispose of results */
95091 int iParm = pDest->iParm; /* First argument to disposal method */
95109 if( pDest->iMem==0 ){
95110 pDest->iMem = pParse->nMem+1;
95111 pDest->nMem = nResultCol;
95114 assert( pDest->nMem==nResultCol );
95116 regResult = pDest->iMem;
95195 p->affinity = sqlite3CompareAffinity(pEList->a[0].pExpr, pDest->affinity);
95250 sqlite3VdbeAddOp1(v, OP_Yield, pDest->iParm);
95420 SelectDest *pDest /* Write the sorted results here */
95429 int eDest = pDest->eDest;
95430 int iParm = pDest->iParm;
95489 assert( regRow!=pDest->iMem+i );
95490 sqlite3VdbeAddOp3(v, OP_Column, pseudoTab, i, pDest->iMem+i);
95496 sqlite3VdbeAddOp2(v, OP_ResultRow, pDest->iMem, nColumn);
95497 sqlite3ExprCacheAffinityChange(pParse, pDest->iMem, nColumn);
95499 sqlite3VdbeAddOp1(v, OP_Yield, pDest->iParm);
96061 SelectDest *pDest /* What to do with query results */
96100 SelectDest *pDest /* What to do with query results */
96121 dest = *pDest;
96165 return multiSelectOrderBy(pParse, p, pDest);
96443 pDest->iMem = dest.iMem;
96444 pDest->nMem = dest.nMem;
96474 SelectDest *pDest, /* Where to send the data */
96506 switch( pDest->eDest ){
96513 testcase( pDest->eDest==SRT_Table );
96514 testcase( pDest->eDest==SRT_EphemTab );
96516 sqlite3VdbeAddOp2(v, OP_NewRowid, pDest->iParm, r2);
96517 sqlite3VdbeAddOp3(v, OP_Insert, pDest->iParm, r1, r2);
96533 sqlite3CompareAffinity(p->pEList->a[0].pExpr, pDest->affinity);
96537 sqlite3VdbeAddOp2(v, OP_IdxInsert, pDest->iParm, r1);
96546 sqlite3VdbeAddOp2(v, OP_Integer, 1, pDest->iParm);
96558 sqlite3ExprCodeMove(pParse, pIn->iMem, pDest->iParm, 1);
96568 if( pDest->iMem==0 ){
96569 pDest->iMem = sqlite3GetTempRange(pParse, pIn->nMem);
96570 pDest->nMem = pIn->nMem;
96572 sqlite3ExprCodeMove(pParse, pIn->iMem, pDest->iMem, pDest->nMem);
96573 sqlite3VdbeAddOp1(v, OP_Yield, pDest->iParm);
96586 assert( pDest->eDest==SRT_Output );
96696 SelectDest *pDest /* What to do with query results */
96918 p, &destA, pDest, regOutA,
96927 p, &destB, pDest, regOutB,
97023 if( pDest->eDest==SRT_Output ){
98294 SelectDest *pDest /* What to do with the query results */
98327 if( IgnorableOrderby(pDest) ){
98328 assert(pDest->eDest==SRT_Exists || pDest->eDest==SRT_Union ||
98329 pDest->eDest==SRT_Except || pDest->eDest==SRT_Discard);
98355 if( checkForMultiColumnSelectError(pParse, pDest, pEList->nExpr) ){
98427 if( !IgnorableOrderby(pDest) ){
98457 rc = multiSelect(pParse, p, pDest);
98520 if( pDest->eDest==SRT_EphemTab ){
98521 sqlite3VdbeAddOp2(v, OP_OpenEphemeral, pDest->iParm, pEList->nExpr);
98610 selectInnerLoop(pParse, p, pEList, 0, 0, pOrderBy, distinct, pDest,
98876 distinct, pDest,
99010 pDest, addrEnd, addrEnd);
99026 generateSortTail(pParse, p, v, pEList->nExpr, pDest);
99046 if( rc==SQLITE_OK && pDest->eDest==SRT_Output ){