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

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

?? select.c

?? sqlite 3.3.8 支持加密的版本
?? C
?? 第 1 頁 / 共 5 頁
字號:
    sqlite3VdbeAddOp(v, OP_Delete, pOrderBy->iECursor, 0);
    sqlite3VdbeJumpHere(v, addr2);
    pSelect->iLimit = -1;
  }
}

/*
** Add code to implement the OFFSET
*/
static void codeOffset(
  Vdbe *v,          /* Generate code into this VM */
  Select *p,        /* The SELECT statement being coded */
  int iContinue,    /* Jump here to skip the current record */
  int nPop          /* Number of times to pop stack when jumping */
){
  if( p->iOffset>=0 && iContinue!=0 ){
    int addr;
    sqlite3VdbeAddOp(v, OP_MemIncr, -1, p->iOffset);
    addr = sqlite3VdbeAddOp(v, OP_IfMemNeg, p->iOffset, 0);
    if( nPop>0 ){
      sqlite3VdbeAddOp(v, OP_Pop, nPop, 0);
    }
    sqlite3VdbeAddOp(v, OP_Goto, 0, iContinue);
    VdbeComment((v, "# skip OFFSET records"));
    sqlite3VdbeJumpHere(v, addr);
  }
}

/*
** Add code that will check to make sure the top N elements of the
** stack are distinct.  iTab is a sorting index that holds previously
** seen combinations of the N values.  A new entry is made in iTab
** if the current N values are new.
**
** A jump to addrRepeat is made and the N+1 values are popped from the
** stack if the top N elements are not distinct.
*/
static void codeDistinct(
  Vdbe *v,           /* Generate code into this VM */
  int iTab,          /* A sorting index used to test for distinctness */
  int addrRepeat,    /* Jump to here if not distinct */
  int N              /* The top N elements of the stack must be distinct */
){
  sqlite3VdbeAddOp(v, OP_MakeRecord, -N, 0);
  sqlite3VdbeAddOp(v, OP_Distinct, iTab, sqlite3VdbeCurrentAddr(v)+3);
  sqlite3VdbeAddOp(v, OP_Pop, N+1, 0);
  sqlite3VdbeAddOp(v, OP_Goto, 0, addrRepeat);
  VdbeComment((v, "# skip indistinct records"));
  sqlite3VdbeAddOp(v, OP_IdxInsert, iTab, 0);
}


