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

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

?? vdbeaux.c

?? sqlite 3.3.8 支持加密的版本
?? C
?? 第 1 頁 / 共 5 頁
字號:
      sqlite3VdbePrintOp(stdout, i, &p->aOp[i]);
    }
  }
  if( sqlite3OsFileExists("vdbe_trace") ){
    p->trace = stdout;
  }
#endif
  p->pTos = &p->aStack[-1];
  p->pc = -1;
  p->rc = SQLITE_OK;
  p->uniqueCnt = 0;
  p->returnDepth = 0;
  p->errorAction = OE_Abort;
  p->popStack =  0;
  p->explain |= isExplain;
  p->magic = VDBE_MAGIC_RUN;
  p->nChange = 0;
  p->cacheCtr = 1;
  p->minWriteFileFormat = 255;
#ifdef VDBE_PROFILE
  {
    int i;
    for(i=0; i<p->nOp; i++){
      p->aOp[i].cnt = 0;
      p->aOp[i].cycles = 0;
    }
  }
#endif
}

/*
** Close a cursor and release all the resources that cursor happens
** to hold.
*/
void sqlite3VdbeFreeCursor(Vdbe *p, Cursor *pCx){
  if( pCx==0 ){
    return;
  }
  if( pCx->pCursor ){
    sqlite3BtreeCloseCursor(pCx->pCursor);
  }
  if( pCx->pBt ){
    sqlite3BtreeClose(pCx->pBt);
  }
#ifndef SQLITE_OMIT_VIRTUALTABLE
  if( pCx->pVtabCursor ){
    sqlite3_vtab_cursor *pVtabCursor = pCx->pVtabCursor;
    const sqlite3_module *pModule = pCx->pModule;
    p->inVtabMethod = 1;
    sqlite3SafetyOff(p->db);
    pModule->xClose(pVtabCursor);
    sqlite3SafetyOn(p->db);
    p->inVtabMethod = 0;
  }
#endif
  sqliteFree(pCx->pData);
  sqliteFree(pCx->aType);
  sqliteFree(pCx);
}

/*
** Close all cursors
*/
static void closeAllCursors(Vdbe *p){
  int i;
  if( p->apCsr==0 ) return;
  for(i=0; i<p->nCursor; i++){
    if( !p->inVtabMethod || (p->apCsr[i] && !p->apCsr[i]->pVtabCursor) ){
      sqlite3VdbeFreeCursor(p, p->apCsr[i]);
      p->apCsr[i] = 0;
    }
  }
}

/*
** Clean up the VM after execution.
**
** This routine will automatically close any cursors, lists, and/or
** sorters that were left open.  It also deletes the values of
** variables in the aVar[] array.
*/
static void Cleanup(Vdbe *p){
  int i;
  if( p->aStack ){
    releaseMemArray(p->aStack, 1 + (p->pTos - p->aStack));
    p->pTos = &p->aStack[-1];
  }
  closeAllCursors(p);
  releaseMemArray(p->aMem, p->nMem);
  sqlite3VdbeFifoClear(&p->sFifo);
  if( p->contextStack ){
    for(i=0; i<p->contextStackTop; i++){
      sqlite3VdbeFifoClear(&p->contextStack[i].sFifo);
    }
    sqliteFree(p->contextStack);
  }
  p->contextStack = 0;
  p->contextStackDepth = 0;
  p->contextStackTop = 0;
  sqliteFree(p->zErrMsg);
  p->zErrMsg = 0;
}

/*
** Set the number of result columns that will be returned by this SQL
** statement. This is now set at compile time, rather than during
** execution of the vdbe program so that sqlite3_column_count() can
** be called on an SQL statement before sqlite3_step().
*/
void sqlite3VdbeSetNumCols(Vdbe *p, int nResColumn){
  Mem *pColName;
  int n;
  releaseMemArray(p->aColName, p->nResColumn*COLNAME_N);
  sqliteFree(p->aColName);
  n = nResColumn*COLNAME_N;
  p->nResColumn = nResColumn;
  p->aColName = pColName = (Mem*)sqliteMalloc( sizeof(Mem)*n );
  if( p->aColName==0 ) return;
  while( n-- > 0 ){
    (pColName++)->flags = MEM_Null;
  }
}

