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

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

?? expr.c

?? sqlite 3.3.8 支持加密的版本
?? C
?? 第 1 頁 / 共 5 頁
字號:
        if( auth!=SQLITE_OK ){
          if( auth==SQLITE_DENY ){
            sqlite3ErrorMsg(pParse, "not authorized to use function: %s",
                                    pDef->zName);
            pNC->nErr++;
          }
          pExpr->op = TK_NULL;
          return 1;
        }
      }
#endif
      if( is_agg && !pNC->allowAgg ){
        sqlite3ErrorMsg(pParse, "misuse of aggregate function %.*s()", nId,zId);
        pNC->nErr++;
        is_agg = 0;
      }else if( no_such_func ){
        sqlite3ErrorMsg(pParse, "no such function: %.*s", nId, zId);
        pNC->nErr++;
      }else if( wrong_num_args ){
        sqlite3ErrorMsg(pParse,"wrong number of arguments to function %.*s()",
             nId, zId);
        pNC->nErr++;
      }
      if( is_agg ){
        pExpr->op = TK_AGG_FUNCTION;
        pNC->hasAgg = 1;
      }
      if( is_agg ) pNC->allowAgg = 0;
      for(i=0; pNC->nErr==0 && i<n; i++){
        walkExprTree(pList->a[i].pExpr, nameResolverStep, pNC);
      }
      if( is_agg ) pNC->allowAgg = 1;
      /* FIX ME:  Compute pExpr->affinity based on the expected return
      ** type of the function 
      */
      return is_agg;
    }
#ifndef SQLITE_OMIT_SUBQUERY
    case TK_SELECT:
    case TK_EXISTS:
#endif
    case TK_IN: {
      if( pExpr->pSelect ){
        int nRef = pNC->nRef;
#ifndef SQLITE_OMIT_CHECK
        if( pNC->isCheck ){
          sqlite3ErrorMsg(pParse,"subqueries prohibited in CHECK constraints");
        }
#endif
        sqlite3SelectResolve(pParse, pExpr->pSelect, pNC);
        assert( pNC->nRef>=nRef );
        if( nRef!=pNC->nRef ){
          ExprSetProperty(pExpr, EP_VarSelect);
        }
      }
      break;
    }
#ifndef SQLITE_OMIT_CHECK
    case TK_VARIABLE: {
      if( pNC->isCheck ){
        sqlite3ErrorMsg(pParse,"parameters prohibited in CHECK constraints");
      }
      break;
    }
#endif
  }
  return 0;
}

/*
** This routine walks an expression tree and resolves references to
** table columns.  Nodes of the form ID.ID or ID resolve into an
** index to the table in the table list and a column offset.  The 
** Expr.opcode for such nodes is changed to TK_COLUMN.  The Expr.iTable
** value is changed to the index of the referenced table in pTabList
** plus the "base" value.  The base value will ultimately become the
** VDBE cursor number for a cursor that is pointing into the referenced
** table.  The Expr.iColumn value is changed to the index of the column 
** of the referenced table.  The Expr.iColumn value for the special
** ROWID column is -1.  Any INTEGER PRIMARY KEY column is tried as an
** alias for ROWID.
**
** Also resolve function names and check the functions for proper
** usage.  Make sure all function names are recognized and all functions
** have the correct number of arguments.  Leave an error message
** in pParse->zErrMsg if anything is amiss.  Return the number of errors.
**
** If the expression contains aggregate functions then set the EP_Agg
** property on the expression.
*/
int sqlite3ExprResolveNames(
  NameContext *pNC,       /* Namespace to resolve expressions in. */
  Expr *pExpr             /* The expression to be analyzed. */
){
  int savedHasAgg;
  if( pExpr==0 ) return 0;
  savedHasAgg = pNC->hasAgg;
  pNC->hasAgg = 0;
  walkExprTree(pExpr, nameResolverStep, pNC);
  if( pNC->nErr>0 ){
    ExprSetProperty(pExpr, EP_Error);
  }
  if( pNC->hasAgg ){
    ExprSetProperty(pExpr, EP_Agg);
  }else if( savedHasAgg ){
    pNC->hasAgg = 1;
  }
  return ExprHasProperty(pExpr, EP_Error);
}

/*
** A pointer instance of this structure is used to pass information
** through walkExprTree into codeSubqueryStep().
*/
typedef struct QueryCoder QueryCoder;
struct QueryCoder {
  Parse *pParse;       /* The parsing context */
  NameContext *pNC;    /* Namespace of first enclosing query */
};


