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

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

?? vdbe.c

?? sqlite 3.3.8 支持加密的版本
?? C
?? 第 1 頁 / 共 5 頁
字號:
/*
** 2001 September 15
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** The code in this file implements execution method of the 
** Virtual Database Engine (VDBE).  A separate file ("vdbeaux.c")
** handles housekeeping details such as creating and deleting
** VDBE instances.  This file is solely interested in executing
** the VDBE program.
**
** In the external interface, an "sqlite3_stmt*" is an opaque pointer
** to a VDBE.
**
** The SQL parser generates a program which is then executed by
** the VDBE to do the work of the SQL statement.  VDBE programs are 
** similar in form to assembly language.  The program consists of
** a linear sequence of operations.  Each operation has an opcode 
** and 3 operands.  Operands P1 and P2 are integers.  Operand P3 
** is a null-terminated string.   The P2 operand must be non-negative.
** Opcodes will typically ignore one or more operands.  Many opcodes
** ignore all three operands.
**
** Computation results are stored on a stack.  Each entry on the
** stack is either an integer, a null-terminated string, a floating point
** number, or the SQL "NULL" value.  An inplicit conversion from one
** type to the other occurs as necessary.
** 
** Most of the code in this file is taken up by the sqlite3VdbeExec()
** function which does the work of interpreting a VDBE program.
** But other routines are also provided to help in building up
** a program instruction by instruction.
**
** Various scripts scan this source file in order to generate HTML
** documentation, headers files, or other derived files.  The formatting
** of the code in this file is, therefore, important.  See other comments
** in this file for details.  If in doubt, do not deviate from existing
** commenting and indentation practices when changing or adding code.
**
** $Id: vdbe.c,v 1.26 2006/10/12 21:34:22 rmsimpson Exp $
*/
#include "sqliteInt.h"
#include "os.h"
#include <ctype.h>
#include "vdbeInt.h"

/*
** The following global variable is incremented every time a cursor
** moves, either by the OP_MoveXX, OP_Next, or OP_Prev opcodes.  The test
** procedures use this information to make sure that indices are
** working correctly.  This variable has no function other than to
** help verify the correct operation of the library.
*/
#ifdef SQLITE_TEST
int sqlite3_search_count = 0;
#endif

/*
** When this global variable is positive, it gets decremented once before
** each instruction in the VDBE.  When reaches zero, the u1.isInterrupted
** field of the sqlite3 structure is set in order to simulate and interrupt.
**
** This facility is used for testing purposes only.  It does not function
** in an ordinary build.
*/
#ifdef SQLITE_TEST
int sqlite3_interrupt_count = 0;
#endif

/*
** The next global variable is incremented each type the OP_Sort opcode
** is executed.  The test procedures use this information to make sure that
** sorting is occurring or not occuring at appropriate times.   This variable
** has no function other than to help verify the correct operation of the
** library.
*/
#ifdef SQLITE_TEST
int sqlite3_sort_count = 0;
#endif

/*
** Release the memory associated with the given stack level.  This
** leaves the Mem.flags field in an inconsistent state.
*/
#define Release(P) if((P)->flags&MEM_Dyn){ sqlite3VdbeMemRelease(P); }

/*
** Convert the given stack entity into a string if it isn't one
** already. Return non-zero if a malloc() fails.
*/
#define Stringify(P, enc) \
   if(((P)->flags&(MEM_Str|MEM_Blob))==0 && sqlite3VdbeMemStringify(P,enc)) \
     { goto no_mem; }

/*
** Convert the given stack entity into a string that has been obtained
** from sqliteMalloc().  This is different from Stringify() above in that
** Stringify() will use the NBFS bytes of static string space if the string
** will fit but this routine always mallocs for space.
** Return non-zero if we run out of memory.
*/
#define Dynamicify(P,enc) sqlite3VdbeMemDynamicify(P)

/*
** The header of a record consists of a sequence variable-length integers.
** These integers are almost always small and are encoded as a single byte.
** The following macro takes advantage this fact to provide a fast decode
** of the integers in a record header.  It is faster for the common case
** where the integer is a single byte.  It is a little slower when the
** integer is two or more bytes.  But overall it is faster.
**
** The following expressions are equivalent:
**
**     x = sqlite3GetVarint32( A, &B );
**
**     x = GetVarint( A, B );
**
*/
#define GetVarint(A,B)  ((B = *(A))<=0x7f ? 1 : sqlite3GetVarint32(A, &B))