/*
** Set the name of the idx'th column to be returned by the SQL statement.
** zName must be a pointer to a nul terminated string.
**
** This call must be made after a call to sqlite3VdbeSetNumCols().
**
** If N==P3_STATIC  it means that zName is a pointer to a constant static
** string and we can just copy the pointer. If it is P3_DYNAMIC, then 
** the string is freed using sqliteFree() when the vdbe is finished with
** it. Otherwise, N bytes of zName are copied.
*/
int sqlite3VdbeSetColName(Vdbe *p, int idx, int var, const char *zName, int N){
  int rc;
  Mem *pColName;
  assert( idx<p->nResColumn );
  assert( var<COLNAME_N );
  if( sqlite3MallocFailed() ) return SQLITE_NOMEM;
  assert( p->aColName!=0 );
  pColName = &(p->aColName[idx+var*p->nResColumn]);
  if( N==P3_DYNAMIC || N==P3_STATIC ){
    rc = sqlite3VdbeMemSetStr(pColName, zName, -1, SQLITE_UTF8, SQLITE_STATIC);
  }else{
    rc = sqlite3VdbeMemSetStr(pColName, zName, N, SQLITE_UTF8,SQLITE_TRANSIENT);
  }
  if( rc==SQLITE_OK && N==P3_DYNAMIC ){
    pColName->flags = (pColName->flags&(~MEM_Static))|MEM_Dyn;
    pColName->xDel = 0;
  }
  return rc;
}

