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

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

?? select.c

?? 新版輕量級嵌入式數據庫
?? C
?? 第 1 頁 / 共 5 頁
字號:
      assert( pFrom->pSelect!=0 );      if( pFrom->zAlias==0 ){        pFrom->zAlias =          sqlite3MPrintf("sqlite_subquery_%p_", (void*)pFrom->pSelect);      }      assert( pFrom->pTab==0 );      pFrom->pTab = pTab =         sqlite3ResultSetOfSelect(pParse, pFrom->zAlias, pFrom->pSelect);      if( pTab==0 ){        return 1;      }      /* The isTransient flag indicates that the Table structure has been      ** dynamically allocated and may be freed at any time.  In other words,      ** pTab is not pointing to a persistent table structure that defines      ** part of the schema. */      pTab->isTransient = 1;#endif    }else{      /* An ordinary table or view name in the FROM clause */      assert( pFrom->pTab==0 );      pFrom->pTab = pTab =         sqlite3LocateTable(pParse,pFrom->zName,pFrom->zDatabase);      if( pTab==0 ){        return 1;      }      pTab->nRef++;#ifndef SQLITE_OMIT_VIEW      if( pTab->pSelect ){        /* We reach here if the named table is a really a view */        if( sqlite3ViewGetColumnNames(pParse, pTab) ){          return 1;        }        /* If pFrom->pSelect!=0 it means we are dealing with a        ** view within a view.  The SELECT structure has already been        ** copied by the outer view so we can skip the copy step here        ** in the inner view.        */        if( pFrom->pSelect==0 ){          pFrom->pSelect = sqlite3SelectDup(pTab->pSelect);        }      }#endif    }  }  /* Process NATURAL keywords, and ON and USING clauses of joins.  */  if( sqliteProcessJoin(pParse, p) ) return 1;  /* For every "*" that occurs in the column list, insert the names of  ** all columns in all tables.  And for every TABLE.* insert the names  ** of all columns in TABLE.  The parser inserted a special expression  ** with the TK_ALL operator for each "*" that it found in the column list.  ** The following code just has to locate the TK_ALL expressions and expand  ** each one to the list of all columns in all tables.  **  ** The first loop just checks to see if there are any "*" operators  ** that need expanding.  */  for(k=0; k<pEList->nExpr; k++){    Expr *pE = pEList->a[k].pExpr;    if( pE->op==TK_ALL ) break;    if( pE->op==TK_DOT && pE->pRight && pE->pRight->op==TK_ALL         && pE->pLeft && pE->pLeft->op==TK_ID ) break;  }  rc = 0;  if( k<pEList->nExpr ){    /*    ** If we get here it means the result set contains one or more "*"    ** operators that need to be expanded.  Loop through each expression    ** in the result set and expand them one by one.    */    struct ExprList_item *a = pEList->a;    ExprList *pNew = 0;    int flags = pParse->db->flags;    int longNames = (flags & SQLITE_FullColNames)!=0 &&                      (flags & SQLITE_ShortColNames)==0;    for(k=0; k<pEList->nExpr; k++){      Expr *pE = a[k].pExpr;      if( pE->op!=TK_ALL &&           (pE->op!=TK_DOT || pE->pRight==0 || pE->pRight->op!=TK_ALL) ){        /* This particular expression does not need to be expanded.        */        pNew = sqlite3ExprListAppend(pNew, a[k].pExpr, 0);        if( pNew ){          pNew->a[pNew->nExpr-1].zName = a[k].zName;        }else{          rc = 1;        }        a[k].pExpr = 0;        a[k].zName = 0;      }else{        /* This expression is a "*" or a "TABLE.*" and needs to be        ** expanded. */        int tableSeen = 0;      /* Set to 1 when TABLE matches */        char *zTName;            /* text of name of TABLE */        if( pE->op==TK_DOT && pE->pLeft ){          zTName = sqlite3NameFromToken(&pE->pLeft->token);        }else{          zTName = 0;        }        for(i=0, pFrom=pTabList->a; i<pTabList->nSrc; i++, pFrom++){          Table *pTab = pFrom->pTab;          char *zTabName = pFrom->zAlias;          if( zTabName==0 || zTabName[0]==0 ){             zTabName = pTab->zName;          }          if( zTName && (zTabName==0 || zTabName[0]==0 ||                  sqlite3StrICmp(zTName, zTabName)!=0) ){            continue;          }          tableSeen = 1;          for(j=0; j<pTab->nCol; j++){            Expr *pExpr, *pRight;            char *zName = pTab->aCol[j].zName;            if( i>0 ){              struct SrcList_item *pLeft = &pTabList->a[i-1];              if( (pLeft->jointype & JT_NATURAL)!=0 &&                        columnIndex(pLeft->pTab, zName)>=0 ){                /* In a NATURAL join, omit the join columns from the                 ** table on the right */                continue;              }              if( sqlite3IdListIndex(pLeft->pUsing, zName)>=0 ){                /* In a join with a USING clause, omit columns in the                ** using clause from the table on the right. */                continue;              }            }            pRight = sqlite3Expr(TK_ID, 0, 0, 0);            if( pRight==0 ) break;            setToken(&pRight->token, zName);            if( zTabName && (longNames || pTabList->nSrc>1) ){              Expr *pLeft = sqlite3Expr(TK_ID, 0, 0, 0);              pExpr = sqlite3Expr(TK_DOT, pLeft, pRight, 0);              if( pExpr==0 ) break;              setToken(&pLeft->token, zTabName);              setToken(&pExpr->span, sqlite3MPrintf("%s.%s", zTabName, zName));              pExpr->span.dyn = 1;              pExpr->token.z = 0;              pExpr->token.n = 0;              pExpr->token.dyn = 0;            }else{              pExpr = pRight;              pExpr->span = pExpr->token;            }            if( longNames ){              pNew = sqlite3ExprListAppend(pNew, pExpr, &pExpr->span);            }else{              pNew = sqlite3ExprListAppend(pNew, pExpr, &pRight->token);            }          }        }        if( !tableSeen ){          if( zTName ){            sqlite3ErrorMsg(pParse, "no such table: %s", zTName);          }else{            sqlite3ErrorMsg(pParse, "no tables specified");          }          rc = 1;        }        sqliteFree(zTName);      }    }    sqlite3ExprListDelete(pEList);    p->pEList = pNew;  }  return rc;}#ifndef SQLITE_OMIT_COMPOUND_SELECT/*** This routine associates entries in an ORDER BY expression list with** columns in a result.  For each ORDER BY expression, the opcode of** the top-level node is changed to TK_COLUMN and the iColumn value of** the top-level node is filled in with column number and the iTable** value of the top-level node is filled with iTable parameter.**** If there are prior SELECT clauses, they are processed first.  A match** in an earlier SELECT takes precedence over a later SELECT.**** Any entry that does not match is flagged as an error.  The number** of errors is returned.*/static int matchOrderbyToColumn(  Parse *pParse,          /* A place to leave error messages */  Select *pSelect,        /* Match to result columns of this SELECT */  ExprList *pOrderBy,     /* The ORDER BY values to match against columns */  int iTable,             /* Insert this value in iTable */  int mustComplete        /* If TRUE all ORDER BYs must match */){  int nErr = 0;  int i, j;  ExprList *pEList;  if( pSelect==0 || pOrderBy==0 ) return 1;  if( mustComplete ){    for(i=0; i<pOrderBy->nExpr; i++){ pOrderBy->a[i].done = 0; }  }  if( prepSelectStmt(pParse, pSelect) ){    return 1;  }  if( pSelect->pPrior ){    if( matchOrderbyToColumn(pParse, pSelect->pPrior, pOrderBy, iTable, 0) ){      return 1;    }  }  pEList = pSelect->pEList;  for(i=0; i<pOrderBy->nExpr; i++){    Expr *pE = pOrderBy->a[i].pExpr;    int iCol = -1;    if( pOrderBy->a[i].done ) continue;    if( sqlite3ExprIsInteger(pE, &iCol) ){      if( iCol<=0 || iCol>pEList->nExpr ){        sqlite3ErrorMsg(pParse,          "ORDER BY position %d should be between 1 and %d",          iCol, pEList->nExpr);        nErr++;        break;      }      if( !mustComplete ) continue;      iCol--;    }    for(j=0; iCol<0 && j<pEList->nExpr; j++){      if( pEList->a[j].zName && (pE->op==TK_ID || pE->op==TK_STRING) ){        char *zName, *zLabel;        zName = pEList->a[j].zName;        zLabel = sqlite3NameFromToken(&pE->token);        assert( zLabel!=0 );        if( sqlite3StrICmp(zName, zLabel)==0 ){           iCol = j;        }        sqliteFree(zLabel);      }      if( iCol<0 && sqlite3ExprCompare(pE, pEList->a[j].pExpr) ){        iCol = j;      }    }    if( iCol>=0 ){      pE->op = TK_COLUMN;      pE->iColumn = iCol;      pE->iTable = iTable;      pE->iAgg = -1;      pOrderBy->a[i].done = 1;    }    if( iCol<0 && mustComplete ){      sqlite3ErrorMsg(pParse,        "ORDER BY term number %d does not match any result column", i+1);      nErr++;      break;    }  }  return nErr;  }#endif /* #ifndef SQLITE_OMIT_COMPOUND_SELECT *//*** Get a VDBE for the given parser context.  Create a new one if necessary.** If an error occurs, return NULL and leave a message in pParse.*/Vdbe *sqlite3GetVdbe(Parse *pParse){  Vdbe *v = pParse->pVdbe;  if( v==0 ){    v = pParse->pVdbe = sqlite3VdbeCreate(pParse->db);  }  return v;}/*** Compute the iLimit and iOffset fields of the SELECT based on the** pLimit and pOffset expressions.  pLimit and pOffset hold the expressions** that appear in the original SQL statement after the LIMIT and OFFSET** keywords.  Or NULL if those keywords are omitted. iLimit and iOffset ** are the integer memory register numbers for counters used to compute ** the limit and offset.  If there is no limit and/or offset, then ** iLimit and iOffset are negative.**** This routine changes the values of iLimit and iOffset only if** a limit or offset is defined by pLimit and pOffset.  iLimit and** iOffset should have been preset to appropriate default values** (usually but not always -1) prior to calling this routine.** Only if pLimit!=0 or pOffset!=0 do the limit registers get** redefined.  The UNION ALL operator uses this property to force** the reuse of the same limit and offset registers across multiple** SELECT statements.*/static void computeLimitRegisters(Parse *pParse, Select *p, int iBreak){  Vdbe *v = 0;  int iLimit = 0;  int iOffset;  int addr1, addr2;  /*   ** "LIMIT -1" always shows all rows.  There is some  ** contraversy about what the correct behavior should be.  ** The current implementation interprets "LIMIT 0" to mean  ** no rows.  */  if( p->pLimit ){    p->iLimit = iLimit = pParse->nMem;    pParse->nMem += 2;    v = sqlite3GetVdbe(pParse);    if( v==0 ) return;    sqlite3ExprCode(pParse, p->pLimit);    sqlite3VdbeAddOp(v, OP_MustBeInt, 0, 0);    sqlite3VdbeAddOp(v, OP_MemStore, iLimit, 0);    VdbeComment((v, "# LIMIT counter"));    sqlite3VdbeAddOp(v, OP_IfMemZero, iLimit, iBreak);  }  if( p->pOffset ){    p->iOffset = iOffset = pParse->nMem++;    v = sqlite3GetVdbe(pParse);    if( v==0 ) return;    sqlite3ExprCode(pParse, p->pOffset);    sqlite3VdbeAddOp(v, OP_MustBeInt, 0, 0);    sqlite3VdbeAddOp(v, OP_MemStore, iOffset, p->pLimit==0);    VdbeComment((v, "# OFFSET counter"));    addr1 = sqlite3VdbeAddOp(v, OP_IfMemPos, iOffset, 0);    sqlite3VdbeAddOp(v, OP_Pop, 1, 0);    sqlite3VdbeAddOp(v, OP_Integer, 0, 0);    sqlite3VdbeJumpHere(v, addr1);    if( p->pLimit ){      sqlite3VdbeAddOp(v, OP_Add, 0, 0);    }  }  if( p->pLimit ){    addr1 = sqlite3VdbeAddOp(v, OP_IfMemPos, iLimit, 0);    sqlite3VdbeAddOp(v, OP_Pop, 1, 0);    sqlite3VdbeAddOp(v, OP_MemInt, -1, iLimit+1);    addr2 = sqlite3VdbeAddOp(v, OP_Goto, 0, 0);    sqlite3VdbeJumpHere(v, addr1);    sqlite3VdbeAddOp(v, OP_MemStore, iLimit+1, 1);    VdbeComment((v, "# LIMIT+OFFSET"));    sqlite3VdbeJumpHere(v, addr2);  }}/*** Allocate a virtual index to use for sorting.*/static void createSortingIndex(Parse *pParse, Select *p, ExprList *pOrderBy){  if( pOrderBy ){    int addr;    assert( pOrderBy->iECursor==0 );    pOrderBy->iECursor = pParse->nTab++;    addr = sqlite3VdbeAddOp(pParse->pVdbe, OP_OpenVirtual,                            pOrderBy->iECursor, pOrderBy->nExpr+1);    assert( p->addrOpenVirt[2] == -1 );    p->addrOpenVirt[2] = addr;  }}#ifndef SQLITE_OMIT_COMPOUND_SELECT/*** Return the appropriate collating sequence for the iCol-th column of** the result set for the compound-select statement "p".  Return NULL if** the column has no default collating sequence.**** The collating sequence for the compound select is taken from the** left-most term of the select that has a collating sequence.*/static CollSeq *multiSelectCollSeq(Parse *pParse, Select *p, int iCol){  CollSeq *pRet;  if( p->pPrior ){    pRet = multiSelectCollSeq(pParse, p->pPrior, iCol);  }else{    pRet = 0;  }  if( pRet==0 ){    pRet = sqlite3ExprCollSeq(pParse, p->pEList->a[iCol].pExpr);  }  return pRet;}#endif /* SQLITE_OMIT_COMPOUND_SELECT */#ifndef SQLITE_OMIT_COMPOUND_SELECT/*** This routine is called to process a query that is really the union** or intersection of two or more separate queries.**** "p" points to the right-most of the two queries.  the query on the** left is p->pPrior.  The left query could also be a compound query** in which case this routine will be called recursively. **** The results of the total query are to be written into a destination** of type eDest with parameter iParm.**** Example 1:  Consider a three-way compound SQL statement.****     SELECT a FROM t1 UNION SELECT b FROM t2 UNION SELECT c FROM t3**** This statement is parsed up as follows:****     SELECT c FROM t3

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜精品一区二区三区电影天堂 | av一二三不卡影片| 蜜乳av一区二区| 亚洲一区二区三区四区的| 国产亚洲精品超碰| 国产视频911| 久久精品亚洲乱码伦伦中文 | 国产乱人伦偷精品视频不卡 | 2020国产精品久久精品美国| 欧美福利视频导航| 欧美日韩精品一二三区| 欧美日韩一卡二卡| 欧美精品丝袜久久久中文字幕| 色8久久人人97超碰香蕉987| 欧美在线啊v一区| 色播五月激情综合网| 色综合天天综合网天天狠天天| 不卡av免费在线观看| 91麻豆福利精品推荐| 欧美网站大全在线观看| 欧美日韩激情一区二区三区| 欧美日韩在线观看一区二区| 91精品啪在线观看国产60岁| 日韩亚洲电影在线| 久久综合给合久久狠狠狠97色69| 国产亚洲人成网站| 一区二区三区在线免费播放| 三级影片在线观看欧美日韩一区二区 | 亚洲网友自拍偷拍| 日韩成人一区二区三区在线观看| 久久99精品久久久| 国产69精品久久99不卡| 色哟哟一区二区在线观看| 欧美午夜精品免费| 亚洲精品一区二区三区四区高清| 中文字幕一区二区三区四区| 一区二区三区四区在线| 麻豆精品一区二区综合av| 成人福利视频在线| 欧美日韩精品是欧美日韩精品| 2020国产精品自拍| 洋洋成人永久网站入口| 美女脱光内衣内裤视频久久影院| 国产99久久久久| 欧美写真视频网站| 久久久久综合网| 亚洲一区在线播放| 国产999精品久久久久久绿帽| 91国模大尺度私拍在线视频| 精品少妇一区二区三区视频免付费| 欧美激情资源网| 日韩激情av在线| 91在线免费播放| 亚洲精品在线网站| 午夜免费久久看| 99久久精品一区二区| 欧美大片免费久久精品三p| 亚洲伦理在线精品| 国产a久久麻豆| 欧美一级日韩一级| 亚洲愉拍自拍另类高清精品| 成人网男人的天堂| 欧美mv日韩mv亚洲| 日韩福利视频网| 91丨九色丨国产丨porny| 国产女主播在线一区二区| 石原莉奈在线亚洲三区| 一本大道久久a久久综合婷婷| 国产日韩欧美高清在线| 免费在线欧美视频| 欧美疯狂做受xxxx富婆| 亚洲男人天堂av网| a级高清视频欧美日韩| 欧美激情一区不卡| 国产一区二区三区在线观看免费 | 91在线免费视频观看| 久久蜜桃av一区二区天堂| 美女视频一区在线观看| 欧美精选一区二区| 亚洲国产精品久久久久秋霞影院| 成人高清免费观看| 国产午夜亚洲精品理论片色戒| 日本人妖一区二区| 91精品麻豆日日躁夜夜躁| 视频一区二区三区在线| 日本精品一区二区三区四区的功能| 欧美激情一区三区| 亚洲色图20p| 亚洲欧洲性图库| 日本精品一区二区三区四区的功能| 欧美三区免费完整视频在线观看| 精品久久国产老人久久综合| 日韩综合在线视频| 欧美一区二区在线观看| 日韩精品免费视频人成| xfplay精品久久| 国模无码大尺度一区二区三区| 精品美女被调教视频大全网站| 激情五月激情综合网| 久久嫩草精品久久久久| 99久久婷婷国产综合精品| 中文字幕一区二区日韩精品绯色| 99在线精品视频| 亚洲动漫第一页| 日韩欧美一区在线| 国产精品夜夜嗨| 色av综合在线| 6080国产精品一区二区| 亚洲天堂2014| 一本大道综合伊人精品热热| 一区二区三区资源| 欧美视频日韩视频| 午夜电影一区二区三区| 欧美一a一片一级一片| 亚洲gay无套男同| 欧美精选一区二区| 极品美女销魂一区二区三区免费 | 精品国产123| 国产白丝精品91爽爽久久| 精品国产乱码久久久久久夜甘婷婷 | 91精选在线观看| 国产精品白丝jk白祙喷水网站| 欧美国产日韩一二三区| 4hu四虎永久在线影院成人| 久久er99热精品一区二区| 国产精品电影一区二区| 91精品在线麻豆| 91网站在线观看视频| 亚洲成人一区在线| 中文字幕亚洲精品在线观看| 欧美日韩综合色| 波多野结衣中文字幕一区 | 99热99精品| 亚洲三级在线免费观看| 日韩一区二区三区视频在线| 青青青爽久久午夜综合久久午夜| 久久久一区二区| 制服视频三区第一页精品| 国产成人精品影院| 美女网站色91| 亚洲综合精品久久| 国产欧美综合在线观看第十页| 3atv在线一区二区三区| 99精品视频在线免费观看| 精品一区二区免费在线观看| 亚洲欧洲制服丝袜| 欧美一区二区大片| 欧美精选一区二区| 色八戒一区二区三区| 国产成人精品免费网站| 亚洲大片一区二区三区| 中文字幕一区二区三区不卡在线| 日韩精品一区二区三区老鸭窝| 欧洲av在线精品| 成人福利视频网站| 国产福利一区在线| 午夜精品久久久久影视| 成人欧美一区二区三区视频网页 | gogogo免费视频观看亚洲一| 蜜桃久久久久久| 午夜欧美在线一二页| 亚洲欧美日韩在线| **网站欧美大片在线观看| 中文字幕免费不卡| 久久免费精品国产久精品久久久久| 7878成人国产在线观看| 91精品久久久久久蜜臀| 正在播放亚洲一区| 欧美精品v日韩精品v韩国精品v| 色婷婷av一区二区三区大白胸 | 麻豆久久久久久久| 日产国产高清一区二区三区| 亚洲国产日日夜夜| 亚洲一区二区在线视频| 亚洲一区二区三区四区中文字幕| 亚洲区小说区图片区qvod| 亚洲色图第一区| 亚洲欧美日韩小说| 丝袜美腿亚洲综合| 日本系列欧美系列| 男女激情视频一区| 激情六月婷婷久久| 天涯成人国产亚洲精品一区av| 奇米影视一区二区三区| 麻豆精品新av中文字幕| 国产精品主播直播| 丰满白嫩尤物一区二区| 在线亚洲人成电影网站色www| 欧美性猛交一区二区三区精品 | 婷婷国产在线综合| 日本aⅴ亚洲精品中文乱码| 美女一区二区三区| 国产美女视频91| 99国产精品久| 欧美精品一区二区在线播放| 国产日产欧产精品推荐色| 亚洲线精品一区二区三区八戒| 久久精品一区蜜桃臀影院| 亚洲综合999| 国产精品2024|