亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? where.c

?? 新版輕量級嵌入式數據庫
?? C
?? 第 1 頁 / 共 5 頁
字號:
  /* Analyze all of the subexpressions.  Note that exprAnalyze() might  ** add new virtual terms onto the end of the WHERE clause.  We do not  ** want to analyze these virtual terms, so start analyzing at the end  ** and work forward so that the added virtual terms are never processed.  */  for(i=0; i<pTabList->nSrc; i++){    createMask(&maskSet, pTabList->a[i].iCursor);  }  exprAnalyzeAll(pTabList, &maskSet, &wc);  if( sqlite3MallocFailed() ){    goto whereBeginNoMem;  }  /* Chose the best index to use for each table in the FROM clause.  **  ** This loop fills in the following fields:  **  **   pWInfo->a[].pIdx      The index to use for this level of the loop.  **   pWInfo->a[].flags     WHERE_xxx flags associated with pIdx  **   pWInfo->a[].nEq       The number of == and IN constraints  **   pWInfo->a[].iFrom     When term of the FROM clause is being coded  **   pWInfo->a[].iTabCur   The VDBE cursor for the database table  **   pWInfo->a[].iIdxCur   The VDBE cursor for the index  **  ** This loop also figures out the nesting order of tables in the FROM  ** clause.  */  notReady = ~(Bitmask)0;  pTabItem = pTabList->a;  pLevel = pWInfo->a;  andFlags = ~0;  TRACE(("*** Optimizer Start ***\n"));  for(i=iFrom=0, pLevel=pWInfo->a; i<pTabList->nSrc; i++, pLevel++){    Index *pIdx;                /* Index for FROM table at pTabItem */    int flags;                  /* Flags asssociated with pIdx */    int nEq;                    /* Number of == or IN constraints */    double cost;                /* The cost for pIdx */    int j;                      /* For looping over FROM tables */    Index *pBest = 0;           /* The best index seen so far */    int bestFlags = 0;          /* Flags associated with pBest */    int bestNEq = 0;            /* nEq associated with pBest */    double lowestCost;          /* Cost of the pBest */    int bestJ = 0;              /* The value of j */    Bitmask m;                  /* Bitmask value for j or bestJ */    int once = 0;               /* True when first table is seen */    lowestCost = SQLITE_BIG_DBL;    for(j=iFrom, pTabItem=&pTabList->a[j]; j<pTabList->nSrc; j++, pTabItem++){      if( once &&           ((pTabItem->jointype & (JT_LEFT|JT_CROSS))!=0           || (j>0 && (pTabItem[-1].jointype & (JT_LEFT|JT_CROSS))!=0))      ){        break;      }      m = getMask(&maskSet, pTabItem->iCursor);      if( (m & notReady)==0 ){        if( j==iFrom ) iFrom++;        continue;      }      cost = bestIndex(pParse, &wc, pTabItem, notReady,                       (i==0 && ppOrderBy) ? *ppOrderBy : 0,                       &pIdx, &flags, &nEq);      if( cost<lowestCost ){        once = 1;        lowestCost = cost;        pBest = pIdx;        bestFlags = flags;        bestNEq = nEq;        bestJ = j;      }    }    TRACE(("*** Optimizer choose table %d for loop %d\n", bestJ,           pLevel-pWInfo->a));    if( (bestFlags & WHERE_ORDERBY)!=0 ){      *ppOrderBy = 0;    }    andFlags &= bestFlags;    pLevel->flags = bestFlags;    pLevel->pIdx = pBest;    pLevel->nEq = bestNEq;    pLevel->aInLoop = 0;    pLevel->nIn = 0;    if( pBest ){      pLevel->iIdxCur = pParse->nTab++;    }else{      pLevel->iIdxCur = -1;    }    notReady &= ~getMask(&maskSet, pTabList->a[bestJ].iCursor);    pLevel->iFrom = bestJ;  }  TRACE(("*** Optimizer Finished ***\n"));  /* If the total query only selects a single row, then the ORDER BY  ** clause is irrelevant.  */  if( (andFlags & WHERE_UNIQUE)!=0 && ppOrderBy ){    *ppOrderBy = 0;  }  /* Open all tables in the pTabList and any indices selected for  ** searching those tables.  */  sqlite3CodeVerifySchema(pParse, -1); /* Insert the cookie verifier Goto */  pLevel = pWInfo->a;  for(i=0, pLevel=pWInfo->a; i<pTabList->nSrc; i++, pLevel++){    Table *pTab;     /* Table to open */    Index *pIx;      /* Index used to access pTab (if any) */    int iDb;         /* Index of database containing table/index */    int iIdxCur = pLevel->iIdxCur;#ifndef SQLITE_OMIT_EXPLAIN    if( pParse->explain==2 ){      char *zMsg;      struct SrcList_item *pItem = &pTabList->a[pLevel->iFrom];      zMsg = sqlite3MPrintf("TABLE %s", pItem->zName);      if( pItem->zAlias ){        zMsg = sqlite3MPrintf("%z AS %s", zMsg, pItem->zAlias);      }      if( (pIx = pLevel->pIdx)!=0 ){        zMsg = sqlite3MPrintf("%z WITH INDEX %s", zMsg, pIx->zName);      }else if( pLevel->flags & (WHERE_ROWID_EQ|WHERE_ROWID_RANGE) ){        zMsg = sqlite3MPrintf("%z USING PRIMARY KEY", zMsg);      }      sqlite3VdbeOp3(v, OP_Explain, i, pLevel->iFrom, zMsg, P3_DYNAMIC);    }#endif /* SQLITE_OMIT_EXPLAIN */    pTabItem = &pTabList->a[pLevel->iFrom];    pTab = pTabItem->pTab;    iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);    if( pTab->isTransient || pTab->pSelect ) continue;    if( (pLevel->flags & WHERE_IDX_ONLY)==0 ){      sqlite3OpenTable(pParse, pTabItem->iCursor, iDb, pTab, OP_OpenRead);      if( pTab->nCol<(sizeof(Bitmask)*8) ){        Bitmask b = pTabItem->colUsed;        int n = 0;        for(; b; b=b>>1, n++){}        sqlite3VdbeChangeP2(v, sqlite3VdbeCurrentAddr(v)-1, n);        assert( n<=pTab->nCol );      }    }else{      sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);    }    pLevel->iTabCur = pTabItem->iCursor;    if( (pIx = pLevel->pIdx)!=0 ){      KeyInfo *pKey = sqlite3IndexKeyinfo(pParse, pIx);      assert( pIx->pSchema==pTab->pSchema );      sqlite3VdbeAddOp(v, OP_Integer, iDb, 0);      VdbeComment((v, "# %s", pIx->zName));      sqlite3VdbeOp3(v, OP_OpenRead, iIdxCur, pIx->tnum,                     (char*)pKey, P3_KEYINFO_HANDOFF);    }    if( (pLevel->flags & WHERE_IDX_ONLY)!=0 ){      sqlite3VdbeAddOp(v, OP_SetNumColumns, iIdxCur, pIx->nColumn+1);    }    sqlite3CodeVerifySchema(pParse, iDb);  }  pWInfo->iTop = sqlite3VdbeCurrentAddr(v);  /* Generate the code to do the search.  Each iteration of the for  ** loop below generates code for a single nested loop of the VM  ** program.  */  notReady = ~(Bitmask)0;  for(i=0, pLevel=pWInfo->a; i<pTabList->nSrc; i++, pLevel++){    int j;    int iCur = pTabItem->iCursor;  /* The VDBE cursor for the table */    Index *pIdx;       /* The index we will be using */    int iIdxCur;       /* The VDBE cursor for the index */    int omitTable;     /* True if we use the index only */    int bRev;          /* True if we need to scan in reverse order */    pTabItem = &pTabList->a[pLevel->iFrom];    iCur = pTabItem->iCursor;    pIdx = pLevel->pIdx;    iIdxCur = pLevel->iIdxCur;    bRev = (pLevel->flags & WHERE_REVERSE)!=0;    omitTable = (pLevel->flags & WHERE_IDX_ONLY)!=0;    /* Create labels for the "break" and "continue" instructions    ** for the current loop.  Jump to brk to break out of a loop.    ** Jump to cont to go immediately to the next iteration of the    ** loop.    */    brk = pLevel->brk = sqlite3VdbeMakeLabel(v);    cont = pLevel->cont = sqlite3VdbeMakeLabel(v);    /* If this is the right table of a LEFT OUTER JOIN, allocate and    ** initialize a memory cell that records if this table matches any    ** row of the left table of the join.    */    if( pLevel->iFrom>0 && (pTabItem[-1].jointype & JT_LEFT)!=0 ){      if( !pParse->nMem ) pParse->nMem++;      pLevel->iLeftJoin = pParse->nMem++;      sqlite3VdbeAddOp(v, OP_MemInt, 0, pLevel->iLeftJoin);      VdbeComment((v, "# init LEFT JOIN no-match flag"));    }    if( pLevel->flags & WHERE_ROWID_EQ ){      /* Case 1:  We can directly reference a single row using an      **          equality comparison against the ROWID field.  Or      **          we reference multiple rows using a "rowid IN (...)"      **          construct.      */      pTerm = findTerm(&wc, iCur, -1, notReady, WO_EQ|WO_IN, 0);      assert( pTerm!=0 );      assert( pTerm->pExpr!=0 );      assert( pTerm->leftCursor==iCur );      assert( omitTable==0 );      codeEqualityTerm(pParse, pTerm, brk, pLevel);      sqlite3VdbeAddOp(v, OP_MustBeInt, 1, brk);      sqlite3VdbeAddOp(v, OP_NotExists, iCur, brk);      VdbeComment((v, "pk"));      pLevel->op = OP_Noop;    }else if( pLevel->flags & WHERE_ROWID_RANGE ){      /* Case 2:  We have an inequality comparison against the ROWID field.      */      int testOp = OP_Noop;      int start;      WhereTerm *pStart, *pEnd;      assert( omitTable==0 );      pStart = findTerm(&wc, iCur, -1, notReady, WO_GT|WO_GE, 0);      pEnd = findTerm(&wc, iCur, -1, notReady, WO_LT|WO_LE, 0);      if( bRev ){        pTerm = pStart;        pStart = pEnd;        pEnd = pTerm;      }      if( pStart ){        Expr *pX;        pX = pStart->pExpr;        assert( pX!=0 );        assert( pStart->leftCursor==iCur );        sqlite3ExprCode(pParse, pX->pRight);        sqlite3VdbeAddOp(v, OP_ForceInt, pX->op==TK_LE || pX->op==TK_GT, brk);        sqlite3VdbeAddOp(v, bRev ? OP_MoveLt : OP_MoveGe, iCur, brk);        VdbeComment((v, "pk"));        disableTerm(pLevel, pStart);      }else{        sqlite3VdbeAddOp(v, bRev ? OP_Last : OP_Rewind, iCur, brk);      }      if( pEnd ){        Expr *pX;        pX = pEnd->pExpr;        assert( pX!=0 );        assert( pEnd->leftCursor==iCur );        sqlite3ExprCode(pParse, pX->pRight);        pLevel->iMem = pParse->nMem++;        sqlite3VdbeAddOp(v, OP_MemStore, pLevel->iMem, 1);        if( pX->op==TK_LT || pX->op==TK_GT ){          testOp = bRev ? OP_Le : OP_Ge;        }else{          testOp = bRev ? OP_Lt : OP_Gt;        }        disableTerm(pLevel, pEnd);      }      start = sqlite3VdbeCurrentAddr(v);      pLevel->op = bRev ? OP_Prev : OP_Next;      pLevel->p1 = iCur;      pLevel->p2 = start;      if( testOp!=OP_Noop ){        sqlite3VdbeAddOp(v, OP_Rowid, iCur, 0);        sqlite3VdbeAddOp(v, OP_MemLoad, pLevel->iMem, 0);        sqlite3VdbeAddOp(v, testOp, SQLITE_AFF_NUMERIC, brk);      }    }else if( pLevel->flags & WHERE_COLUMN_RANGE ){      /* Case 3: The WHERE clause term that refers to the right-most      **         column of the index is an inequality.  For example, if      **         the index is on (x,y,z) and the WHERE clause is of the      **         form "x=5 AND y<10" then this case is used.  Only the      **         right-most column can be an inequality - the rest must      **         use the "==" and "IN" operators.      **      **         This case is also used when there are no WHERE clause      **         constraints but an index is selected anyway, in order      **         to force the output order to conform to an ORDER BY.      */      int start;      int nEq = pLevel->nEq;      int topEq=0;        /* True if top limit uses ==. False is strictly < */      int btmEq=0;        /* True if btm limit uses ==. False if strictly > */      int topOp, btmOp;   /* Operators for the top and bottom search bounds */      int testOp;      int nNotNull;       /* Number of rows of index that must be non-NULL */      int topLimit = (pLevel->flags & WHERE_TOP_LIMIT)!=0;      int btmLimit = (pLevel->flags & WHERE_BTM_LIMIT)!=0;      /* Generate code to evaluate all constraint terms using == or IN      ** and level the values of those terms on the stack.      */      codeAllEqualityTerms(pParse, pLevel, &wc, notReady, brk);      /* Duplicate the equality term values because they will all be      ** used twice: once to make the termination key and once to make the      ** start key.      */      for(j=0; j<nEq; j++){        sqlite3VdbeAddOp(v, OP_Dup, nEq-1, 0);      }      /* Figure out what comparison operators to use for top and bottom       ** search bounds. For an ascending index, the bottom bound is a > or >=      ** operator and the top bound is a < or <= operator.  For a descending      ** index the operators are reversed.      */      nNotNull = nEq + topLimit;      if( pIdx->aSortOrder[nEq]==SQLITE_SO_ASC ){        topOp = WO_LT|WO_LE;        btmOp = WO_GT|WO_GE;      }else{        topOp = WO_GT|WO_GE;        btmOp = WO_LT|WO_LE;        SWAP(int, topLimit, btmLimit);      }      /* Generate the termination key.  This is the key value that      ** will end the search.  There is no termination key if there      ** are no equality terms and no "X<..." term.      **      ** 2002-Dec-04: On a reverse-order scan, the so-called "termination"      ** key computed here really ends up being the start key.      */      if( topLimit ){        Expr *pX;        int k = pIdx->aiColumn[j];        pTerm = findTerm(&wc, iCur, k, notReady, topOp, pIdx);        assert( pTerm!=0 );        pX = pTerm->pExpr;        assert( (pTerm->flags & TERM_CODED)==0 );        sqlite3ExprCode(pParse, pX->pRight);        topEq = pTerm->eOperator & (WO_LE|WO_GE);        disableTerm(pLevel, pTerm);        testOp = OP_IdxGE;      }else{        testOp = nEq>0 ? OP_IdxGE : OP_Noop;        topEq = 1;      }      if( testOp!=OP_Noop ){        int nCol = nEq + topLimit;        pLevel->iMem = pParse->nMem++;        buildIndexProbe(v, nCol, nEq, brk, pIdx);        if( bRev ){          int op = topEq ? OP_MoveLe : OP_MoveLt;          sqlite3VdbeAddOp(v, op, iIdxCur, brk);        }else{          sqlite3VdbeAddOp(v, OP_MemStore, pLevel->iMem, 1);        }      }else if( bRev ){        sqlite3VdbeAddOp(v, OP_Last, iIdxCur, brk);      }      /* Generate the start key.  This is the key that defines the lower      ** bound on the search.  There is no start key if there are no      ** equality terms and if there is no "X>..." term.  In      ** that case, generate a "Rewind" instruction in place of the      ** start key search.      **      ** 2002-Dec-04: In the case of a reverse-order search, the so-called      ** "start" key really ends up being used as the termination key.      */      if( btmLimit ){        Expr *pX;        int k = pIdx->aiColumn[j];        pTerm = findTerm(&wc, iCur, k, no

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
另类中文字幕网| 日韩免费福利电影在线观看| 欧美精品 国产精品| 精品不卡在线视频| 亚洲第一二三四区| 99这里只有精品| 久久尤物电影视频在线观看| 亚洲一区二区三区国产| av中文字幕不卡| 国产视频一区二区三区在线观看| 香港成人在线视频| 色综合久久99| 中文字幕在线一区免费| 国产91富婆露脸刺激对白| 欧美变态tickle挠乳网站| 天堂va蜜桃一区二区三区漫画版| 一本色道久久综合亚洲精品按摩| 中文一区二区在线观看| 九九**精品视频免费播放| 欧美乱熟臀69xxxxxx| 亚洲第一综合色| 欧美日韩国产精选| 亚洲午夜私人影院| 欧美日韩aaaaaa| 亚洲一区二区三区自拍| 一本大道av伊人久久综合| 国产精品久久久久久久第一福利 | 五月天亚洲精品| 91国产丝袜在线播放| 亚洲午夜免费电影| 欧美日韩一区二区欧美激情 | 久久精品人人做人人综合| 久久激情五月激情| 精品免费视频一区二区| 精一区二区三区| 久久久久久久精| 成人免费毛片嘿嘿连载视频| 欧美国产欧美亚州国产日韩mv天天看完整| 国产精品中文字幕日韩精品| 国产人成亚洲第一网站在线播放 | 欧美最猛黑人xxxxx猛交| 亚洲午夜久久久| 欧美精选一区二区| 久久激情五月婷婷| 国产精品午夜久久| 在线亚洲人成电影网站色www| 一区二区三区免费| 欧美一区永久视频免费观看| 韩国精品在线观看| 亚洲欧洲日韩一区二区三区| 色88888久久久久久影院野外| 丝袜a∨在线一区二区三区不卡| 日韩一区二区麻豆国产| 国产河南妇女毛片精品久久久| 国产精品国产三级国产普通话三级 | 在线视频一区二区三区| 偷窥国产亚洲免费视频| 久久尤物电影视频在线观看| 99riav一区二区三区| 视频一区欧美精品| 久久久久国产一区二区三区四区 | 久久综合久久综合久久| 成人国产精品免费| 日韩中文字幕麻豆| 久久久美女艺术照精彩视频福利播放| 成人黄色软件下载| 日本va欧美va瓶| 国产精品免费aⅴ片在线观看| 欧美日免费三级在线| 国产激情一区二区三区桃花岛亚洲| 亚洲视频一区二区在线| 欧美成人一级视频| 91久久精品一区二区二区| 激情五月婷婷综合| 亚洲第一久久影院| 国产精品久久久久久久久果冻传媒 | 97久久精品人人澡人人爽| 男女视频一区二区| 亚洲人成影院在线观看| 最新国产成人在线观看| 制服丝袜亚洲色图| 日本精品一级二级| 成人性生交大片免费看中文| 日本成人中文字幕| 亚洲最色的网站| 中文字幕va一区二区三区| 日韩免费在线观看| 欧美日韩精品一区视频| 91视频你懂的| 成人网在线播放| 国产资源在线一区| 美女视频一区二区| 亚洲成人免费在线| 亚洲日本丝袜连裤袜办公室| 欧美国产一区视频在线观看| 日韩精品中文字幕在线一区| 欧美在线视频你懂得| 91免费精品国自产拍在线不卡| 国产精品 欧美精品| 精品一区二区三区免费| 欧美96一区二区免费视频| 亚洲第一福利一区| 午夜精品久久久久久久99水蜜桃| 亚洲卡通动漫在线| 亚洲视频资源在线| 1024精品合集| 亚洲品质自拍视频网站| 综合电影一区二区三区| 国产精品毛片大码女人| 中文字幕av一区二区三区免费看| 国产欧美一区二区精品仙草咪| 久久久精品综合| 欧美激情一区二区| 欧美激情中文不卡| 最新国产精品久久精品| 中文字幕制服丝袜成人av| 综合亚洲深深色噜噜狠狠网站| 中文无字幕一区二区三区| 国产精品日产欧美久久久久| 久久九九全国免费| 国产精品天干天干在线综合| 国产精品久久夜| 一区二区三区中文字幕电影| 亚洲一区二区三区视频在线播放| 亚洲国产综合人成综合网站| 天天影视涩香欲综合网 | 成人免费视频免费观看| 99久久精品免费看| 欧美性一级生活| 日韩一区国产二区欧美三区| 26uuu精品一区二区| 中文字幕巨乱亚洲| 一区二区三区在线影院| 日韩影院在线观看| 国产一区二区三区在线观看精品 | 中文字幕在线一区二区三区| 亚洲精品视频观看| 日本vs亚洲vs韩国一区三区二区| 久久精品国产**网站演员| 成人综合婷婷国产精品久久免费| 波多野结衣中文字幕一区| 精品视频色一区| 精品国产青草久久久久福利| 中文字幕永久在线不卡| 午夜不卡av在线| 国产91精品一区二区麻豆亚洲| 色综合 综合色| 精品美女在线播放| 日日骚欧美日韩| 国产一区啦啦啦在线观看| 91免费小视频| 久久亚洲综合av| 亚洲成人免费视| 成年人午夜久久久| 日韩视频一区二区在线观看| 亚洲天堂中文字幕| 麻豆视频一区二区| 一本一道久久a久久精品 | 日韩一区二区免费视频| 中文字幕日韩av资源站| 男女激情视频一区| 91成人在线精品| 欧美韩国日本不卡| 蜜桃免费网站一区二区三区| 91香蕉视频mp4| 久久精品在线免费观看| 日韩国产在线观看一区| 99re成人精品视频| 久久蜜桃av一区精品变态类天堂 | 不卡的av网站| 欧美精品一区二区三区高清aⅴ| 亚洲自拍偷拍欧美| www.欧美色图| 久久蜜桃一区二区| 开心九九激情九九欧美日韩精美视频电影 | 91麻豆精品国产91久久久久久| 亚洲人成精品久久久久久| 国产精品99久久久| 精品久久国产97色综合| 日本成人超碰在线观看| 日本乱码高清不卡字幕| 国产精品国产三级国产有无不卡 | 91精品免费在线观看| 亚洲男同性视频| 99久久99久久精品免费观看| 久久久久久久电影| 韩国视频一区二区| 日韩欧美精品在线| 美国三级日本三级久久99| 56国语精品自产拍在线观看| 污片在线观看一区二区| 欧美日韩一区小说| 亚洲一区二区视频在线| 在线观看视频91| 亚洲一区在线看| 欧美人xxxx| 婷婷综合在线观看| 欧美一二三区在线| 国内偷窥港台综合视频在线播放| 2023国产精华国产精品|