/*
** A read or write transaction may or may not be active on database handle
** db. If a transaction is active, commit it. If there is a
** write-transaction spanning more than one database file, this routine
** takes care of the master journal trickery.
*/
static int vdbeCommit(sqlite3 *db){
  int i;
  int nTrans = 0;  /* Number of databases with an active write-transaction */
  int rc = SQLITE_OK;
  int needXcommit = 0;

  /* Before doing anything else, call the xSync() callback for any
  ** virtual module tables written in this transaction. This has to
  ** be done before determining whether a master journal file is 
  ** required, as an xSync() callback may add an attached database
  ** to the transaction.
  */
  rc = sqlite3VtabSync(db, rc);
  if( rc!=SQLITE_OK ){
    return rc;
  }

  /* This loop determines (a) if the commit hook should be invoked and
  ** (b) how many database files have open write transactions, not 
  ** including the temp database. (b) is important because if more than 
  ** one database file has an open write transaction, a master journal
  ** file is required for an atomic commit.
  */ 
  for(i=0; i<db->nDb; i++){ 
    Btree *pBt = db->aDb[i].pBt;
    if( pBt && sqlite3BtreeIsInTrans(pBt) ){
      needXcommit = 1;
      if( i!=1 ) nTrans++;
    }
  }

  /* If there are any write-transactions at all, invoke the commit hook */
  if( needXcommit && db->xCommitCallback ){
    sqlite3SafetyOff(db);
    rc = db->xCommitCallback(db->pCommitArg);
    sqlite3SafetyOn(db);
    if( rc ){
      return SQLITE_CONSTRAINT;
    }
  }

  /* The simple case - no more than one database file (not counting the
  ** TEMP database) has a transaction active.   There is no need for the
  ** master-journal.
  **
  ** If the return value of sqlite3BtreeGetFilename() is a zero length
  ** string, it means the main database is :memory:.  In that case we do
  ** not support atomic multi-file commits, so use the simple case then
  ** too.
  */
  if( 0==strlen(sqlite3BtreeGetFilename(db->aDb[0].pBt)) || nTrans<=1 ){
    for(i=0; rc==SQLITE_OK && i<db->nDb; i++){ 
      Btree *pBt = db->aDb[i].pBt;
      if( pBt ){
        rc = sqlite3BtreeSync(pBt, 0);
      }
    }

    /* Do the commit only if all databases successfully synced */
    if( rc==SQLITE_OK ){
      for(i=0; i<db->nDb; i++){
        Btree *pBt = db->aDb[i].pBt;
        if( pBt ){
          sqlite3BtreeCommit(pBt);
        }
      }
      sqlite3VtabCommit(db);
    }
  }

  /* The complex case - There is a multi-file write-transaction active.
  ** This requires a master journal file to ensure the transaction is
  ** committed atomicly.
  */
#ifndef SQLITE_OMIT_DISKIO
  else{
    int needSync = 0;
    char *zMaster = 0;   /* File-name for the master journal */
    char const *zMainFile = sqlite3BtreeGetFilename(db->aDb[0].pBt);
    OsFile *master = 0;

    /* Select a master journal file name */
    do {
      u32 random;
      sqliteFree(zMaster);
      sqlite3Randomness(sizeof(random), &random);
      zMaster = sqlite3MPrintf("%s-mj%08X", zMainFile, random&0x7fffffff);
      if( !zMaster ){
        return SQLITE_NOMEM;
      }
    }while( sqlite3OsFileExists(zMaster) );

    /* Open the master journal. */
    rc = sqlite3OsOpenExclusive(zMaster, &master, 0);
    if( rc!=SQLITE_OK ){
      sqliteFree(zMaster);
      return rc;
    }
 
    /* Write the name of each database file in the transaction into the new
    ** master journal file. If an error occurs at this point close
    ** and delete the master journal file. All the individual journal files
    ** still have 'null' as the master journal pointer, so they will roll
    ** back independently if a failure occurs.
    */
    for(i=0; i<db->nDb; i++){ 
      Btree *pBt = db->aDb[i].pBt;
      if( i==1 ) continue;   /* Ignore the TEMP database */
      if( pBt && sqlite3BtreeIsInTrans(pBt) ){
        char const *zFile = sqlite3BtreeGetJournalname(pBt);
        if( zFile[0]==0 ) continue;  /* Ignore :memory: databases */
        if( !needSync && !sqlite3BtreeSyncDisabled(pBt) ){
          needSync = 1;
        }
        rc = sqlite3OsWrite(master, zFile, strlen(zFile)+1);
        if( rc!=SQLITE_OK ){
          sqlite3OsClose(&master);
          sqlite3OsDelete(zMaster);
          sqliteFree(zMaster);
          return rc;
        }
      }
    }


    /* Sync the master journal file. Before doing this, open the directory
    ** the master journal file is store in so that it gets synced too.
    */
    zMainFile = sqlite3BtreeGetDirname(db->aDb[0].pBt);
    rc = sqlite3OsOpenDirectory(master, zMainFile);
    if( rc!=SQLITE_OK ||
          (needSync && (rc=sqlite3OsSync(master,0))!=SQLITE_OK) ){
      sqlite3OsClose(&master);
      sqlite3OsDelete(zMaster);
      sqliteFree(zMaster);
      return rc;
    }

    /* Sync all the db files involved in the transaction. The same call
    ** sets the master journal pointer in each individual journal. If
    ** an error occurs here, do not delete the master journal file.
    **
    ** If the error occurs during the first call to sqlite3BtreeSync(),
    ** then there is a chance that the master journal file will be
    ** orphaned. But we cannot delete it, in case the master journal
    ** file name was written into the journal file before the failure
    ** occured.
    */
    for(i=0; rc==SQLITE_OK && i<db->nDb; i++){ 
      Btree *pBt = db->aDb[i].pBt;
      if( pBt && sqlite3BtreeIsInTrans(pBt) ){
        rc = sqlite3BtreeSync(pBt, zMaster);
      }
    }
    sqlite3OsClose(&master);
    if( rc!=SQLITE_OK ){
      sqliteFree(zMaster);
      return rc;
    }

    /* Delete the master journal file. This commits the transaction. After
    ** doing this the directory is synced again before any individual
    ** transaction files are deleted.
    */
    rc = sqlite3OsDelete(zMaster);
    if( rc ){
      return rc;
    }
    sqliteFree(zMaster);
    zMaster = 0;
    rc = sqlite3OsSyncDirectory(zMainFile);
    if( rc!=SQLITE_OK ){
      /* This is not good. The master journal file has been deleted, but
      ** the directory sync failed. There is no completely safe course of
      ** action from here. The individual journals contain the name of the
      ** master journal file, but there is no way of knowing if that
      ** master journal exists now or if it will exist after the operating
      ** system crash that may follow the fsync() failure.
      */
      return rc;
    }

    /* All files and directories have already been synced, so the following
    ** calls to sqlite3BtreeCommit() are only closing files and deleting
    ** journals. If something goes wrong while this is happening we don't
    ** really care. The integrity of the transaction is already guaranteed,
    ** but some stray 'cold' journals may be lying around. Returning an
    ** error code won't help matters.
    */
    for(i=0; i<db->nDb; i++){ 
      Btree *pBt = db->aDb[i].pBt;
      if( pBt ){
        sqlite3BtreeCommit(pBt);
      }
    }
    sqlite3VtabCommit(db);
  }
#endif

  return rc;
}