/*
** Generate code for scalar subqueries used as an expression
** and IN operators.  Examples:
**
**     (SELECT a FROM b)          -- subquery
**     EXISTS (SELECT a FROM b)   -- EXISTS subquery
**     x IN (4,5,11)              -- IN operator with list on right-hand side
**     x IN (SELECT a FROM b)     -- IN operator with subquery on the right
**
** The pExpr parameter describes the expression that contains the IN
** operator or subquery.
*/
#ifndef SQLITE_OMIT_SUBQUERY
void sqlite3CodeSubselect(Parse *pParse, Expr *pExpr){
  int testAddr = 0;                       /* One-time test address */
  Vdbe *v = sqlite3GetVdbe(pParse);
  if( v==0 ) return;

  /* This code must be run in its entirety every time it is encountered
  ** if any of the following is true:
  **
  **    *  The right-hand side is a correlated subquery
  **    *  The right-hand side is an expression list containing variables
  **    *  We are inside a trigger
  **
  ** If all of the above are false, then we can run this code just once
  ** save the results, and reuse the same result on subsequent invocations.
  */
  if( !ExprHasAnyProperty(pExpr, EP_VarSelect) && !pParse->trigStack ){
    int mem = pParse->nMem++;
    sqlite3VdbeAddOp(v, OP_MemLoad, mem, 0);
    testAddr = sqlite3VdbeAddOp(v, OP_If, 0, 0);
    assert( testAddr>0 || sqlite3MallocFailed() );
    sqlite3VdbeAddOp(v, OP_MemInt, 1, mem);
  }

  switch( pExpr->op ){
    case TK_IN: {
      char affinity;
      KeyInfo keyInfo;
      int addr;        /* Address of OP_OpenEphemeral instruction */

      affinity = sqlite3ExprAffinity(pExpr->pLeft);

      /* Whether this is an 'x IN(SELECT...)' or an 'x IN(<exprlist>)'
      ** expression it is handled the same way. A virtual table is 
      ** filled with single-field index keys representing the results
      ** from the SELECT or the <exprlist>.
      **
      ** If the 'x' expression is a column value, or the SELECT...
      ** statement returns a column value, then the affinity of that
      ** column is used to build the index keys. If both 'x' and the
      ** SELECT... statement are columns, then numeric affinity is used
      ** if either column has NUMERIC or INTEGER affinity. If neither
      ** 'x' nor the SELECT... statement are columns, then numeric affinity
      ** is used.
      */
      pExpr->iTable = pParse->nTab++;
      addr = sqlite3VdbeAddOp(v, OP_OpenEphemeral, pExpr->iTable, 0);
      memset(&keyInfo, 0, sizeof(keyInfo));
      keyInfo.nField = 1;
      sqlite3VdbeAddOp(v, OP_SetNumColumns, pExpr->iTable, 1);

      if( pExpr->pSelect ){
        /* Case 1:     expr IN (SELECT ...)
        **
        ** Generate code to write the results of the select into the temporary
        ** table allocated and opened above.
        */
        int iParm = pExpr->iTable +  (((int)affinity)<<16);
        ExprList *pEList;
        assert( (pExpr->iTable&0x0000FFFF)==pExpr->iTable );
        sqlite3Select(pParse, pExpr->pSelect, SRT_Set, iParm, 0, 0, 0, 0);
        pEList = pExpr->pSelect->pEList;
        if( pEList && pEList->nExpr>0 ){ 
          keyInfo.aColl[0] = binaryCompareCollSeq(pParse, pExpr->pLeft,
              pEList->a[0].pExpr);
        }
      }else if( pExpr->pList ){
        /* Case 2:     expr IN (exprlist)
        **
	** For each expression, build an index key from the evaluation and
        ** store it in the temporary table. If <expr> is a column, then use
        ** that columns affinity when building index keys. If <expr> is not
        ** a column, use numeric affinity.
        */
        int i;
        ExprList *pList = pExpr->pList;
        struct ExprList_item *pItem;

        if( !affinity ){
          affinity = SQLITE_AFF_NONE;
        }
        keyInfo.aColl[0] = pExpr->pLeft->pColl;

        /* Loop through each expression in <exprlist>. */
        for(i=pList->nExpr, pItem=pList->a; i>0; i--, pItem++){
          Expr *pE2 = pItem->pExpr;

          /* If the expression is not constant then we will need to
          ** disable the test that was generated above that makes sure
          ** this code only executes once.  Because for a non-constant
          ** expression we need to rerun this code each time.
          */
          if( testAddr>0 && !sqlite3ExprIsConstant(pE2) ){
            sqlite3VdbeChangeToNoop(v, testAddr-1, 3);
            testAddr = 0;
          }

          /* Evaluate the expression and insert it into the temp table */
          sqlite3ExprCode(pParse, pE2);
          sqlite3VdbeOp3(v, OP_MakeRecord, 1, 0, &affinity, 1);
          sqlite3VdbeAddOp(v, OP_IdxInsert, pExpr->iTable, 0);
        }
      }
      sqlite3VdbeChangeP3(v, addr, (void *)&keyInfo, P3_KEYINFO);
      break;
    }

    case TK_EXISTS:
    case TK_SELECT: {
      /* This has to be a scalar SELECT.  Generate code to put the
      ** value of this select in a memory cell and record the number
      ** of the memory cell in iColumn.
      */
      static const Token one = { (u8*)"1", 0, 1 };
      Select *pSel;
      int iMem;
      int sop;

      pExpr->iColumn = iMem = pParse->nMem++;
      pSel = pExpr->pSelect;
      if( pExpr->op==TK_SELECT ){
        sop = SRT_Mem;
        sqlite3VdbeAddOp(v, OP_MemNull, iMem, 0);
        VdbeComment((v, "# Init subquery result"));
      }else{
        sop = SRT_Exists;
        sqlite3VdbeAddOp(v, OP_MemInt, 0, iMem);
        VdbeComment((v, "# Init EXISTS result"));
      }
      sqlite3ExprDelete(pSel->pLimit);
      pSel->pLimit = sqlite3Expr(TK_INTEGER, 0, 0, &one);
      sqlite3Select(pParse, pSel, sop, iMem, 0, 0, 0, 0);
      break;
    }
  }

  if( testAddr ){
    sqlite3VdbeJumpHere(v, testAddr);
  }
  return;
}
#endif /* SQLITE_OMIT_SUBQUERY */

