Lines Matching refs:pDest
7736 sqlite3 *pDest, /* Destination database handle */
48442 SQLITE_PRIVATE void sqlite3PagerAlignReserve(Pager *pDest, Pager *pSrc){
48443 if( pDest->nReserve!=pSrc->nReserve ){
48444 pDest->nReserve = pSrc->nReserve;
48445 pagerReportSize(pDest);
50057 SQLITE_PRIVATE int sqlite3PagerReadFileheader(Pager *pPager, int N, unsigned char *pDest){
50059 memset(pDest, 0, N);
50070 rc = sqlite3OsRead(pPager->fd, pDest, N, 0);
67874 Btree *pDest; /* Destination b-tree file */
67972 rc = sqlite3BtreeSetPageSize(p->pDest,sqlite3BtreeGetPageSize(p->pSrc),-1,0);
68043 p->pDest = findBtree(pDestDb, pDestDb, zDestDb);
68049 if( 0==p->pSrc || 0==p->pDest
68051 || checkReadTransaction(pDestDb, p->pDest)!=SQLITE_OK
68091 Pager * const pDestPager = sqlite3BtreePager(p->pDest);
68093 int nDestPgsz = sqlite3BtreeGetPageSize(p->pDest);
68101 int nDestReserve = sqlite3BtreeGetOptimalReserve(p->pDest);
68146 if( iDest==PENDING_BYTE_PAGE(p->pDest->pBt) ) continue;
68224 Pager * const pDestPager = sqlite3BtreePager(p->pDest); /* Dest pager */
68240 && SQLITE_OK==(rc = sqlite3BtreeBeginTrans(p->pDest, 2))
68243 sqlite3BtreeGetMeta(p->pDest, BTREE_SCHEMA_VERSION, &p->iDestSchema);
68258 pgszDest = sqlite3BtreeGetPageSize(p->pDest);
68259 destMode = sqlite3PagerGetJournalMode(sqlite3BtreePager(p->pDest));
68298 rc = sqlite3BtreeNewDb(p->pDest);
68302 rc = sqlite3BtreeUpdateMeta(p->pDest,1,p->iDestSchema+1);
68309 rc = sqlite3BtreeSetVersion(p->pDest, 2);
68327 assert( pgszDest==sqlite3BtreeGetPageSize(p->pDest) );
68331 if( nDestTruncate==(int)PENDING_BYTE_PAGE(p->pDest->pBt) ){
68359 nDestTruncate==(int)(PENDING_BYTE_PAGE(p->pDest->pBt)-1)
68371 if( iPg!=PENDING_BYTE_PAGE(p->pDest->pBt) ){
68415 && SQLITE_OK==(rc = sqlite3BtreeCommitPhaseTwo(p->pDest, 0))
68477 sqlite3BtreeRollback(p->pDest, SQLITE_OK, 0);
68619 b.pDest = pTo;
68639 sqlite3PagerClearCache(sqlite3BtreePager(b.pDest));
79532 Mem *pDest; /* Where to write the extracted value */
79551 pDest = &aMem[pOp->p3];
79552 memAboutToChange(p, pDest);
79572 sqlite3VdbeMemSetNull(pDest);
79690 sqlite3VdbeMemShallowCopy(pDest, pOp->p4.pMem, MEM_Static);
79692 sqlite3VdbeMemSetNull(pDest);
79706 assert( sqlite3VdbeCheckMemInvariants(pDest) );
79707 if( VdbeMemDynamic(pDest) ){
79708 sqlite3VdbeMemSetNull(pDest);
79716 sqlite3VdbeSerialGet(zData, t, pDest);
79723 pDest->n = len = (t-12)/2;
79724 pDest->enc = encoding;
79725 if( pDest->szMalloc < len+2 ){
79726 pDest->flags = MEM_Null;
79727 if( sqlite3VdbeMemGrow(pDest, len+2, 0) ) goto no_mem;
79729 pDest->z = pDest->zMalloc;
79731 memcpy(pDest->z, zData, len);
79732 pDest->z[len] = 0;
79733 pDest->z[len+1] = 0;
79734 pDest->flags = aFlag[t&1];
79737 pDest->enc = encoding;
79750 sqlite3VdbeSerialGet(aZero, t, pDest);
79753 pDest);
79755 sqlite3VdbeSerialGet((const u8*)pDest->z, t, pDest);
79756 pDest->flags &= ~MEM_Ephem;
79761 UPDATE_MAX_BLOBSIZE(pDest);
79762 REGISTER_TRACE(pOp->p3, pDest);
83679 Mem *pDest;
83685 pDest = &aMem[pOp->p3];
83686 memAboutToChange(p, pDest);
83688 sqlite3VdbeMemSetNull(pDest);
83695 sContext.pOut = pDest;
83696 MemSetTypeFlag(pDest, MEM_Null);
83702 sqlite3VdbeChangeEncoding(pDest, encoding);
83703 REGISTER_TRACE(pOp->p3, pDest);
83704 UPDATE_MAX_BLOBSIZE(pDest);
83706 if( sqlite3VdbeMemTooBig(pDest) ){
106849 Table *pDest, /* The table we are inserting into */
108297 static int xferCompatibleIndex(Index *pDest, Index *pSrc){
108299 assert( pDest && pSrc );
108300 assert( pDest->pTable!=pSrc->pTable );
108301 if( pDest->nKeyCol!=pSrc->nKeyCol ){
108304 if( pDest->onError!=pSrc->onError ){
108308 if( pSrc->aiColumn[i]!=pDest->aiColumn[i] ){
108312 assert( pSrc->aColExpr!=0 && pDest->aColExpr!=0 );
108314 pDest->aColExpr->a[i].pExpr, -1)!=0 ){
108318 if( pSrc->aSortOrder[i]!=pDest->aSortOrder[i] ){
108321 if( sqlite3_stricmp(pSrc->azColl[i],pDest->azColl[i])!=0 ){
108325 if( sqlite3ExprCompare(pSrc->pPartIdxWhere, pDest->pPartIdxWhere, -1) ){
108360 Table *pDest, /* The table we are inserting into */
108390 if( sqlite3TriggerList(pParse, pDest) ){
108394 if( pDest->tabFlags & TF_Virtual ){
108399 if( pDest->iPKey>=0 ) onError = pDest->keyConf;
108449 if( pSrc==pDest ){
108452 if( HasRowid(pDest)!=HasRowid(pSrc) ){
108463 if( pDest->nCol!=pSrc->nCol ){
108466 if( pDest->iPKey!=pSrc->iPKey ){
108469 for(i=0; i<pDest->nCol; i++){
108470 Column *pDestCol = &pDest->aCol[i];
108500 for(pDestIdx=pDest->pIndex; pDestIdx; pDestIdx=pDestIdx->pNext){
108512 if( pDest->pCheck && sqlite3ExprListCompare(pSrc->pCheck,pDest->pCheck,-1) ){
108524 if( (db->flags & SQLITE_ForeignKeys)!=0 && pDest->pFKey!=0 ){
108544 regAutoinc = autoIncBegin(pParse, iDbDest, pDest);
108547 sqlite3OpenTable(pParse, iDest, iDbDest, pDest, OP_OpenWrite);
108548 assert( HasRowid(pDest) || destHasUniqueIdx );
108550 (pDest->iPKey<0 && pDest->pIndex!=0) /* (1) */
108578 if( pDest->iPKey>=0 ){
108582 sqlite3RowidConstraint(pParse, onError, pDest);
108585 }else if( pDest->pIndex==0 ){
108589 assert( (pDest->tabFlags & TF_Autoincrement)==0 );
108593 (char*)pDest, P4_TABLE);
108599 sqlite3TableLock(pParse, iDbDest, pDest->tnum, 1, pDest->zName);
108602 for(pDestIdx=pDest->pIndex; pDestIdx; pDestIdx=pDestIdx->pNext){
113585 SQLITE_PRIVATE void sqlite3SelectDestInit(SelectDest *pDest, int eDest, int iParm){
113586 pDest->eDest = (u8)eDest;
113587 pDest->iSDParm = iParm;
113588 pDest->affSdst = 0;
113589 pDest->iSdst = 0;
113590 pDest->nSdst = 0;
114169 SelectDest *pDest, /* Destination of SELECT results */
114172 int eDest = pDest->eDest;
114199 SelectDest *pDest, /* How to dispose of the results */
114207 int eDest = pDest->eDest; /* How to dispose of results */
114208 int iParm = pDest->iSDParm; /* First argument to disposal method */
114225 if( pDest->iSdst==0 ){
114231 pDest->iSdst = pParse->nMem+1;
114233 }else if( pDest->iSdst+nResultCol > pParse->nMem ){
114241 pDest->nSdst = nResultCol;
114242 regResult = pDest->iSdst;
114393 pDest->affSdst =
114394 sqlite3CompareAffinity(pEList->a[0].pExpr, pDest->affSdst);
114403 sqlite3VdbeAddOp4(v, OP_MakeRecord, regResult,1,r1, &pDest->affSdst, 1);
114443 sqlite3VdbeAddOp1(v, OP_Yield, pDest->iSDParm);
114464 pSO = pDest->pOrderBy;
114712 SelectDest *pDest /* Write the sorted results here */
114721 int eDest = pDest->eDest;
114722 int iParm = pDest->iSDParm;
114743 regRow = pDest->iSdst;
114785 &pDest->affSdst, 1);
114802 sqlite3VdbeAddOp2(v, OP_ResultRow, pDest->iSdst, nColumn);
114803 sqlite3ExprCacheAffinityChange(pParse, pDest->iSdst, nColumn);
114805 sqlite3VdbeAddOp1(v, OP_Yield, pDest->iSDParm);
115500 SelectDest *pDest /* What to do with query results */
115596 0, 0, pDest, addrCont, addrBreak);
115632 SelectDest *pDest /* What to do with query results */
115649 SelectDest *pDest /* What to do with query results */
115669 rc = sqlite3Select(pParse, p, pDest);
115712 SelectDest *pDest /* What to do with query results */
115732 dest = *pDest;
115779 return multiSelectOrderBy(pParse, p, pDest);
116059 pDest->iSdst = dest.iSdst;
116060 pDest->nSdst = dest.nSdst;
116103 SelectDest *pDest, /* Where to send the data */
116134 assert( pDest->eDest!=SRT_Exists );
116135 assert( pDest->eDest!=SRT_Table );
116136 switch( pDest->eDest ){
116143 sqlite3VdbeAddOp2(v, OP_NewRowid, pDest->iSDParm, r2);
116144 sqlite3VdbeAddOp3(v, OP_Insert, pDest->iSDParm, r1, r2);
116159 pDest->affSdst =
116160 sqlite3CompareAffinity(p->pEList->a[0].pExpr, pDest->affSdst);
116162 sqlite3VdbeAddOp4(v, OP_MakeRecord, pIn->iSdst, 1, r1, &pDest->affSdst,1);
116164 sqlite3VdbeAddOp2(v, OP_IdxInsert, pDest->iSDParm, r1);
116175 sqlite3ExprCodeMove(pParse, pIn->iSdst, pDest->iSDParm, 1);
116185 if( pDest->iSdst==0 ){
116186 pDest->iSdst = sqlite3GetTempRange(pParse, pIn->nSdst);
116187 pDest->nSdst = pIn->nSdst;
116189 sqlite3ExprCodeMove(pParse, pIn->iSdst, pDest->iSdst, pIn->nSdst);
116190 sqlite3VdbeAddOp1(v, OP_Yield, pDest->iSDParm);
116203 assert( pDest->eDest==SRT_Output );
116313 SelectDest *pDest /* What to do with query results */
116507 p, &destA, pDest, regOutA,
116516 p, &destB, pDest, regOutB,
116600 if( pDest->eDest==SRT_Output ){
118329 SelectDest *pDest /* What to do with the query results */
118366 assert( p->pOrderBy==0 || pDest->eDest!=SRT_DistFifo );
118367 assert( p->pOrderBy==0 || pDest->eDest!=SRT_Fifo );
118368 assert( p->pOrderBy==0 || pDest->eDest!=SRT_DistQueue );
118369 assert( p->pOrderBy==0 || pDest->eDest!=SRT_Queue );
118370 if( IgnorableOrderby(pDest) ){
118371 assert(pDest->eDest==SRT_Exists || pDest->eDest==SRT_Union ||
118372 pDest->eDest==SRT_Except || pDest->eDest==SRT_Discard ||
118373 pDest->eDest==SRT_Queue || pDest->eDest==SRT_DistFifo ||
118374 pDest->eDest==SRT_DistQueue || pDest->eDest==SRT_Fifo);
118402 if( checkForMultiColumnSelectError(pParse, pDest, p->pEList->nExpr) ){
118436 if( !IgnorableOrderby(pDest) ){
118452 rc = multiSelect(pParse, p, pDest);
118652 if( pDest->eDest==SRT_EphemTab ){
118653 sqlite3VdbeAddOp2(v, OP_OpenEphemeral, pDest->iSDParm, pEList->nExpr);
118713 selectInnerLoop(pParse, p, pEList, -1, &sSort, &sDistinct, pDest,
119012 &sDistinct, pDest,
119156 pDest, addrEnd, addrEnd);
119173 generateSortTail(pParse, p, &sSort, pEList->nExpr, pDest);
119192 if( rc==SQLITE_OK && pDest->eDest==SRT_Output ){
126836 static void whereOrMove(WhereOrSet *pDest, WhereOrSet *pSrc){
126837 pDest->n = pSrc->n;
126838 memcpy(pDest->a, pSrc->a, pDest->n*sizeof(pDest->a[0]));