/*
** An ephemeral string value (signified by the MEM_Ephem flag) contains
** a pointer to a dynamically allocated string where some other entity
** is responsible for deallocating that string.  Because the stack entry
** does not control the string, it might be deleted without the stack
** entry knowing it.
**
** This routine converts an ephemeral string into a dynamically allocated
** string that the stack entry itself controls.  In other words, it
** converts an MEM_Ephem string into an MEM_Dyn string.
*/
#define Deephemeralize(P) \
   if( ((P)->flags&MEM_Ephem)!=0 \
       && sqlite3VdbeMemMakeWriteable(P) ){ goto no_mem;}

/*
** Argument pMem points at a memory cell that will be passed to a
** user-defined function or returned to the user as the result of a query.
** The second argument, 'db_enc' is the text encoding used by the vdbe for
** stack variables.  This routine sets the pMem->enc and pMem->type
** variables used by the sqlite3_value_*() routines.
*/
#define storeTypeInfo(A,B) _storeTypeInfo(A)
static void _storeTypeInfo(Mem *pMem){
  int flags = pMem->flags;
  if( flags & MEM_Null ){
    pMem->type = SQLITE_NULL;
  }
  else if( flags & MEM_Int ){
    pMem->type = SQLITE_INTEGER;
  }
  else if( flags & MEM_Real ){
    pMem->type = SQLITE_FLOAT;
  }
  else if( flags & MEM_Str ){
    pMem->type = SQLITE_TEXT;
  }else{
    pMem->type = SQLITE_BLOB;
  }
}

/*
** Pop the stack N times.
*/
static void popStack(Mem **ppTos, int N){
  Mem *pTos = *ppTos;
  while( N>0 ){
    N--;
    Release(pTos);
    pTos--;
  }
  *ppTos = pTos;
}

/*
** Allocate cursor number iCur.  Return a pointer to it.  Return NULL
** if we run out of memory.
*/
static Cursor *allocateCursor(Vdbe *p, int iCur, int iDb){
  Cursor *pCx;
  assert( iCur<p->nCursor );
  if( p->apCsr[iCur] ){
    sqlite3VdbeFreeCursor(p, p->apCsr[iCur]);
  }
  p->apCsr[iCur] = pCx = sqliteMalloc( sizeof(Cursor) );
  if( pCx ){
    pCx->iDb = iDb;
  }
  return pCx;
}

/*
** Try to convert a value into a numeric representation if we can
** do so without loss of information.  In other words, if the string
** looks like a number, convert it into a number.  If it does not
** look like a number, leave it alone.
*/
static void applyNumericAffinity(Mem *pRec){
  if( (pRec->flags & (MEM_Real|MEM_Int))==0 ){
    int realnum;
    sqlite3VdbeMemNulTerminate(pRec);
    if( (pRec->flags&MEM_Str)
         && sqlite3IsNumber(pRec->z, &realnum, pRec->enc) ){
      i64 value;
      sqlite3VdbeChangeEncoding(pRec, SQLITE_UTF8);
      if( !realnum && sqlite3atoi64(pRec->z, &value) ){
        sqlite3VdbeMemRelease(pRec);
        pRec->i = value;
        pRec->flags = MEM_Int;
      }else{
        sqlite3VdbeMemRealify(pRec);
      }
    }
  }
}

/*
** Processing is determine by the affinity parameter:
**
** SQLITE_AFF_INTEGER:
** SQLITE_AFF_REAL:
** SQLITE_AFF_NUMERIC:
**    Try to convert pRec to an integer representation or a 
**    floating-point representation if an integer representation
**    is not possible.  Note that the integer representation is
**    always preferred, even if the affinity is REAL, because
**    an integer representation is more space efficient on disk.
**
** SQLITE_AFF_TEXT:
**    Convert pRec to a text representation.
**
** SQLITE_AFF_NONE:
**    No-op.  pRec is unchanged.
*/
static void applyAffinity(Mem *pRec, char affinity, u8 enc){
  if( affinity==SQLITE_AFF_TEXT ){
    /* Only attempt the conversion to TEXT if there is an integer or real
    ** representation (blob and NULL do not get converted) but no string
    ** representation.
    */
    if( 0==(pRec->flags&MEM_Str) && (pRec->flags&(MEM_Real|MEM_Int)) ){
      sqlite3VdbeMemStringify(pRec, enc);
    }
    pRec->flags &= ~(MEM_Real|MEM_Int);
  }else if( affinity!=SQLITE_AFF_NONE ){
    assert( affinity==SQLITE_AFF_INTEGER || affinity==SQLITE_AFF_REAL
             || affinity==SQLITE_AFF_NUMERIC );
    applyNumericAffinity(pRec);
    if( pRec->flags & MEM_Real ){
      sqlite3VdbeIntegerAffinity(pRec);
    }
  }
}