/*
** Generate an instruction that will put the integer describe by
** text z[0..n-1] on the stack.
*/
static void codeInteger(Vdbe *v, const char *z, int n){
  int i;
  if( sqlite3GetInt32(z, &i) ){
    sqlite3VdbeAddOp(v, OP_Integer, i, 0);
  }else if( sqlite3FitsIn64Bits(z) ){
    sqlite3VdbeOp3(v, OP_Int64, 0, 0, z, n);
  }else{
    sqlite3VdbeOp3(v, OP_Real, 0, 0, z, n);
  }
}

/*
** Generate code into the current Vdbe to evaluate the given
** expression and leave the result on the top of stack.
**
** This code depends on the fact that certain token values (ex: TK_EQ)
** are the same as opcode values (ex: OP_Eq) that implement the corresponding
** operation.  Special comments in vdbe.c and the mkopcodeh.awk script in
** the make process cause these values to align.  Assert()s in the code
** below verify that the numbers are aligned correctly.
*/
void sqlite3ExprCode(Parse *pParse, Expr *pExpr){
  Vdbe *v = pParse->pVdbe;
  int op;
  int stackChng = 1;    /* Amount of change to stack depth */

  if( v==0 ) return;
  if( pExpr==0 ){
    sqlite3VdbeAddOp(v, OP_Null, 0, 0);
    return;
  }
  op = pExpr->op;
  switch( op ){
    case TK_AGG_COLUMN: {
      AggInfo *pAggInfo = pExpr->pAggInfo;
      struct AggInfo_col *pCol = &pAggInfo->aCol[pExpr->iAgg];
      if( !pAggInfo->directMode ){
        sqlite3VdbeAddOp(v, OP_MemLoad, pCol->iMem, 0);
        break;
      }else if( pAggInfo->useSortingIdx ){
        sqlite3VdbeAddOp(v, OP_Column, pAggInfo->sortingIdx,
                              pCol->iSorterColumn);
        break;
      }
      /* Otherwise, fall thru into the TK_COLUMN case */
    }
    case TK_COLUMN: {
      if( pExpr->iTable<0 ){
        /* This only happens when coding check constraints */
        assert( pParse->ckOffset>0 );
        sqlite3VdbeAddOp(v, OP_Dup, pParse->ckOffset-pExpr->iColumn-1, 1);
      }else if( pExpr->iColumn>=0 ){
        Table *pTab = pExpr->pTab;
        int iCol = pExpr->iColumn;
        int op = (pTab && IsVirtual(pTab)) ? OP_VColumn : OP_Column;
        sqlite3VdbeAddOp(v, op, pExpr->iTable, iCol);
        sqlite3ColumnDefault(v, pTab, iCol);
#ifndef SQLITE_OMIT_FLOATING_POINT
        if( pTab && pTab->aCol[iCol].affinity==SQLITE_AFF_REAL ){
          sqlite3VdbeAddOp(v, OP_RealAffinity, 0, 0);
        }
#endif
      }else{
        Table *pTab = pExpr->pTab;
        int op = (pTab && IsVirtual(pTab)) ? OP_VRowid : OP_Rowid;
        sqlite3VdbeAddOp(v, op, pExpr->iTable, 0);
      }
      break;
    }
    case TK_INTEGER: {
      codeInteger(v, (char*)pExpr->token.z, pExpr->token.n);
      break;
    }
    case TK_FLOAT:
    case TK_STRING: {
      assert( TK_FLOAT==OP_Real );
      assert( TK_STRING==OP_String8 );
      sqlite3DequoteExpr(pExpr);
      sqlite3VdbeOp3(v, op, 0, 0, (char*)pExpr->token.z, pExpr->token.n);
      break;
    }
    case TK_NULL: {
      sqlite3VdbeAddOp(v, OP_Null, 0, 0);
      break;
    }
#ifndef SQLITE_OMIT_BLOB_LITERAL
    case TK_BLOB: {
      int n;
      const char *z;
      assert( TK_BLOB==OP_HexBlob );
      n = pExpr->token.n - 3;
      z = (char*)pExpr->token.z + 2;
      assert( n>=0 );
      if( n==0 ){
        z = "";
      }
      sqlite3VdbeOp3(v, op, 0, 0, z, n);
      break;
    }
#endif
    case TK_VARIABLE: {
      sqlite3VdbeAddOp(v, OP_Variable, pExpr->iTable, 0);
      if( pExpr->token.n>1 ){
        sqlite3VdbeChangeP3(v, -1, (char*)pExpr->token.z, pExpr->token.n);
      }
      break;
    }
    case TK_REGISTER: {
      sqlite3VdbeAddOp(v, OP_MemLoad, pExpr->iTable, 0);
      break;
    }
#ifndef SQLITE_OMIT_CAST
    case TK_CAST: {
      /* Expressions of the form:   CAST(pLeft AS token) */
      int aff, to_op;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本午夜精品一区二区三区电影| 99re在线视频这里只有精品| 日韩一区精品视频| 国产乱对白刺激视频不卡| 成人福利在线看| 这里是久久伊人| 91精品黄色片免费大全| 五月综合激情日本mⅴ| 国产一区二区在线观看视频| 色偷偷一区二区三区| 欧美日韩一区小说| 久久久精品综合| 综合电影一区二区三区| 午夜电影一区二区| 欧美成人综合网站| 亚洲欧美一区二区久久| 免费成人结看片| 欧美性大战xxxxx久久久| 国产精品人人做人人爽人人添| 五月综合激情日本mⅴ| 精品国产一区二区三区不卡| 丝袜脚交一区二区| 欧美成人女星排名| 色综合中文字幕国产 | 激情小说亚洲一区| 色偷偷成人一区二区三区91| 亚洲精品免费在线| 成人动漫av在线| 亚洲图片有声小说| 国产69精品久久777的优势| 日韩精品一区二区三区视频播放 | 久久五月婷婷丁香社区| 亚洲色图制服丝袜| 日韩免费视频线观看| 成人精品一区二区三区四区| 精品久久久久久久久久久久久久久久久| 国产精品亚洲一区二区三区在线 | 五月激情综合婷婷| 国产欧美日韩综合精品一区二区| 国产一区二区成人久久免费影院| 亚洲精品va在线观看| 欧美精品一区二区三区高清aⅴ | 综合久久国产九一剧情麻豆| 欧美一区二区三区免费观看视频 | 久久亚洲精精品中文字幕早川悠里 | 国产精品久久影院| 国产99久久久国产精品潘金 | 成人午夜电影久久影院| 日韩精彩视频在线观看| 亚洲一区二区三区四区在线| youjizz久久| 亚洲免费av高清| 欧美不卡一区二区三区四区| 欧美私模裸体表演在线观看| 丁香婷婷综合激情五月色| 午夜精品久久久久影视| 中文字幕欧美一| 欧美性做爰猛烈叫床潮| 成人午夜视频免费看| 蜜桃在线一区二区三区| 精品美女一区二区| 欧美嫩在线观看| 精品无码三级在线观看视频| 久久综合成人精品亚洲另类欧美| 欧美亚洲愉拍一区二区| 色婷婷综合在线| 成人黄色777网| 国产91色综合久久免费分享| 国产一区二区按摩在线观看| 久久se精品一区精品二区| 国产精品成人一区二区三区夜夜夜| 日韩欧美一区中文| 成人av在线观| 国产成人免费视频网站高清观看视频| 日韩伦理免费电影| 欧美激情在线一区二区| 在线观看国产91| 激情图区综合网| 麻豆久久一区二区| 美女高潮久久久| 美女网站一区二区| 六月婷婷色综合| 九色综合狠狠综合久久| 国产一区二区三区香蕉| 国产精品夜夜嗨| www.成人在线| 91精品1区2区| 国产伦理精品不卡| 东方欧美亚洲色图在线| 成人国产精品免费网站| 91理论电影在线观看| 看国产成人h片视频| 精品亚洲aⅴ乱码一区二区三区| 奇米777欧美一区二区| 久久国产精品露脸对白| 国产最新精品精品你懂的| 国产成人99久久亚洲综合精品| 国产精品自产自拍| 色天使久久综合网天天| 欧美在线免费视屏| 69p69国产精品| 久久久久国产精品麻豆ai换脸| 亚洲欧洲色图综合| 亚洲一区二区三区精品在线| 美女一区二区三区| 成人高清视频在线观看| 欧美伊人精品成人久久综合97 | 韩国v欧美v日本v亚洲v| 粉嫩aⅴ一区二区三区四区五区| 91浏览器入口在线观看| 欧美精品xxxxbbbb| 在线观看av一区二区| 日韩一卡二卡三卡国产欧美| 久久久精品日韩欧美| 亚洲一区二区三区四区五区黄| 麻豆国产欧美一区二区三区| 成人av电影在线| 91精品国产综合久久久久久漫画| 久久久久久久久岛国免费| 一区二区三区日韩欧美精品| 亚洲视频一二区| 美女视频黄免费的久久 | 91免费版在线看| 欧美一区二区高清| 国产精品女主播av| 日韩高清不卡在线| 91麻豆高清视频| 精品国产一区二区三区四区四 | 亚洲福中文字幕伊人影院| 国模娜娜一区二区三区| 欧美色老头old∨ideo| 欧美国产精品久久| 青青草91视频| 91黄色小视频| 国产无一区二区| 国产精品午夜在线| 免费看欧美女人艹b| av一区二区三区在线| 精品国产欧美一区二区| 午夜国产精品一区| 91国产精品成人| 国产精品对白交换视频| 国产一区91精品张津瑜| 欧美一级艳片视频免费观看| 亚洲精品乱码久久久久久日本蜜臀| 黑人巨大精品欧美黑白配亚洲| 欧美午夜片在线观看| 国产精品传媒视频| 国产成人av在线影院| 精品国产在天天线2019| 男男成人高潮片免费网站| 精品视频一区 二区 三区| 中文字幕一区二区日韩精品绯色| 国产在线精品一区在线观看麻豆| 欧美猛男男办公室激情| 中文字幕字幕中文在线中不卡视频| 国产成人av电影在线| 久久免费电影网| 国产在线精品一区二区夜色| 欧美一区二区三区的| 日韩在线观看一区二区| 欧美日本一区二区三区四区| 一区二区三区国产豹纹内裤在线| 99re8在线精品视频免费播放| 欧美激情一区三区| 国产成人精品在线看| 欧美国产精品v| 成人高清伦理免费影院在线观看| 国产欧美精品一区二区色综合朱莉| 久久99精品视频| 精品久久人人做人人爱| 韩国欧美一区二区| 国产喂奶挤奶一区二区三区| 粉嫩嫩av羞羞动漫久久久| 中文字幕精品综合| 播五月开心婷婷综合| 亚洲图片你懂的| 在线精品视频免费播放| 亚洲综合丝袜美腿| 欧美二区乱c少妇| 日本不卡一二三区黄网| 精品少妇一区二区三区免费观看| 精品一区二区精品| 亚洲宅男天堂在线观看无病毒| 91福利在线看| 日韩中文字幕麻豆| 久久青草国产手机看片福利盒子 | 亚洲欧美区自拍先锋| 91福利社在线观看| 日韩精品一级中文字幕精品视频免费观看 | 精品国产乱码久久久久久图片| 国产精品69毛片高清亚洲| 国产精品第一页第二页第三页| 在线看日韩精品电影| 午夜精品久久久久久久久久| 久久嫩草精品久久久精品| 99久久精品国产精品久久| 亚洲午夜精品17c| 欧美精品一区在线观看| a4yy欧美一区二区三区|