/*
** This routine generates the code for the inside of the inner loop
** of a SELECT.
**
** If srcTab and nColumn are both zero, then the pEList expressions
** are evaluated in order to get the data for this row.  If nColumn>0
** then data is pulled from srcTab and pEList is used only to get the
** datatypes for each column.
*/
static int selectInnerLoop(
  Parse *pParse,          /* The parser context */
  Select *p,              /* The complete select statement being coded */
  ExprList *pEList,       /* List of values being extracted */
  int srcTab,             /* Pull data from this table */
  int nColumn,            /* Number of columns in the source table */
  ExprList *pOrderBy,     /* If not NULL, sort results using this key */
  int distinct,           /* If >=0, make sure results are distinct */
  int eDest,              /* How to dispose of the results */
  int iParm,              /* An argument to the disposal method */
  int iContinue,          /* Jump here to continue with next row */
  int iBreak,             /* Jump here to break out of the inner loop */
  char *aff               /* affinity string if eDest is SRT_Union */
){
  Vdbe *v = pParse->pVdbe;
  int i;
  int hasDistinct;        /* True if the DISTINCT keyword is present */

  if( v==0 ) return 0;
  assert( pEList!=0 );

  /* If there was a LIMIT clause on the SELECT statement, then do the check
  ** to see if this row should be output.
  */
  hasDistinct = distinct>=0 && pEList->nExpr>0;
  if( pOrderBy==0 && !hasDistinct ){
    codeOffset(v, p, iContinue, 0);
  }

  /* Pull the requested columns.
  */
  if( nColumn>0 ){
    for(i=0; i<nColumn; i++){
      sqlite3VdbeAddOp(v, OP_Column, srcTab, i);
    }
  }else{
    nColumn = pEList->nExpr;
    sqlite3ExprCodeExprList(pParse, pEList);
  }

  /* If the DISTINCT keyword was present on the SELECT statement
  ** and this row has been seen before, then do not make this row
  ** part of the result.
  */
  if( hasDistinct ){
    assert( pEList!=0 );
    assert( pEList->nExpr==nColumn );
    codeDistinct(v, distinct, iContinue, nColumn);
    if( pOrderBy==0 ){
      codeOffset(v, p, iContinue, nColumn);
    }
  }

  switch( eDest ){
    /* In this mode, write each query result to the key of the temporary
    ** table iParm.
    */
#ifndef SQLITE_OMIT_COMPOUND_SELECT
    case SRT_Union: {
      sqlite3VdbeAddOp(v, OP_MakeRecord, nColumn, 0);
      if( aff ){
        sqlite3VdbeChangeP3(v, -1, aff, P3_STATIC);
      }
      sqlite3VdbeAddOp(v, OP_IdxInsert, iParm, 0);
      break;
    }

    /* Construct a record from the query result, but instead of
    ** saving that record, use it as a key to delete elements from
    ** the temporary table iParm.
    */
    case SRT_Except: {
      int addr;
      addr = sqlite3VdbeAddOp(v, OP_MakeRecord, nColumn, 0);
      sqlite3VdbeChangeP3(v, -1, aff, P3_STATIC);
      sqlite3VdbeAddOp(v, OP_NotFound, iParm, addr+3);
      sqlite3VdbeAddOp(v, OP_Delete, iParm, 0);
      break;
    }
#endif

    /* Store the result as data using a unique key.
    */
    case SRT_Table:
    case SRT_EphemTab: {
      sqlite3VdbeAddOp(v, OP_MakeRecord, nColumn, 0);
      if( pOrderBy ){
        pushOntoSorter(pParse, pOrderBy, p);
      }else{
        sqlite3VdbeAddOp(v, OP_NewRowid, iParm, 0);
        sqlite3VdbeAddOp(v, OP_Pull, 1, 0);
        sqlite3VdbeAddOp(v, OP_Insert, iParm, 0);
      }
      break;
    }

#ifndef SQLITE_OMIT_SUBQUERY
    /* If we are creating a set for an "expr IN (SELECT ...)" construct,
    ** then there should be a single item on the stack.  Write this
    ** item into the set table with bogus data.
    */
    case SRT_Set: {
      int addr1 = sqlite3VdbeCurrentAddr(v);
      int addr2;

      assert( nColumn==1 );
      sqlite3VdbeAddOp(v, OP_NotNull, -1, addr1+3);
      sqlite3VdbeAddOp(v, OP_Pop, 1, 0);
      addr2 = sqlite3VdbeAddOp(v, OP_Goto, 0, 0);
      if( pOrderBy ){
        /* At first glance you would think we could optimize out the
        ** ORDER BY in this case since the order of entries in the set
        ** does not matter.  But there might be a LIMIT clause, in which
        ** case the order does matter */
        pushOntoSorter(pParse, pOrderBy, p);
      }else{
        char affinity = (iParm>>16)&0xFF;
        affinity = sqlite3CompareAffinity(pEList->a[0].pExpr, affinity);
        sqlite3VdbeOp3(v, OP_MakeRecord, 1, 0, &affinity, 1);
        sqlite3VdbeAddOp(v, OP_IdxInsert, (iParm&0x0000FFFF), 0);
      }
      sqlite3VdbeJumpHere(v, addr2);
      break;
    }

    /* If any row exist in the result set, record that fact and abort.
    */
    case SRT_Exists: {
      sqlite3VdbeAddOp(v, OP_MemInt, 1, iParm);
      sqlite3VdbeAddOp(v, OP_Pop, nColumn, 0);
      /* The LIMIT clause will terminate the loop for us */
      break;
    }

    /* If this is a scalar select that is part of an expression, then
    ** store the results in the appropriate memory cell and break out
    ** of the scan loop.
    */
    case SRT_Mem: {
      assert( nColumn==1 );
      if( pOrderBy ){
        pushOntoSorter(pParse, pOrderBy, p);
      }else{
        sqlite3VdbeAddOp(v, OP_MemStore, iParm, 1);
        /* The LIMIT clause will jump out of the loop for us */
      }
      break;
    }
#endif /* #ifndef SQLITE_OMIT_SUBQUERY */

    /* Send the data to the callback function or to a subroutine.  In the
    ** case of a subroutine, the subroutine itself is responsible for
    ** popping the data from the stack.
    */
    case SRT_Subroutine:
    case SRT_Callback: {
      if( pOrderBy ){
        sqlite3VdbeAddOp(v, OP_MakeRecord, nColumn, 0);
        pushOntoSorter(pParse, pOrderBy, p);
      }else if( eDest==SRT_Subroutine ){
        sqlite3VdbeAddOp(v, OP_Gosub, 0, iParm);
      }else{
        sqlite3VdbeAddOp(v, OP_Callback, nColumn, 0);
      }
      break;
    }

#if !defined(SQLITE_OMIT_TRIGGER)
    /* Discard the results.  This is used for SELECT statements inside
    ** the body of a TRIGGER.  The purpose of such selects is to call
    ** user-defined functions that have side effects.  We do not care
    ** about the actual results of the select.
    */
    default: {
      assert( eDest==SRT_Discard );
      sqlite3VdbeAddOp(v, OP_Pop, nColumn, 0);
      break;
    }
#endif
  }

  /* Jump to the end of the loop if the LIMIT is reached.
  */
  if( p->iLimit>=0 && pOrderBy==0 ){
    sqlite3VdbeAddOp(v, OP_MemIncr, -1, p->iLimit);
    sqlite3VdbeAddOp(v, OP_IfMemZero, p->iLimit, iBreak);
  }
  return 0;
}