/*
** Try to convert the type of a function argument or a result column
** into a numeric representation.  Use either INTEGER or REAL whichever
** is appropriate.  But only do the conversion if it is possible without
** loss of information and return the revised type of the argument.
**
** This is an EXPERIMENTAL api and is subject to change or removal.
*/
int sqlite3_value_numeric_type(sqlite3_value *pVal){
  Mem *pMem = (Mem*)pVal;
  applyNumericAffinity(pMem);
  storeTypeInfo(pMem, 0);
  return pMem->type;
}

/*
** Exported version of applyAffinity(). This one works on sqlite3_value*, 
** not the internal Mem* type.
*/
void sqlite3ValueApplyAffinity(sqlite3_value *pVal, u8 affinity, u8 enc){
  applyAffinity((Mem *)pVal, affinity, enc);
}

#ifdef SQLITE_DEBUG
/*
** Write a nice string representation of the contents of cell pMem
** into buffer zBuf, length nBuf.
*/
void sqlite3VdbeMemPrettyPrint(Mem *pMem, char *zBuf){
  char *zCsr = zBuf;
  int f = pMem->flags;

  static const char *const encnames[] = {"(X)", "(8)", "(16LE)", "(16BE)"};

  if( f&MEM_Blob ){
    int i;
    char c;
    if( f & MEM_Dyn ){
      c = 'z';
      assert( (f & (MEM_Static|MEM_Ephem))==0 );
    }else if( f & MEM_Static ){
      c = 't';
      assert( (f & (MEM_Dyn|MEM_Ephem))==0 );
    }else if( f & MEM_Ephem ){
      c = 'e';
      assert( (f & (MEM_Static|MEM_Dyn))==0 );
    }else{
      c = 's';
    }

    zCsr += sprintf(zCsr, "%c", c);
    zCsr += sprintf(zCsr, "%d[", pMem->n);
    for(i=0; i<16 && i<pMem->n; i++){
      zCsr += sprintf(zCsr, "%02X ", ((int)pMem->z[i] & 0xFF));
    }
    for(i=0; i<16 && i<pMem->n; i++){
      char z = pMem->z[i];
      if( z<32 || z>126 ) *zCsr++ = '.';
      else *zCsr++ = z;
    }

    zCsr += sprintf(zCsr, "]");
    *zCsr = '\0';
  }else if( f & MEM_Str ){
    int j, k;
    zBuf[0] = ' ';
    if( f & MEM_Dyn ){
      zBuf[1] = 'z';
      assert( (f & (MEM_Static|MEM_Ephem))==0 );
    }else if( f & MEM_Static ){
      zBuf[1] = 't';
      assert( (f & (MEM_Dyn|MEM_Ephem))==0 );
    }else if( f & MEM_Ephem ){
      zBuf[1] = 'e';
      assert( (f & (MEM_Static|MEM_Dyn))==0 );
    }else{
      zBuf[1] = 's';
    }
    k = 2;
    k += sprintf(&zBuf[k], "%d", pMem->n);
    zBuf[k++] = '[';
    for(j=0; j<15 && j<pMem->n; j++){
      u8 c = pMem->z[j];
      if( c>=0x20 && c<0x7f ){
        zBuf[k++] = c;
      }else{
        zBuf[k++] = '.';
      }
    }
    zBuf[k++] = ']';
    k += sprintf(&zBuf[k], encnames[pMem->enc]);
    zBuf[k++] = 0;
  }
}
#endif


