| /sqlite-3.40.0/ext/misc/ |
| H A D | unionvtab.c | 437 UnionSrc *pSrc, in unionInvokeOpenClose() argument 522 db, pSrc->zDb, pSrc->zTab, "_rowid_", &zType, 0, 0, &bPk, 0 in unionIsIntkeyTable() 530 (pSrc->zDb ? pSrc->zDb : ""), in unionIsIntkeyTable() 532 pSrc->zTab in unionIsIntkeyTable() 623 rc = sqlite3_open_v2(pSrc->zFile, &pSrc->db, openFlags, 0); in unionOpenDatabaseInner() 627 pSrc->db = 0; in unionOpenDatabaseInner() 637 rc = sqlite3_open_v2(pSrc->zFile, &pSrc->db, openFlags, 0); in unionOpenDatabaseInner() 707 assert( pSrc->nUser>=0 && pSrc->db ); in unionIncrRefcount() 1009 pSrc->zTab, pSrc->zDb in unionConnect() 1196 if( iMin>pSrc->iMax || iMax<pSrc->iMin ){ in unionFilter() [all …]
|
| H A D | scrub.c | 71 sqlite3_file *pSrc; /* Source file handle */ member 113 rc = p->pSrc->pMethods->xRead(p->pSrc, pOut, p->szPage, iOff); in scrubBackupRead() 202 sqlite3_file_control(p->dbSrc, "main", SQLITE_FCNTL_FILE_POINTER, &p->pSrc); in scrubBackupOpenSrc() 203 if( p->pSrc==0 || p->pSrc->pMethods==0 ){ in scrubBackupOpenSrc()
|
| /sqlite-3.40.0/src/ |
| H A D | backup.c | 29 Btree *pSrc; /* Source b-tree file */ member 191 if( 0==p->pSrc || 0==p->pDest in sqlite3_backup_init() 204 p->pSrc->nBackup++; in sqlite3_backup_init() 310 assert( sqlite3BtreeHoldsMutex(p->pSrc) ); in attachBackupObject() 330 sqlite3BtreeEnter(p->pSrc); in sqlite3_backup_step() 381 pgszSrc = sqlite3BtreeGetPageSize(p->pSrc); in sqlite3_backup_step() 566 sqlite3BtreeLeave(p->pSrc); in sqlite3_backup_step() 583 sqlite3BtreeEnter(p->pSrc); in sqlite3_backup_finish() 590 p->pSrc->nBackup--; in sqlite3_backup_finish() 613 sqlite3BtreeLeave(p->pSrc); in sqlite3_backup_finish() [all …]
|
| H A D | select.c | 153 if( pSrc==0 ) pSrc = sqlite3DbMallocZero(pParse->db, sizeof(*pSrc)); in sqlite3SelectNew() 154 pNew->pSrc = pSrc; in sqlite3SelectNew() 492 pSrc = p->pSrc; in sqlite3ProcessJoin() 3890 SrcList *pSrc; in substSelect() local 3900 pSrc = p->pSrc; in substSelect() 3902 for(i=pSrc->nSrc, pItem=pSrc->a; i>0; i--, pItem++){ in substSelect() 3966 for(i=0, pItem=pSrc->a; i<pSrc->nSrc; i++, pItem++){ in srclistRenumberCursors() 4253 pSrc = p->pSrc; in flattenSubquery() 4254 assert( pSrc && iFrom>=0 && iFrom<pSrc->nSrc ); in flattenSubquery() 4554 pParent->pSrc = pSrc; in flattenSubquery() [all …]
|
| H A D | alter.c | 140 assert( pSrc->nSrc==1 ); in sqlite3AlterRenameTable() 285 sqlite3SrcListDelete(db, pSrc); in sqlite3AlterRenameTable() 889 SrcList *pSrc = p->pSrc; in renameUnmapSelectCb() local 1319 if( pSrc ){ in renameResolveTrigger() 1325 pSrc = 0; in renameResolveTrigger() 1331 assert( pSrc==pSel->pSrc ); in renameResolveTrigger() 1333 pSel->pSrc = 0; in renameResolveTrigger() 1349 sNC.pSrcList = pSrc; in renameResolveTrigger() 1645 SrcList *pSrc = pSelect->pSrc; in renameTableSelectCb() local 1651 if( NEVER(pSrc==0) ){ in renameTableSelectCb() [all …]
|
| H A D | whereexpr.c | 548 exprAnalyze(pSrc, pWC, idxNew); in whereCombineDisjuncts() 939 SrcList *pSrc = pS->pSrc; in exprSelectUsage() local 945 if( ALWAYS(pSrc!=0) ){ in exprSelectUsage() 947 for(i=0; i<pSrc->nSrc; i++){ in exprSelectUsage() 1128 if( ALWAYS(pSrc->nSrc>0) && (pSrc->a[0].fg.jointype & JT_LTORJ)!=0 ){ in exprAnalyze() 1245 exprAnalyze(pSrc, pWC, idxNew); in exprAnalyze() 1371 exprAnalyze(pSrc, pWC, idxNew1); in exprAnalyze() 1379 exprAnalyze(pSrc, pWC, idxNew2); in exprAnalyze() 1415 exprAnalyze(pSrc, pWC, idxNew); in exprAnalyze() 1446 exprAnalyze(pSrc, pWC, idxNew); in exprAnalyze() [all …]
|
| H A D | insert.c | 2721 assert( pDest && pSrc ); in xferCompatibleIndex() 2723 if( pDest->nKeyCol!=pSrc->nKeyCol || pDest->nColumn!=pSrc->nColumn ){ in xferCompatibleIndex() 2729 for(i=0; i<pSrc->nKeyCol; i++){ in xferCompatibleIndex() 2820 if( pSelect->pSrc->nSrc!=1 ){ in xferOptimization() 2860 pItem = pSelect->pSrc->a; in xferOptimization() 2862 if( pSrc==0 ){ in xferOptimization() 2865 if( pSrc->tnum==pDest->tnum && pSrc->pSchema==pDest->pSchema ){ in xferOptimization() 2872 if( !IsOrdinaryTable(pSrc) ){ in xferOptimization() 2875 if( pDest->nCol!=pSrc->nCol ){ in xferOptimization() 3039 if( HasRowid(pSrc) ){ in xferOptimization() [all …]
|
| H A D | delete.c | 32 SrcItem *pItem = pSrc->a; in sqlite3SrcListLookup() 34 assert( pItem && pSrc->nSrc>=1 ); in sqlite3SrcListLookup() 218 pTab = pSrc->a[0].pTab; in sqlite3LimitWhere() 245 pSrc->a[0].pTab = 0; in sqlite3LimitWhere() 247 pSrc->a[0].pTab = pTab; in sqlite3LimitWhere() 248 if( pSrc->a[0].fg.isIndexedBy ){ in sqlite3LimitWhere() 249 assert( pSrc->a[0].fg.isCte==0 ); in sqlite3LimitWhere() 250 pSrc->a[0].u2.pIBIndex = 0; in sqlite3LimitWhere() 251 pSrc->a[0].fg.isIndexedBy = 0; in sqlite3LimitWhere() 253 }else if( pSrc->a[0].fg.isCte ){ in sqlite3LimitWhere() [all …]
|
| H A D | where.c | 192 pDest->n = pSrc->n; in whereOrMove() 860 pTable = pSrc->pTab; in constructAutomaticIndex() 1189 assert( pSrc!=0 ); in allocateIndexInfo() 1190 pTab = pSrc->pTab; in allocateIndexInfo() 3397 pTab = pSrc->pTab; in whereLoopAddBtree() 3401 if( pSrc->fg.isIndexedBy ){ in whereLoopAddBtree() 3495 && !whereUsablePartialIndex(pSrc->iCursor, pSrc->fg.jointype, pWC, in whereLoopAddBtree() 3565 || pSrc->fg.isIndexedBy in whereLoopAddBtree() 6161 SrcItem *pSrc; in sqlite3WhereBegin() local 6168 sqlite3VdbeAddOp2(v, OP_Gosub, pSrc->regReturn, pSrc->addrFillSub); in sqlite3WhereBegin() [all …]
|
| H A D | walker.c | 165 SrcList *pSrc; in sqlite3WalkSelectFrom() local 169 pSrc = p->pSrc; in sqlite3WalkSelectFrom() 170 if( ALWAYS(pSrc) ){ in sqlite3WalkSelectFrom() 171 for(i=pSrc->nSrc, pItem=pSrc->a; i>0; i--, pItem++){ in sqlite3WalkSelectFrom()
|
| H A D | update.c | 21 SrcList *pSrc, /* The virtual table to be modified */ 206 SrcList *pSrc; in updateFromSelect() local 222 pSrc = sqlite3SrcListDup(db, pTabList, 0); in updateFromSelect() 226 if( pSrc ){ in updateFromSelect() 227 pSrc->a[0].fg.notCte = 1; in updateFromSelect() 228 pSrc->a[0].iCursor = -1; in updateFromSelect() 229 pSrc->a[0].pTab->nTabRef--; in updateFromSelect() 230 pSrc->a[0].pTab = 0; in updateFromSelect() 1186 SrcList *pSrc, /* The virtual table to be modified */ in updateVirtualTable() argument 1217 if( pSrc->nSrc>1 ){ in updateVirtualTable() [all …]
|
| H A D | fkey.c | 549 SrcList *pSrc, /* The child table to be scanned */ in fkScanChildren() argument 620 pRight = exprTableColumn(db, pTab, pSrc->a[0].iCursor, -1); in fkScanChildren() 640 sNameContext.pSrcList = pSrc; in fkScanChildren() 648 pWInfo = sqlite3WhereBegin(pParse, pSrc, pWhere, 0, 0, 0, 0, 0); in fkScanChildren() 1018 SrcList *pSrc; in sqlite3FkCheck() local 1042 pSrc = sqlite3SrcListAppend(pParse, 0, 0, 0); in sqlite3FkCheck() 1043 if( pSrc ){ in sqlite3FkCheck() 1044 SrcItem *pItem = pSrc->a; in sqlite3FkCheck() 1051 fkScanChildren(pParse, pSrc, pTab, pIdx, pFKey, aiCol, regNew, -1); in sqlite3FkCheck() 1055 fkScanChildren(pParse, pSrc, pTab, pIdx, pFKey, aiCol, regOld, 1); in sqlite3FkCheck() [all …]
|
| H A D | window.c | 737 SrcList *pSrc; member 763 int nSrc = p->pSrc->nSrc; in selectWindowRewriteExprCb() 860 SrcList *pSrc, in selectWindowRewriteEList() argument 874 sRewrite.pSrc = pSrc; in selectWindowRewriteEList() 967 SrcList *pSrc = p->pSrc; in sqlite3WindowRewrite() local 993 p->pSrc = 0; in sqlite3WindowRewrite() 1075 p->pSrc = sqlite3SrcListAppend(pParse, 0, 0, 0); in sqlite3WindowRewrite() 1079 if( p->pSrc ){ in sqlite3WindowRewrite() 1081 p->pSrc->a[0].pSelect = pSub; in sqlite3WindowRewrite() 1082 sqlite3SrcListAssignCursors(pParse, p->pSrc); in sqlite3WindowRewrite() [all …]
|
| H A D | trigger.c | 857 SrcList *pSrc; /* SrcList to be returned */ in sqlite3TriggerStepSrc() local 859 pSrc = sqlite3SrcListAppend(pParse, 0, 0, 0); in sqlite3TriggerStepSrc() 860 assert( pSrc==0 || pSrc->nSrc==1 ); in sqlite3TriggerStepSrc() 861 assert( zName || pSrc==0 ); in sqlite3TriggerStepSrc() 862 if( pSrc ){ in sqlite3TriggerStepSrc() 864 pSrc->a[0].zName = zName; in sqlite3TriggerStepSrc() 866 pSrc->a[0].pSchema = pSchema; in sqlite3TriggerStepSrc() 878 pSrc = sqlite3SrcListAppendList(pParse, pSrc, pDup); in sqlite3TriggerStepSrc() 883 return pSrc; in sqlite3TriggerStepSrc() 975 sSelect.pSrc = &sFrom; in codeReturningTrigger()
|
| H A D | treeview.c | 185 void sqlite3TreeViewSrcList(TreeView *pView, const SrcList *pSrc){ in sqlite3TreeViewSrcList() argument 187 if( pSrc==0 ) return; in sqlite3TreeViewSrcList() 188 for(i=0; i<pSrc->nSrc; i++){ in sqlite3TreeViewSrcList() 189 const SrcItem *pItem = &pSrc->a[i]; in sqlite3TreeViewSrcList() 222 sqlite3TreeViewItem(pView, zLine, i<pSrc->nSrc-1); in sqlite3TreeViewSrcList() 278 if( p->pSrc && p->pSrc->nSrc ) n++; in sqlite3TreeViewSelect() 304 if( p->pSrc && p->pSrc->nSrc ){ in sqlite3TreeViewSelect() 307 sqlite3TreeViewSrcList(pView, p->pSrc); in sqlite3TreeViewSelect()
|
| H A D | expr.c | 1730 pNew->pSrc = sqlite3SrcListDup(db, p->pSrc, flags); in sqlite3SelectDup() 2584 SrcList *pSrc; in isCandidateForInOpt() local 2600 pSrc = p->pSrc; in isCandidateForInOpt() 2601 assert( pSrc!=0 ); in isCandidateForInOpt() 2604 pTab = pSrc->a[0].pTab; in isCandidateForInOpt() 2787 pTab = p->pSrc->a[0].pTab; in sqlite3FindInIndex() 6054 SrcList *pSrc = pSelect->pSrc; in selectRefEnter() local 6059 p->nExclude += pSrc->nSrc; in selectRefEnter() 6074 SrcList *pSrc = pSelect->pSrc; in selectRefLeave() local 6095 SrcList *pSrc = p->pRef; in exprRefToSrcList() local [all …]
|
| H A D | resolve.c | 763 Expr *sqlite3CreateColumnExpr(sqlite3 *db, SrcList *pSrc, int iSrc, int iCol){ in sqlite3CreateColumnExpr() argument 766 SrcItem *pItem = &pSrc->a[iSrc]; in sqlite3CreateColumnExpr() 1375 nc.pSrcList = pSelect->pSrc; in resolveOrderByTermToExprList() 1745 Select *pSub = p->pSrc->a[0].pSelect; in resolveSelectStep() 1746 assert( p->pSrc->nSrc==1 && p->pOrderBy ); in resolveSelectStep() 1754 for(i=0; i<p->pSrc->nSrc; i++){ in resolveSelectStep() 1755 SrcItem *pItem = &p->pSrc->a[i]; in resolveSelectStep() 1783 sNC.pSrcList = p->pSrc; in resolveSelectStep() 1824 for(i=0; i<p->pSrc->nSrc; i++){ in resolveSelectStep() 1825 SrcItem *pItem = &p->pSrc->a[i]; in resolveSelectStep() [all …]
|
| H A D | upsert.c | 263 SrcList *pSrc; /* FROM clause for the UPDATE */ in sqlite3UpsertDoUpdate() local 304 pSrc = sqlite3SrcListDup(db, pTop->pUpsertSrc, 0); in sqlite3UpsertDoUpdate() 311 sqlite3Update(pParse, pSrc, sqlite3ExprListDup(db,pUpsert->pUpsertSet,0), in sqlite3UpsertDoUpdate()
|
| H A D | build.c | 4763 assert( pSrc!=0 ); in sqlite3SrcListEnlarge() 4764 assert( iStart<=pSrc->nSrc ); in sqlite3SrcListEnlarge() 4767 if( (u32)pSrc->nSrc+nExtra>pSrc->nAlloc ){ in sqlite3SrcListEnlarge() 4779 sizeof(*pSrc) + (nAlloc-1)*sizeof(pSrc->a[0]) ); in sqlite3SrcListEnlarge() 4784 pSrc = pNew; in sqlite3SrcListEnlarge() 4785 pSrc->nAlloc = nAlloc; in sqlite3SrcListEnlarge() 4791 pSrc->a[i+nExtra] = pSrc->a[i]; in sqlite3SrcListEnlarge() 4793 pSrc->nSrc += nExtra; in sqlite3SrcListEnlarge() 4796 memset(&pSrc->a[iStart], 0, sizeof(pSrc->a[0])*nExtra); in sqlite3SrcListEnlarge() 4798 pSrc->a[i].iCursor = -1; in sqlite3SrcListEnlarge() [all …]
|
| H A D | btree.c | 1472 testcase( pSrc!=pPage ); in ptrmapPutOvflPtr() 6806 const u8 *pSrc; in fillInCell() local 6827 pSrc = pX->pData; in fillInCell() 6835 pSrc = pX->pKey; in fillInCell() 6909 memcpy(pPayload, pSrc, n); in fillInCell() 6912 memcpy(pPayload, pSrc, n); in fillInCell() 6919 pSrc += n; in fillInCell() 9310 getCellInfo(pSrc); in sqlite3BtreeTransferRow() 9317 nIn = pSrc->info.nLocal; in sqlite3BtreeTransferRow() 9318 aIn = pSrc->info.pPayload; in sqlite3BtreeTransferRow() [all …]
|
| H A D | attach.c | 463 SrcList *pList = pSelect->pSrc; in fixSelectCb() 550 s.pSrc = pList; in sqlite3FixSrcList()
|
| H A D | tclsqlite.c | 3150 sqlite3 *pSrc; in DbObjCmd() local 3164 rc = sqlite3_open_v2(zSrcFile, &pSrc, in DbObjCmd() 3168 sqlite3_errmsg(pSrc), (char*)0); in DbObjCmd() 3169 sqlite3_close(pSrc); in DbObjCmd() 3172 pBackup = sqlite3_backup_init(pDb->db, zDestDb, pSrc, "main"); in DbObjCmd() 3176 sqlite3_close(pSrc); in DbObjCmd() 3198 sqlite3_close(pSrc); in DbObjCmd()
|
| H A D | parse.y | 1334 SrcList *pSrc = sqlite3SrcListAppend(pParse, 0,&Y,&Z); 1335 Select *pSelect = sqlite3SelectNew(pParse, 0,pSrc,0,0,0,0,0,0); 1336 if( E ) sqlite3SrcListFuncArgs(pParse, pSelect ? pSrc : 0, E);
|
| /sqlite-3.40.0/ext/wasm/api/ |
| H A D | sqlite3-api-opfs.js | 772 xWrite: function(pFile,pSrc,n,offset64){ argument 777 f.sabView.set(wasm.heap8u().subarray(pSrc, pSrc+n));
|
| /sqlite-3.40.0/ext/rtree/ |
| H A D | rtree.c | 829 u8 *pSrc = &pDst[pRtree->nBytesPerCell]; in nodeDeleteCell() local 831 memmove(pDst, pSrc, nByte); in nodeDeleteCell() 1803 RtreeMatchArg *pBlob, *pSrc; /* BLOB returned by geometry function */ in deserializeGeometry() local 1806 pSrc = sqlite3_value_pointer(pValue, "RtreeMatchArg"); in deserializeGeometry() 1807 if( pSrc==0 ) return SQLITE_ERROR; in deserializeGeometry() 1809 sqlite3_malloc64( sizeof(*pInfo)+pSrc->iSize ); in deserializeGeometry() 1813 memcpy(pBlob, pSrc, pSrc->iSize); in deserializeGeometry()
|