/*
** Given an expression list, generate a KeyInfo structure that records
** the collating sequence for each expression in that expression list.
**
** If the ExprList is an ORDER BY or GROUP BY clause then the resulting
** KeyInfo structure is appropriate for initializing a virtual index to
** implement that clause.  If the ExprList is the result set of a SELECT
** then the KeyInfo structure is appropriate for initializing a virtual
** index to implement a DISTINCT test.
**
** Space to hold the KeyInfo structure is obtain from malloc.  The calling
** function is responsible for seeing that this structure is eventually
** freed.  Add the KeyInfo structure to the P3 field of an opcode using
** P3_KEYINFO_HANDOFF is the usual way of dealing with this.
*/
static KeyInfo *keyInfoFromExprList(Parse *pParse, ExprList *pList){
  sqlite3 *db = pParse->db;
  int nExpr;
  KeyInfo *pInfo;
  struct ExprList_item *pItem;
  int i;

  nExpr = pList->nExpr;
  pInfo = sqliteMalloc( sizeof(*pInfo) + nExpr*(sizeof(CollSeq*)+1) );
  if( pInfo ){
    pInfo->aSortOrder = (u8*)&pInfo->aColl[nExpr];
    pInfo->nField = nExpr;
    pInfo->enc = ENC(db);
    for(i=0, pItem=pList->a; i<nExpr; i++, pItem++){
      CollSeq *pColl;
      pColl = sqlite3ExprCollSeq(pParse, pItem->pExpr);
      if( !pColl ){
        pColl = db->pDfltColl;
      }
      pInfo->aColl[i] = pColl;
      pInfo->aSortOrder[i] = pItem->sortOrder;
    }
  }
  return pInfo;
}