#ifdef VDBE_PROFILE
/*
** The following routine only works on pentium-class processors.
** It uses the RDTSC opcode to read the cycle count value out of the
** processor and returns that value.  This can be used for high-res
** profiling.
*/
__inline__ unsigned long long int hwtime(void){
  unsigned long long int x;
  __asm__("rdtsc\n\t"
          "mov %%edx, %%ecx\n\t"
          :"=A" (x));
  return x;
}
#endif

/*
** The CHECK_FOR_INTERRUPT macro defined here looks to see if the
** sqlite3_interrupt() routine has been called.  If it has been, then
** processing of the VDBE program is interrupted.
**
** This macro added to every instruction that does a jump in order to
** implement a loop.  This test used to be on every single instruction,
** but that meant we more testing that we needed.  By only testing the
** flag on jump instructions, we get a (small) speed improvement.
*/
#define CHECK_FOR_INTERRUPT \
   if( db->u1.isInterrupted ) goto abort_due_to_interrupt;


/*
** Execute as much of a VDBE program as we can then return.
**
** sqlite3VdbeMakeReady() must be called before this routine in order to
** close the program with a final OP_Halt and to set up the callbacks
** and the error message pointer.
**
** Whenever a row or result data is available, this routine will either
** invoke the result callback (if there is one) or return with
** SQLITE_ROW.
**
** If an attempt is made to open a locked database, then this routine
** will either invoke the busy callback (if there is one) or it will
** return SQLITE_BUSY.
**
** If an error occurs, an error message is written to memory obtained
** from sqliteMalloc() and p->zErrMsg is made to point to that memory.
** The error code is stored in p->rc and this routine returns SQLITE_ERROR.
**
** If the callback ever returns non-zero, then the program exits

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲激情第一区| 国产一区二区精品在线观看| 美国三级日本三级久久99| 国产黄色精品网站| 91精品欧美久久久久久动漫| 中文字幕中文字幕在线一区| 免费的成人av| 欧美日韩视频在线观看一区二区三区 | 91视频一区二区三区| 久久婷婷国产综合精品青草| 亚洲第一福利视频在线| 成人av资源网站| 久久午夜羞羞影院免费观看| 丝袜美腿一区二区三区| 91行情网站电视在线观看高清版| 久久久精品黄色| 精品在线播放午夜| 欧美高清视频不卡网| 亚洲欧洲综合另类在线 | 五月婷婷久久综合| 色94色欧美sute亚洲线路二| 国产精品久久久久久久久晋中| 国产精品亚洲专一区二区三区| 欧美一区二区三区在线观看视频| 一区二区视频在线看| 国产91丝袜在线播放0| 久久影院视频免费| 激情综合一区二区三区| 亚洲精品一区二区三区影院 | 国产精品一区2区| 欧美一区二区播放| 日韩精品一级二级| 日韩一级片网址| 激情综合五月天| 亚洲精品在线网站| 狠狠色丁香久久婷婷综合丁香| 日韩欧美精品三级| 久草热8精品视频在线观看| 日韩区在线观看| 国内精品免费**视频| 国产午夜一区二区三区| 国产91精品一区二区麻豆网站| 国产欧美日产一区| 99久久国产综合精品女不卡| 国产精品盗摄一区二区三区| 色综合咪咪久久| 亚洲福利国产精品| 日韩视频在线一区二区| 国产成人亚洲综合a∨猫咪| 中文字幕二三区不卡| 色94色欧美sute亚洲线路一ni| 亚洲午夜精品久久久久久久久| 欧美日韩国产大片| 久久av资源网| 中文字幕一区二区三区不卡在线| 色综合久久久久| 捆绑紧缚一区二区三区视频| 久久久精品欧美丰满| 在线观看91精品国产入口| 日韩专区中文字幕一区二区| 久久久精品天堂| 欧洲色大大久久| 韩国精品久久久| 国产精品三级视频| 制服丝袜亚洲色图| 国产成人亚洲综合a∨婷婷| 亚洲女与黑人做爰| 欧美电影免费观看高清完整版在线| 国产一区 二区| 亚洲一二三区在线观看| 久久久久久久久久久99999| 欧洲生活片亚洲生活在线观看| 激情五月播播久久久精品| 亚洲色图欧美激情| 精品久久国产老人久久综合| 91蜜桃传媒精品久久久一区二区| 日本aⅴ亚洲精品中文乱码| 国产精品午夜电影| 91精品国产综合久久国产大片| 不卡的av电影| 久草精品在线观看| 午夜精品在线看| 国产精品进线69影院| 欧美一二区视频| 91麻豆国产自产在线观看| 极品少妇一区二区三区精品视频| 亚洲蜜桃精久久久久久久| 久久久久久亚洲综合影院红桃| 欧美日韩不卡在线| 91小宝寻花一区二区三区| 精品无人区卡一卡二卡三乱码免费卡| 亚洲久草在线视频| 国产三级精品在线| 久久亚洲二区三区| 91精品欧美综合在线观看最新| 色香蕉久久蜜桃| av中文一区二区三区| 国产精品自在在线| 经典三级视频一区| 美女视频黄 久久| 日韩黄色免费电影| 亚洲6080在线| 亚洲国产精品精华液网站| 一区二区三区在线观看欧美| 中文字幕一区二区三区蜜月| 中文字幕乱码亚洲精品一区| 亚洲精品在线免费观看视频| 日韩三级精品电影久久久| 91精品国产色综合久久久蜜香臀| 欧美日韩国产片| 欧美日韩在线综合| 欧美剧情片在线观看| 欧美日韩精品一区二区三区蜜桃| 91成人免费电影| 欧美挠脚心视频网站| 91精品国产高清一区二区三区| 欧美日韩高清影院| 91精品国产综合久久久蜜臀图片 | 丁香婷婷深情五月亚洲| 国产成人久久精品77777最新版本| 国产精品亚洲午夜一区二区三区| 久草这里只有精品视频| 国产在线精品一区在线观看麻豆| 久久9热精品视频| 黄页视频在线91| 国产成人福利片| 99精品黄色片免费大全| 在线免费视频一区二区| 欧美日韩免费观看一区三区| 91精品久久久久久久久99蜜臂| 日韩一区二区免费在线电影| 日韩欧美亚洲国产另类| 日韩精品一区在线观看| 国产日韩精品一区二区三区| 中文字幕在线不卡| 亚洲午夜精品在线| 韩国毛片一区二区三区| 99久久久久久| 在线成人午夜影院| 26uuu亚洲| 亚洲精品乱码久久久久久久久| 亚洲aaa精品| 国产精品综合二区| 在线看日本不卡| 久久综合狠狠综合久久综合88| 中文字幕一区二区三区四区 | 亚洲综合色婷婷| 捆绑变态av一区二区三区| 国产成人一区在线| 色婷婷久久久亚洲一区二区三区| 欧美精品久久99| 中文字幕av资源一区| 午夜免费欧美电影| 成人99免费视频| 日韩网站在线看片你懂的| 中文字幕一区av| 九九九久久久精品| 在线亚洲人成电影网站色www| 精品国产麻豆免费人成网站| 亚洲日韩欧美一区二区在线| 国内精品写真在线观看| 欧美日韩一区二区不卡| 中文字幕+乱码+中文字幕一区| 亚洲自拍偷拍图区| 成人国产精品免费网站| 欧美一区二区三区视频免费播放| 中文字幕一区免费在线观看| 人人狠狠综合久久亚洲| 日本精品一区二区三区高清| 久久欧美中文字幕| 日韩精品视频网| 欧美日韩一级黄| 亚洲国产精品影院| 白白色 亚洲乱淫| 精品粉嫩aⅴ一区二区三区四区| 艳妇臀荡乳欲伦亚洲一区| 国产ts人妖一区二区| 91精品久久久久久久99蜜桃| 一区二区三区免费在线观看| 高潮精品一区videoshd| 日韩小视频在线观看专区| 性做久久久久久久久| 91麻豆国产自产在线观看| 国产精品久久久久久久久搜平片| 久久国产欧美日韩精品| 欧美日韩aaa| 亚洲高清视频中文字幕| 91蜜桃在线观看| 中文在线免费一区三区高中清不卡| 精品一区二区三区影院在线午夜| 欧美久久久久免费| 亚洲国产婷婷综合在线精品| 91蝌蚪porny| 国产精品嫩草99a| 风间由美一区二区三区在线观看| 精品奇米国产一区二区三区| 精一区二区三区| 国产亚洲一二三区| 福利91精品一区二区三区| 日本一区二区免费在线|