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

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

?? vdbe.c

?? 這是一個嵌入式系統上運行的輕量級數據庫
?? 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 "sqlite_vm*" 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 sqliteVdbeExec()** 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.268.2.4 2004/10/01 15:11:13 drh 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_MoveTo or the OP_Next opcode.  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.*/int sqlite_search_count = 0;/*** When this global variable is positive, it gets decremented once before** each instruction in the VDBE.  When reaches zero, the SQLITE_Interrupt** of the db.flags field is set in order to simulate an interrupt.**** This facility is used for testing purposes only.  It does not function** in an ordinary build.*/int sqlite_interrupt_count = 0;/*** Advance the virtual machine to the next output row.**** The return vale will be either SQLITE_BUSY, SQLITE_DONE, ** SQLITE_ROW, SQLITE_ERROR, or SQLITE_MISUSE.**** SQLITE_BUSY means that the virtual machine attempted to open** a locked database and there is no busy callback registered.** Call sqlite_step() again to retry the open.  *pN is set to 0** and *pazColName and *pazValue are both set to NULL.**** SQLITE_DONE means that the virtual machine has finished** executing.  sqlite_step() should not be called again on this** virtual machine.  *pN and *pazColName are set appropriately** but *pazValue is set to NULL.**** SQLITE_ROW means that the virtual machine has generated another** row of the result set.  *pN is set to the number of columns in** the row.  *pazColName is set to the names of the columns followed** by the column datatypes.  *pazValue is set to the values of each** column in the row.  The value of the i-th column is (*pazValue)[i].** The name of the i-th column is (*pazColName)[i] and the datatype** of the i-th column is (*pazColName)[i+*pN].**** SQLITE_ERROR means that a run-time error (such as a constraint** violation) has occurred.  The details of the error will be returned** by the next call to sqlite_finalize().  sqlite_step() should not** be called again on the VM.**** SQLITE_MISUSE means that the this routine was called inappropriately.** Perhaps it was called on a virtual machine that had already been** finalized or on one that had previously returned SQLITE_ERROR or** SQLITE_DONE.  Or it could be the case the the same database connection** is being used simulataneously by two or more threads.*/int sqlite_step(  sqlite_vm *pVm,              /* The virtual machine to execute */  int *pN,                     /* OUT: Number of columns in result */  const char ***pazValue,      /* OUT: Column data */  const char ***pazColName     /* OUT: Column names and datatypes */){  Vdbe *p = (Vdbe*)pVm;  sqlite *db;  int rc;  if( p->magic!=VDBE_MAGIC_RUN ){    return SQLITE_MISUSE;  }  db = p->db;  if( sqliteSafetyOn(db) ){    p->rc = SQLITE_MISUSE;    return SQLITE_MISUSE;  }  if( p->explain ){    rc = sqliteVdbeList(p);  }else{    rc = sqliteVdbeExec(p);  }  if( rc==SQLITE_DONE || rc==SQLITE_ROW ){    if( pazColName ) *pazColName = (const char**)p->azColName;    if( pN ) *pN = p->nResColumn;  }else{    if( pazColName) *pazColName = 0;    if( pN ) *pN = 0;  }  if( pazValue ){    if( rc==SQLITE_ROW ){      *pazValue = (const char**)p->azResColumn;    }else{      *pazValue = 0;    }  }  if( sqliteSafetyOff(db) ){    return SQLITE_MISUSE;  }  return rc;}/*** Insert a new aggregate element and make it the element that** has focus.**** Return 0 on success and 1 if memory is exhausted.*/static int AggInsert(Agg *p, char *zKey, int nKey){  AggElem *pElem, *pOld;  int i;  Mem *pMem;  pElem = sqliteMalloc( sizeof(AggElem) + nKey +                        (p->nMem-1)*sizeof(pElem->aMem[0]) );  if( pElem==0 ) return 1;  pElem->zKey = (char*)&pElem->aMem[p->nMem];  memcpy(pElem->zKey, zKey, nKey);  pElem->nKey = nKey;  pOld = sqliteHashInsert(&p->hash, pElem->zKey, pElem->nKey, pElem);  if( pOld!=0 ){    assert( pOld==pElem );  /* Malloc failed on insert */    sqliteFree(pOld);    return 0;  }  for(i=0, pMem=pElem->aMem; i<p->nMem; i++, pMem++){    pMem->flags = MEM_Null;  }  p->pCurrent = pElem;  return 0;}/*** Get the AggElem currently in focus*/#define AggInFocus(P)   ((P).pCurrent ? (P).pCurrent : _AggInFocus(&(P)))static AggElem *_AggInFocus(Agg *p){  HashElem *pElem = sqliteHashFirst(&p->hash);  if( pElem==0 ){    AggInsert(p,"",1);    pElem = sqliteHashFirst(&p->hash);  }  return pElem ? sqliteHashData(pElem) : 0;}/*** Convert the given stack entity into a string if it isn't one** already.*/#define Stringify(P) if(((P)->flags & MEM_Str)==0){hardStringify(P);}static int hardStringify(Mem *pStack){  int fg = pStack->flags;  if( fg & MEM_Real ){    sqlite_snprintf(sizeof(pStack->zShort),pStack->zShort,"%.15g",pStack->r);  }else if( fg & MEM_Int ){    sqlite_snprintf(sizeof(pStack->zShort),pStack->zShort,"%d",pStack->i);  }else{    pStack->zShort[0] = 0;  }  pStack->z = pStack->zShort;  pStack->n = strlen(pStack->zShort)+1;  pStack->flags = MEM_Str | MEM_Short;  return 0;}/*** 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) (((P)->flags & MEM_Dyn)==0 ? hardDynamicify(P):0)static int hardDynamicify(Mem *pStack){  int fg = pStack->flags;  char *z;  if( (fg & MEM_Str)==0 ){    hardStringify(pStack);  }  assert( (fg & MEM_Dyn)==0 );  z = sqliteMallocRaw( pStack->n );  if( z==0 ) return 1;  memcpy(z, pStack->z, pStack->n);  pStack->z = z;  pStack->flags |= MEM_Dyn;  return 0;}/*** 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 && hardDeephem(P) ){ goto no_mem;}static int hardDeephem(Mem *pStack){  char *z;  assert( (pStack->flags & MEM_Ephem)!=0 );  z = sqliteMallocRaw( pStack->n );  if( z==0 ) return 1;  memcpy(z, pStack->z, pStack->n);  pStack->z = z;  pStack->flags &= ~MEM_Ephem;  pStack->flags |= MEM_Dyn;  return 0;}/*** 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){ sqliteFree((P)->z); }/*** Pop the stack N times.*/static void popStack(Mem **ppTos, int N){  Mem *pTos = *ppTos;  while( N>0 ){    N--;    Release(pTos);    pTos--;  }  *ppTos = pTos;}/*** Return TRUE if zNum is a 32-bit signed integer and write** the value of the integer into *pNum.  If zNum is not an integer** or is an integer that is too large to be expressed with just 32** bits, then return false.**** Under Linux (RedHat 7.2) this routine is much faster than atoi()** for converting strings into integers.*/static int toInt(const char *zNum, int *pNum){  int v = 0;  int neg;  int i, c;  if( *zNum=='-' ){    neg = 1;    zNum++;  }else if( *zNum=='+' ){    neg = 0;    zNum++;  }else{    neg = 0;  }  for(i=0; (c=zNum[i])>='0' && c<='9'; i++){    v = v*10 + c - '0';  }  *pNum = neg ? -v : v;  return c==0 && i>0 && (i<10 || (i==10 && memcmp(zNum,"2147483647",10)<=0));}/*** Convert the given stack entity into a integer if it isn't one** already.**** Any prior string or real representation is invalidated.  ** NULLs are converted into 0.*/#define Integerify(P) if(((P)->flags&MEM_Int)==0){ hardIntegerify(P); }static void hardIntegerify(Mem *pStack){  if( pStack->flags & MEM_Real ){    pStack->i = (int)pStack->r;    Release(pStack);  }else if( pStack->flags & MEM_Str ){    toInt(pStack->z, &pStack->i);    Release(pStack);  }else{    pStack->i = 0;  }  pStack->flags = MEM_Int;}/*** Get a valid Real representation for the given stack element.**** Any prior string or integer representation is retained.** NULLs are converted into 0.0.*/#define Realify(P) if(((P)->flags&MEM_Real)==0){ hardRealify(P); }static void hardRealify(Mem *pStack){  if( pStack->flags & MEM_Str ){    pStack->r = sqliteAtoF(pStack->z, 0);  }else if( pStack->flags & MEM_Int ){    pStack->r = pStack->i;  }else{    pStack->r = 0.0;  }  pStack->flags |= MEM_Real;}/*** The parameters are pointers to the head of two sorted lists** of Sorter structures.  Merge these two lists together and return** a single sorted list.  This routine forms the core of the merge-sort** algorithm.**** In the case of a tie, left sorts in front of right.*/static Sorter *Merge(Sorter *pLeft, Sorter *pRight){  Sorter sHead;  Sorter *pTail;  pTail = &sHead;  pTail->pNext = 0;  while( pLeft && pRight ){    int c = sqliteSortCompare(pLeft->zKey, pRight->zKey);    if( c<=0 ){      pTail->pNext = pLeft;      pLeft = pLeft->pNext;    }else{      pTail->pNext = pRight;      pRight = pRight->pNext;    }    pTail = pTail->pNext;  }  if( pLeft ){    pTail->pNext = pLeft;  }else if( pRight ){    pTail->pNext = pRight;  }  return sHead.pNext;}/*** The following routine works like a replacement for the standard** library routine fgets().  The difference is in how end-of-line (EOL)** is handled.  Standard fgets() uses LF for EOL under unix, CRLF** under windows, and CR under mac.  This routine accepts any of these** character sequences as an EOL mark.  The EOL mark is replaced by** a single LF character in zBuf.*/static char *vdbe_fgets(char *zBuf, int nBuf, FILE *in){  int i, c;  for(i=0; i<nBuf-1 && (c=getc(in))!=EOF; i++){    zBuf[i] = c;    if( c=='\r' || c=='\n' ){      if( c=='\r' ){        zBuf[i] = '\n';        c = getc(in);        if( c!=EOF && c!='\n' ) ungetc(c, in);      }      i++;      break;    }  }  zBuf[i]  = 0;  return i>0 ? zBuf : 0;}/*** Make sure there is space in the Vdbe structure to hold at least** mxCursor cursors.  If there is not currently enough space, then** allocate more.**** If a memory allocation error occurs, return 1.  Return 0 if** everything works.*/static int expandCursorArraySize(Vdbe *p, int mxCursor){  if( mxCursor>=p->nCursor ){    Cursor *aCsr = sqliteRealloc( p->aCsr, (mxCursor+1)*sizeof(Cursor) );    if( aCsr==0 ) return 1;    p->aCsr = aCsr;    memset(&p->aCsr[p->nCursor], 0, sizeof(Cursor)*(mxCursor+1-p->nCursor));    p->nCursor = mxCursor+1;  }  return 0;}#ifdef VDBE_PROFILE/*** The following routine only works on pentium-class processors.** It uses the RDTSC opcode to read cycle count value out of the** processor and returns that value.  This can be used for high-res** profiling.*/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
极品少妇xxxx精品少妇偷拍| 中文字幕日本乱码精品影院| 久久精品综合网| 综合久久综合久久| 韩国v欧美v日本v亚洲v| 欧洲一区二区三区在线| 久久理论电影网| 天天av天天翘天天综合网| 成人av免费在线观看| 久久蜜臀精品av| 日韩欧美久久久| 国产精品国产a| 国产一区二区精品久久91| 欧美午夜不卡在线观看免费| 国产精品久久看| 国产精品一区二区不卡| 日韩一区二区精品葵司在线| 亚洲国产精品一区二区久久| 成+人+亚洲+综合天堂| 久久免费看少妇高潮| 久久黄色级2电影| 91精品婷婷国产综合久久竹菊| 一区二区三区四区五区视频在线观看| 国产成人福利片| 久久婷婷国产综合精品青草| 美女一区二区三区在线观看| 91精品在线麻豆| 蜜臀av性久久久久蜜臀aⅴ四虎| 在线不卡中文字幕| 天天综合色天天综合| 欧美丝袜丝交足nylons| 亚洲最新在线观看| 欧美另类变人与禽xxxxx| 亚洲va欧美va天堂v国产综合| 日本高清不卡视频| 亚洲精品ww久久久久久p站| 色吧成人激情小说| 亚洲一区在线电影| 欧美猛男男办公室激情| 五月综合激情网| 欧美一二三在线| 黄色成人免费在线| 久久久www成人免费毛片麻豆| 国产精品亚洲第一| 亚洲欧洲日韩在线| 欧美日韩国产精选| 日本免费在线视频不卡一不卡二| 日韩欧美一区电影| 国产成人午夜精品5599| 国产精品久久久久久久久晋中 | 欧美日韩综合在线免费观看| 亚洲精品视频一区| 7799精品视频| 精品无人区卡一卡二卡三乱码免费卡| 久久久久久久综合色一本| 高清国产一区二区| 亚洲一区二区三区小说| 91精品国产欧美一区二区18| 91网站在线播放| 天涯成人国产亚洲精品一区av| 精品蜜桃在线看| 成人精品小蝌蚪| 亚洲一区二区三区不卡国产欧美| 欧美一区二区三区在| 国产老肥熟一区二区三区| 综合久久综合久久| 欧美肥妇free| 不卡视频一二三四| 日日骚欧美日韩| 国产精品久久久久影院| 欧美电影一区二区| 不卡视频一二三| 免费观看成人av| 中文字幕日韩欧美一区二区三区| 91.xcao| 国产大陆精品国产| 亚洲国产综合人成综合网站| 久久久91精品国产一区二区精品 | 欧美日韩一区二区三区在线| 亚洲综合在线免费观看| 黑人巨大精品欧美一区| 国产精品久久久久久久第一福利 | 成人avav在线| 日韩一区二区三| 北条麻妃一区二区三区| 日韩中文字幕区一区有砖一区 | 美洲天堂一区二卡三卡四卡视频| 欧美国产日韩在线观看| 91精品国产综合久久婷婷香蕉| eeuss鲁片一区二区三区在线看| 日本午夜精品一区二区三区电影| 综合激情成人伊人| 国产欧美1区2区3区| 91精品国产一区二区三区蜜臀| 91视频.com| 播五月开心婷婷综合| 国产在线视视频有精品| 日本午夜精品一区二区三区电影| 亚洲影院理伦片| 1000部国产精品成人观看| 久久奇米777| 欧美大片免费久久精品三p| 欧美蜜桃一区二区三区| 色噜噜狠狠成人中文综合| 丁香激情综合五月| 精品av久久707| 精品三级在线看| 欧美视频中文字幕| 91免费在线看| 91老司机福利 在线| 成人免费高清在线| 成人网在线免费视频| 国产一区二区调教| 国产一区二区按摩在线观看| 久久爱www久久做| 精品在线观看免费| 六月丁香婷婷色狠狠久久| 奇米精品一区二区三区四区| 三级一区在线视频先锋 | 日韩精品在线一区| 欧美一区二区视频观看视频 | 日韩欧美国产综合| 日韩视频不卡中文| 日韩精品一区二区三区四区视频| 日韩欧美一级精品久久| 精品国产91洋老外米糕| 久久午夜电影网| 国产精品久久久久久福利一牛影视| 国产精品久久久久国产精品日日| 亚洲国产精品二十页| 国产精品久久久久久久第一福利 | 国产一二三精品| 成人小视频免费观看| 成人不卡免费av| 色综合久久久久综合体桃花网| 91麻豆精东视频| 欧美日韩国产大片| 精品国产3级a| 国产精品美女久久久久久久久久久| 国产精品国产精品国产专区不片| 一区二区三区四区视频精品免费 | 国产成人亚洲综合色影视| 99免费精品在线观看| 在线观看免费亚洲| 欧美一区二区视频免费观看| 欧美精品一区二区三区在线| 国产精品人人做人人爽人人添| 亚洲色图一区二区| 亚洲永久精品大片| 韩国精品主播一区二区在线观看| 成人国产亚洲欧美成人综合网 | 日韩一区二区三区在线观看| 国产亚洲精久久久久久| 一区二区三区精品视频在线| 日韩成人伦理电影在线观看| 国产高清久久久久| 欧美喷潮久久久xxxxx| 久久奇米777| 亚洲成人福利片| 成人午夜在线播放| 3d成人h动漫网站入口| 国产精品女同一区二区三区| 首页欧美精品中文字幕| av在线不卡电影| 精品乱码亚洲一区二区不卡| 亚洲麻豆国产自偷在线| 黄色资源网久久资源365| 在线精品亚洲一区二区不卡| wwww国产精品欧美| 午夜视频在线观看一区二区| 成人av免费在线观看| 欧美成人三级电影在线| 亚洲国产日韩一区二区| 高清不卡在线观看av| 日韩一区二区免费高清| 亚洲综合免费观看高清完整版在线| 国产精一品亚洲二区在线视频| 欧美日韩在线播放一区| 国产综合成人久久大片91| 色天使久久综合网天天| 久久精品男人天堂av| 蜜桃视频免费观看一区| 欧美视频中文字幕| 亚洲日本在线天堂| www.成人网.com| 久久久久久综合| 精品一区二区日韩| 717成人午夜免费福利电影| 伊人色综合久久天天人手人婷| 国产91高潮流白浆在线麻豆| 久久久欧美精品sm网站| 久久不见久久见免费视频1| 日韩欧美一级精品久久| 免费成人在线观看| 日韩一区和二区| 日本女优在线视频一区二区| 91麻豆精品国产91久久久| 亚洲不卡在线观看| 欧美日韩精品专区| 天堂蜜桃一区二区三区|