/*
** If the inner loop was generated using a non-null pOrderBy argument,
** then the results were placed in a sorter.  After the loop is terminated
** we need to run the sorter and output the results.  The following
** routine generates the code needed to do that.
*/
static void generateSortTail(
  Parse *pParse,   /* Parsing context */
  Select *p,       /* The SELECT statement */
  Vdbe *v,         /* Generate code into this VDBE */
  int nColumn,     /* Number of columns of data */
  int eDest,       /* Write the sorted results here */
  int iParm        /* Optional parameter associated with eDest */
){
  int brk = sqlite3VdbeMakeLabel(v);
  int cont = sqlite3VdbeMakeLabel(v);
  int addr;
  int iTab;
  int pseudoTab;
  ExprList *pOrderBy = p->pOrderBy;

  iTab = pOrderBy->iECursor;
  if( eDest==SRT_Callback || eDest==SRT_Subroutine ){
    pseudoTab = pParse->nTab++;
    sqlite3VdbeAddOp(v, OP_OpenPseudo, pseudoTab, 0);
    sqlite3VdbeAddOp(v, OP_SetNumColumns, pseudoTab, nColumn);
  }
  addr = 1 + sqlite3VdbeAddOp(v, OP_Sort, iTab, brk);
  codeOffset(v, p, cont, 0);
  if( eDest==SRT_Callback || eDest==SRT_Subroutine ){
    sqlite3VdbeAddOp(v, OP_Integer, 1, 0);
  }
  sqlite3VdbeAddOp(v, OP_Column, iTab, pOrderBy->nExpr + 1);
  switch( eDest ){
    case SRT_Table:
    case SRT_EphemTab: {
      sqlite3VdbeAddOp(v, OP_NewRowid, iParm, 0);
      sqlite3VdbeAddOp(v, OP_Pull, 1, 0);
      sqlite3VdbeAddOp(v, OP_Insert, iParm, 0);
      break;
    }
#ifndef SQLITE_OMIT_SUBQUERY
    case SRT_Set: {
      assert( nColumn==1 );
      sqlite3VdbeAddOp(v, OP_NotNull, -1, sqlite3VdbeCurrentAddr(v)+3);
      sqlite3VdbeAddOp(v, OP_Pop, 1, 0);
      sqlite3VdbeAddOp(v, OP_Goto, 0, sqlite3VdbeCurrentAddr(v)+3);
      sqlite3VdbeOp3(v, OP_MakeRecord, 1, 0, "c", P3_STATIC);
      sqlite3VdbeAddOp(v, OP_IdxInsert, (iParm&0x0000FFFF), 0);
      break;
    }
    case SRT_Mem: {
      assert( nColumn==1 );
      sqlite3VdbeAddOp(v, OP_MemStore, iParm, 1);
      /* The LIMIT clause will terminate the loop for us */
      break;
    }
#endif
    case SRT_Callback:
    case SRT_Subroutine: {
      int i;
      sqlite3VdbeAddOp(v, OP_Insert, pseudoTab, 0);
      for(i=0; i<nColumn; i++){
        sqlite3VdbeAddOp(v, OP_Column, pseudoTab, i);
      }
      if( eDest==SRT_Callback ){
        sqlite3VdbeAddOp(v, OP_Callback, nColumn, 0);
      }else{
        sqlite3VdbeAddOp(v, OP_Gosub, 0, iParm);
      }
      break;
    }
    default: {
      /* Do nothing */
      break;
    }
  }

  /* Jump to the end of the loop when the LIMIT is reached
  */
  if( p->iLimit>=0 ){
    sqlite3VdbeAddOp(v, OP_MemIncr, -1, p->iLimit);
    sqlite3VdbeAddOp(v, OP_IfMemZero, p->iLimit, brk);
  }

  /* The bottom of the loop
  */
  sqlite3VdbeResolveLabel(v, cont);
  sqlite3VdbeAddOp(v, OP_Next, iTab, addr);
  sqlite3VdbeResolveLabel(v, brk);
  if( eDest==SRT_Callback || eDest==SRT_Subroutine ){

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩午夜激情免费电影| 国产制服丝袜一区| 五月综合激情日本mⅴ| 蜜桃视频在线一区| 国产91丝袜在线播放九色| 成年人网站91| 欧美丝袜丝nylons| 精品欧美一区二区三区精品久久| 久久久久国产成人精品亚洲午夜| 中文字幕一区二区不卡| 亚洲一区在线看| 久久电影网电视剧免费观看| 大尺度一区二区| 在线亚洲一区观看| 日韩美女一区二区三区四区| 自拍偷拍亚洲激情| 日韩av网站免费在线| 国产suv一区二区三区88区| 99国产精品久| 日韩一级片网址| 国产精品久久久久久久久晋中 | 在线观看视频一区二区欧美日韩 | 国产综合色视频| 91免费看片在线观看| 综合婷婷亚洲小说| 奇米四色…亚洲| 成人av片在线观看| 欧美一级黄色片| 亚洲色图欧洲色图| 国内外精品视频| 欧美午夜精品久久久久久超碰| 久久亚区不卡日本| 亚洲一二三四久久| 国产a精品视频| 欧美一区二区三区四区久久| 国产精品欧美一区喷水| 日韩二区三区在线观看| 91猫先生在线| 久久精品在这里| 日韩电影免费在线| 91福利视频久久久久| 国产亚洲欧美在线| 日本vs亚洲vs韩国一区三区二区| 91美女精品福利| 中文字幕精品一区二区三区精品| 免费人成在线不卡| 欧美亚洲综合久久| 中文字幕亚洲区| 国产大陆精品国产| 日韩精品在线看片z| 亚洲自拍偷拍av| www.日韩精品| 国产欧美精品区一区二区三区| 免费观看30秒视频久久| 欧美日韩一级大片网址| 亚洲色图欧美在线| jvid福利写真一区二区三区| 久久久精品国产免大香伊| 精品综合久久久久久8888| 欧美精品粉嫩高潮一区二区| 亚洲国产裸拍裸体视频在线观看乱了 | 国产美女一区二区| 国产精品每日更新在线播放网址| 精品一区二区免费看| 日韩视频一区二区三区 | 欧美私模裸体表演在线观看| 亚洲欧美电影一区二区| 成人av动漫网站| 欧美国产欧美综合| 国产精品一区二区你懂的| 精品久久久久久最新网址| 蜜桃视频一区二区| 日韩欧美国产成人一区二区| 日本中文一区二区三区| 欧美福利视频导航| 日韩精品电影在线| 欧美一级二级在线观看| 日本欧美一区二区三区乱码| 91精品国产乱| 麻豆高清免费国产一区| 日韩美女视频在线| 国产一区二区三区久久久| 久久人人超碰精品| 国产激情视频一区二区三区欧美| 久久精品综合网| 成人av在线播放网址| 亚洲欧美综合在线精品| 色婷婷综合激情| 亚洲夂夂婷婷色拍ww47| 欧美日韩精品福利| 蜜桃传媒麻豆第一区在线观看| 精品美女一区二区| 国产成人精品www牛牛影视| 国产精品视频免费| 91女人视频在线观看| 亚洲bdsm女犯bdsm网站| 日韩亚洲国产中文字幕欧美| 极品销魂美女一区二区三区| 国产喷白浆一区二区三区| av不卡在线播放| 亚洲大片在线观看| 日韩欧美一区电影| 国产91精品一区二区麻豆亚洲| 国产精品久久久久7777按摩| 色偷偷一区二区三区| 午夜精品一区二区三区免费视频 | 亚洲国产精品久久一线不卡| 欧美一区二区三区视频在线观看| 国产一区日韩二区欧美三区| 国产精品无人区| 欧美色老头old∨ideo| 国内精品在线播放| 日韩毛片一二三区| 91精品久久久久久蜜臀| 国产精品一区二区三区四区| 亚洲精品成人悠悠色影视| 在线成人小视频| 粉嫩av一区二区三区在线播放| 亚洲激情成人在线| 精品乱人伦小说| 色综合激情久久| 久久精品国产一区二区三区免费看| 欧美国产乱子伦| 欧美人与禽zozo性伦| 国产精品77777| 亚洲福中文字幕伊人影院| 久久午夜国产精品| 欧美在线视频不卡| 国产精品自产自拍| 亚洲成av人片一区二区梦乃| 国产亚洲短视频| 欧美日韩国产欧美日美国产精品| 懂色av一区二区在线播放| 亚洲国产欧美日韩另类综合 | 激情久久五月天| 亚洲精品视频免费观看| www亚洲一区| 欧美撒尿777hd撒尿| 国产91精品一区二区麻豆亚洲| 日韩电影在线免费| 亚洲欧美偷拍三级| 久久青草国产手机看片福利盒子| 欧美亚日韩国产aⅴ精品中极品| 国产精品一区二区果冻传媒| 亚洲成a人片综合在线| 国产精品精品国产色婷婷| 欧美成人一区二区三区片免费| 欧美中文字幕久久| 欧美一二三四在线| 一本大道久久a久久综合婷婷| 国产麻豆精品在线观看| 五月激情综合色| 亚洲免费观看在线观看| 中文字幕电影一区| 欧美精品一区二区精品网| 欧美天天综合网| 99国产精品久| 成人h动漫精品| 国产一区二区美女诱惑| 青娱乐精品视频在线| 亚洲va天堂va国产va久| 亚洲天堂福利av| 欧美国产精品一区二区| 精品捆绑美女sm三区| 欧美丰满嫩嫩电影| 在线一区二区三区四区五区 | 欧美国产成人精品| 26uuu亚洲婷婷狠狠天堂| 7777精品伊人久久久大香线蕉经典版下载| 99天天综合性| 国产91高潮流白浆在线麻豆| 精品一区二区在线观看| 日韩中文字幕一区二区三区| 亚洲午夜在线观看视频在线| 一区二区三区日本| 亚洲美女屁股眼交| 亚洲女子a中天字幕| 亚洲精品免费在线播放| 亚洲乱码一区二区三区在线观看| 国产精品护士白丝一区av| 欧美国产综合色视频| 国产精品三级视频| 国产精品免费看片| 国产精品女同一区二区三区| 中文字幕的久久| 国产精品久久久久久久久果冻传媒 | 婷婷综合五月天| 三级影片在线观看欧美日韩一区二区 | 久久精品二区亚洲w码| 日本sm残虐另类| 蜜桃av一区二区| 久久99日本精品| 国产老肥熟一区二区三区| 国产精品一二三在| 丰满少妇在线播放bd日韩电影| 懂色av一区二区在线播放| 99r国产精品| 在线一区二区三区做爰视频网站| 精品视频色一区| 777久久久精品|