/* 
** This routine checks that the sqlite3.activeVdbeCnt count variable
** matches the number of vdbe's in the list sqlite3.pVdbe that are
** currently active. An assertion fails if the two counts do not match.
** This is an internal self-check only - it is not an essential processing
** step.
**
** This is a no-op if NDEBUG is defined.
*/
#ifndef NDEBUG
static void checkActiveVdbeCnt(sqlite3 *db){
  Vdbe *p;
  int cnt = 0;
  p = db->pVdbe;
  while( p ){
    if( p->magic==VDBE_MAGIC_RUN && p->pc>=0 ){
      cnt++;
    }
    p = p->pNext;
  }
  assert( cnt==db->activeVdbeCnt );
}
#else
#define checkActiveVdbeCnt(x)
#endif

/*
** Find every active VM other than pVdbe and change its status to
** aborted.  This happens when one VM causes a rollback due to an
** ON CONFLICT ROLLBACK clause (for example).  The other VMs must be
** aborted so that they do not have data rolled out from underneath
** them leading to a segfault.
*/
void sqlite3AbortOtherActiveVdbes(sqlite3 *db, Vdbe *pExcept){
  Vdbe *pOther;
  for(pOther=db->pVdbe; pOther; pOther=pOther->pNext){
    if( pOther==pExcept ) continue;
    if( pOther->magic!=VDBE_MAGIC_RUN || pOther->pc<0 ) continue;
    checkActiveVdbeCnt(db);
    closeAllCursors(pOther);
    checkActiveVdbeCnt(db);
    pOther->aborted = 1;
  }
}

/*
** This routine is called the when a VDBE tries to halt.  If the VDBE
** has made changes and is in autocommit mode, then commit those
** changes.  If a rollback is needed, then do the rollback.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩综合在线免费观看| 91精品黄色片免费大全| 日本乱人伦aⅴ精品| 7777精品伊人久久久大香线蕉完整版| 久久免费视频色| 一区二区三国产精华液| 国产一区在线观看麻豆| 日本精品视频一区二区| 国产欧美一区二区三区沐欲| 免费xxxx性欧美18vr| 色婷婷亚洲婷婷| 亚洲国产精品高清| 国产麻豆精品久久一二三| 欧美日韩综合在线免费观看| 亚洲裸体在线观看| 丁香亚洲综合激情啪啪综合| 日韩欧美在线不卡| 天天操天天色综合| 欧美色综合久久| 最新久久zyz资源站| 国产传媒一区在线| 久久久久久电影| 精品一区二区三区在线观看| 3d动漫精品啪啪| 视频一区在线播放| 欧美日韩一级二级三级| 夜夜精品视频一区二区| 99久久精品一区| 国产精品久久久久久久第一福利 | 亚洲蜜臀av乱码久久精品蜜桃| 免费三级欧美电影| 亚洲美女在线国产| 99久久国产综合精品色伊| 欧美经典三级视频一区二区三区| 国产一区二区美女| 国产婷婷色一区二区三区四区 | 亚洲免费观看高清完整版在线观看熊 | 午夜精品久久一牛影视| 欧美三级三级三级| 亚洲国产精品精华液网站| 欧美午夜电影一区| 日韩二区在线观看| 久久久五月婷婷| 成人免费看的视频| 亚洲日穴在线视频| 欧美精品一级二级| 美腿丝袜亚洲三区| 国产欧美日韩综合精品一区二区| 丰满白嫩尤物一区二区| 最新国产の精品合集bt伙计| 欧美亚洲日本国产| 另类小说视频一区二区| 久久精品一区蜜桃臀影院| 成人精品亚洲人成在线| 依依成人综合视频| 91精品国产福利| 国产成人无遮挡在线视频| 久久99精品视频| 久久久久青草大香线综合精品| 福利一区二区在线| 亚洲丰满少妇videoshd| 日韩欧美国产精品一区| 国产99久久久久久免费看农村| 中文字幕一区二区三区不卡在线 | 日韩区在线观看| 成人av在线一区二区| 夜夜精品视频一区二区| 久久综合狠狠综合久久综合88| 99re6这里只有精品视频在线观看| 亚洲高清视频中文字幕| 久久影院电视剧免费观看| 色吧成人激情小说| 亚洲欧美日韩久久| 精品国产免费久久| 欧洲一区在线观看| 国产成人在线免费| 日本成人中文字幕| 亚洲欧美一区二区久久 | 亚洲国产高清在线观看视频| 在线观看日韩高清av| 国产一区二区视频在线| 夜夜嗨av一区二区三区网页 | 日韩午夜激情视频| 91免费观看在线| 国产毛片精品视频| 日本不卡视频在线观看| 亚洲欧美日韩国产综合在线| 国产午夜精品福利| 日韩色视频在线观看| 欧美在线色视频| eeuss影院一区二区三区| 蜜臂av日日欢夜夜爽一区| 一区二区欧美国产| 综合分类小说区另类春色亚洲小说欧美 | www.亚洲色图.com| 国产一区二区三区在线看麻豆| 亚洲地区一二三色| 亚洲人妖av一区二区| 国产亚洲欧美日韩日本| 日韩欧美二区三区| 欧美人妖巨大在线| 91高清视频在线| 色综合久久久久综合99| av电影在线不卡| 成人国产精品免费观看动漫| 国内成+人亚洲+欧美+综合在线| 天涯成人国产亚洲精品一区av| 一区二区三区精品视频| 国产精品美女一区二区| 久久久久国产精品人| 日韩女优毛片在线| 欧美成人国产一区二区| 日韩视频国产视频| 精品久久一区二区三区| 精品国产一区二区三区忘忧草 | 视频一区二区三区入口| 一区二区三区成人| 亚洲国产人成综合网站| 亚洲国产aⅴ天堂久久| 午夜视频一区在线观看| 午夜电影一区二区| 日韩高清一区二区| 另类调教123区| 激情综合色综合久久综合| 国产一区二区三区四区在线观看 | 精品国产免费一区二区三区四区 | 中文字幕中文字幕中文字幕亚洲无线| 国产午夜亚洲精品羞羞网站| 中文字幕国产精品一区二区| 国产精品你懂的在线欣赏| 亚洲天堂福利av| 亚洲午夜av在线| 美国欧美日韩国产在线播放| 激情综合色综合久久| 成人午夜精品在线| 色呦呦一区二区三区| 欧美精品在线一区二区| 日韩精品中文字幕在线一区| 久久久久国产精品厨房| 国产精品全国免费观看高清| 亚洲男人的天堂在线aⅴ视频| 亚洲一区二区三区视频在线播放 | 日韩天堂在线观看| 久久精品人人做人人综合 | 麻豆久久一区二区| 成人性生交大片免费| 在线国产亚洲欧美| 亚洲精品一区二区精华| 中文字幕一区二区三区四区不卡| 亚洲一区二区三区四区不卡| 国内国产精品久久| 欧美视频完全免费看| 久久蜜桃av一区精品变态类天堂| 亚洲伦在线观看| 国产在线精品一区二区不卡了| 色综合久久久久久久久| 日韩欧美亚洲另类制服综合在线| 国产精品久久久久久妇女6080| 午夜一区二区三区视频| 成人免费毛片片v| 制服丝袜日韩国产| 国产精品成人一区二区三区夜夜夜| 欧美aaaaaa午夜精品| 91视频精品在这里| 亚洲精品一区二区在线观看| 亚洲一区在线观看免费| 国产精品一级片在线观看| 欧美另类z0zxhd电影| 国产日韩欧美精品综合| 亚洲成a人片在线不卡一二三区| 国产91清纯白嫩初高中在线观看| 在线成人av影院| 一区二区三区在线视频播放| 国产精品亚洲第一| 91精品啪在线观看国产60岁| 亚洲丝袜自拍清纯另类| 国产suv精品一区二区6| 精品国内二区三区| 亚洲一区在线观看免费观看电影高清 | 日本欧美一区二区| 色婷婷亚洲精品| 1区2区3区精品视频| 国产在线播放一区三区四| 91麻豆精品91久久久久久清纯| 亚洲精品日韩一| 99国产精品久| 国产欧美一区二区三区鸳鸯浴 | 91美女蜜桃在线| 中文字幕精品一区二区三区精品| 久久国产福利国产秒拍| 欧美夫妻性生活| 五月综合激情婷婷六月色窝| 在线视频一区二区三| 亚洲六月丁香色婷婷综合久久 | 欧美三级视频在线观看| 一区二区三区在线视频观看| 99视频国产精品| 亚洲图片欧美激情| 色综合天天做天天爱| 亚洲欧美日韩小说|