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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? build.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.
**
*************************************************************************
** This file contains C code routines that are called by the SQLite parser
** when syntax rules are reduced.  The routines in this file handle the
** following kinds of SQL syntax:
**
**     CREATE TABLE
**     DROP TABLE
**     CREATE INDEX
**     DROP INDEX
**     creating ID lists
**     BEGIN TRANSACTION
**     COMMIT
**     ROLLBACK
**
** $Id: build.c,v 1.24 2006/10/12 21:34:21 rmsimpson Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>

/*
** This routine is called when a new SQL statement is beginning to
** be parsed.  Initialize the pParse structure as needed.
*/
void sqlite3BeginParse(Parse *pParse, int explainFlag){
  pParse->explain = explainFlag;
  pParse->nVar = 0;
}

#ifndef SQLITE_OMIT_SHARED_CACHE
/*
** The TableLock structure is only used by the sqlite3TableLock() and
** codeTableLocks() functions.
*/
struct TableLock {
  int iDb;             /* The database containing the table to be locked */
  int iTab;            /* The root page of the table to be locked */
  u8 isWriteLock;      /* True for write lock.  False for a read lock */
  const char *zName;   /* Name of the table */
};

/*
** Record the fact that we want to lock a table at run-time.  
**
** The table to be locked has root page iTab and is found in database iDb.
** A read or a write lock can be taken depending on isWritelock.
**
** This routine just records the fact that the lock is desired.  The
** code to make the lock occur is generated by a later call to
** codeTableLocks() which occurs during sqlite3FinishCoding().
*/
void sqlite3TableLock(
  Parse *pParse,     /* Parsing context */
  int iDb,           /* Index of the database containing the table to lock */
  int iTab,          /* Root page number of the table to be locked */
  u8 isWriteLock,    /* True for a write lock */
  const char *zName  /* Name of the table to be locked */
){
  int i;
  int nBytes;
  TableLock *p;

  if( 0==sqlite3ThreadDataReadOnly()->useSharedData || iDb<0 ){
    return;
  }

  for(i=0; i<pParse->nTableLock; i++){
    p = &pParse->aTableLock[i];
    if( p->iDb==iDb && p->iTab==iTab ){
      p->isWriteLock = (p->isWriteLock || isWriteLock);
      return;
    }
  }

  nBytes = sizeof(TableLock) * (pParse->nTableLock+1);
  sqliteReallocOrFree((void **)&pParse->aTableLock, nBytes);
  if( pParse->aTableLock ){
    p = &pParse->aTableLock[pParse->nTableLock++];
    p->iDb = iDb;
    p->iTab = iTab;
    p->isWriteLock = isWriteLock;
    p->zName = zName;
  }
}

/*
** Code an OP_TableLock instruction for each table locked by the
** statement (configured by calls to sqlite3TableLock()).
*/
static void codeTableLocks(Parse *pParse){
  int i;
  Vdbe *pVdbe; 
  assert( sqlite3ThreadDataReadOnly()->useSharedData || pParse->nTableLock==0 );

  if( 0==(pVdbe = sqlite3GetVdbe(pParse)) ){
    return;
  }

  for(i=0; i<pParse->nTableLock; i++){
    TableLock *p = &pParse->aTableLock[i];
    int p1 = p->iDb;
    if( p->isWriteLock ){
      p1 = -1*(p1+1);
    }
    sqlite3VdbeOp3(pVdbe, OP_TableLock, p1, p->iTab, p->zName, P3_STATIC);
  }
}
#else
  #define codeTableLocks(x)
#endif

/*
** This routine is called after a single SQL statement has been
** parsed and a VDBE program to execute that statement has been
** prepared.  This routine puts the finishing touches on the
** VDBE program and resets the pParse structure for the next
** parse.
**
** Note that if an error occurred, it might be the case that
** no VDBE code was generated.
*/
void sqlite3FinishCoding(Parse *pParse){
  sqlite3 *db;
  Vdbe *v;

  if( sqlite3MallocFailed() ) return;
  if( pParse->nested ) return;
  if( !pParse->pVdbe ){
    if( pParse->rc==SQLITE_OK && pParse->nErr ){
      pParse->rc = SQLITE_ERROR;
      return;
    }
  }

  /* Begin by generating some termination code at the end of the
  ** vdbe program
  */
  db = pParse->db;
  v = sqlite3GetVdbe(pParse);
  if( v ){
    sqlite3VdbeAddOp(v, OP_Halt, 0, 0);

    /* The cookie mask contains one bit for each database file open.
    ** (Bit 0 is for main, bit 1 is for temp, and so forth.)  Bits are
    ** set for each database that is used.  Generate code to start a
    ** transaction on each used database and to verify the schema cookie
    ** on each used database.
    */
    if( pParse->cookieGoto>0 ){
      u32 mask;
      int iDb;
      sqlite3VdbeJumpHere(v, pParse->cookieGoto-1);
      for(iDb=0, mask=1; iDb<db->nDb; mask<<=1, iDb++){
        if( (mask & pParse->cookieMask)==0 ) continue;
        sqlite3VdbeAddOp(v, OP_Transaction, iDb, (mask & pParse->writeMask)!=0);
        sqlite3VdbeAddOp(v, OP_VerifyCookie, iDb, pParse->cookieValue[iDb]);
      }
#ifndef SQLITE_OMIT_VIRTUALTABLE
      if( pParse->pVirtualLock ){
        char *vtab = (char *)pParse->pVirtualLock->pVtab;
        sqlite3VdbeOp3(v, OP_VBegin, 0, 0, vtab, P3_VTAB);
      }
#endif

      /* Once all the cookies have been verified and transactions opened, 
      ** obtain the required table-locks. This is a no-op unless the 
      ** shared-cache feature is enabled.
      */
      codeTableLocks(pParse);
      sqlite3VdbeAddOp(v, OP_Goto, 0, pParse->cookieGoto);
    }

#ifndef SQLITE_OMIT_TRACE
    /* Add a No-op that contains the complete text of the compiled SQL
    ** statement as its P3 argument.  This does not change the functionality
    ** of the program. 
    **
    ** This is used to implement sqlite3_trace().
    */
    sqlite3VdbeOp3(v, OP_Noop, 0, 0, pParse->zSql, pParse->zTail-pParse->zSql);
#endif /* SQLITE_OMIT_TRACE */
  }


  /* Get the VDBE program ready for execution
  */
  if( v && pParse->nErr==0 && !sqlite3MallocFailed() ){
    FILE *trace = (db->flags & SQLITE_VdbeTrace)!=0 ? stdout : 0;
    sqlite3VdbeTrace(v, trace);
    sqlite3VdbeMakeReady(v, pParse->nVar, pParse->nMem+3,
                         pParse->nTab+3, pParse->explain);
    pParse->rc = SQLITE_DONE;
    pParse->colNamesSet = 0;
  }else if( pParse->rc==SQLITE_OK ){
    pParse->rc = SQLITE_ERROR;
  }
  pParse->nTab = 0;
  pParse->nMem = 0;
  pParse->nSet = 0;
  pParse->nVar = 0;
  pParse->cookieMask = 0;
  pParse->cookieGoto = 0;
}

/*
** Run the parser and code generator recursively in order to generate
** code for the SQL statement given onto the end of the pParse context
** currently under construction.  When the parser is run recursively
** this way, the final OP_Halt is not appended and other initialization
** and finalization steps are omitted because those are handling by the
** outermost parser.
**
** Not everything is nestable.  This facility is designed to permit
** INSERT, UPDATE, and DELETE operations against SQLITE_MASTER.  Use
** care if you decide to try to use this routine for some other purposes.
*/
void sqlite3NestedParse(Parse *pParse, const char *zFormat, ...){
  va_list ap;
  char *zSql;
# define SAVE_SZ  (sizeof(Parse) - offsetof(Parse,nVar))
  char saveBuf[SAVE_SZ];

  if( pParse->nErr ) return;
  assert( pParse->nested<10 );  /* Nesting should only be of limited depth */
  va_start(ap, zFormat);
  zSql = sqlite3VMPrintf(zFormat, ap);
  va_end(ap);
  if( zSql==0 ){
    return;   /* A malloc must have failed */
  }
  pParse->nested++;
  memcpy(saveBuf, &pParse->nVar, SAVE_SZ);
  memset(&pParse->nVar, 0, SAVE_SZ);
  sqlite3RunParser(pParse, zSql, 0);
  sqliteFree(zSql);
  memcpy(&pParse->nVar, saveBuf, SAVE_SZ);
  pParse->nested--;
}

/*
** Locate the in-memory structure that describes a particular database
** table given the name of that table and (optionally) the name of the
** database containing the table.  Return NULL if not found.
**
** If zDatabase is 0, all databases are searched for the table and the
** first matching table is returned.  (No checking for duplicate table
** names is done.)  The search order is TEMP first, then MAIN, then any
** auxiliary databases added using the ATTACH command.
**
** See also sqlite3LocateTable().
*/
Table *sqlite3FindTable(sqlite3 *db, const char *zName, const char *zDatabase){
  Table *p = 0;
  int i;
  assert( zName!=0 );
  for(i=OMIT_TEMPDB; i<db->nDb; i++){
    int j = (i<2) ? i^1 : i;   /* Search TEMP before MAIN */
    if( zDatabase!=0 && sqlite3StrICmp(zDatabase, db->aDb[j].zName) ) continue;
    p = sqlite3HashFind(&db->aDb[j].pSchema->tblHash, zName, strlen(zName)+1);
    if( p ) break;
  }
  return p;
}

/*
** Locate the in-memory structure that describes a particular database
** table given the name of that table and (optionally) the name of the
** database containing the table.  Return NULL if not found.  Also leave an
** error message in pParse->zErrMsg.
**
** The difference between this routine and sqlite3FindTable() is that this
** routine leaves an error message in pParse->zErrMsg where
** sqlite3FindTable() does not.
*/
Table *sqlite3LocateTable(Parse *pParse, const char *zName, const char *zDbase){
  Table *p;

  /* Read the database schema. If an error occurs, leave an error message
  ** and code in pParse and return NULL. */
  if( SQLITE_OK!=sqlite3ReadSchema(pParse) ){
    return 0;
  }

  p = sqlite3FindTable(pParse->db, zName, zDbase);
  if( p==0 ){
    if( zDbase ){
      sqlite3ErrorMsg(pParse, "no such table: %s.%s", zDbase, zName);
    }else{
      sqlite3ErrorMsg(pParse, "no such table: %s", zName);
    }
    pParse->checkSchema = 1;
  }
  return p;
}

/*
** Locate the in-memory structure that describes 
** a particular index given the name of that index
** and the name of the database that contains the index.
** Return NULL if not found.
**
** If zDatabase is 0, all databases are searched for the
** table and the first matching index is returned.  (No checking
** for duplicate index names is done.)  The search order is
** TEMP first, then MAIN, then any auxiliary databases added
** using the ATTACH command.
*/
Index *sqlite3FindIndex(sqlite3 *db, const char *zName, const char *zDb){
  Index *p = 0;
  int i;
  for(i=OMIT_TEMPDB; i<db->nDb; i++){
    int j = (i<2) ? i^1 : i;  /* Search TEMP before MAIN */
    Schema *pSchema = db->aDb[j].pSchema;
    if( zDb && sqlite3StrICmp(zDb, db->aDb[j].zName) ) continue;
    assert( pSchema || (j==1 && !db->aDb[1].pBt) );
    if( pSchema ){
      p = sqlite3HashFind(&pSchema->idxHash, zName, strlen(zName)+1);
    }
    if( p ) break;
  }
  return p;
}

/*
** Reclaim the memory used by an index
*/
static void freeIndex(Index *p){
  sqliteFree(p->zColAff);
  sqliteFree(p);
}

/*
** Remove the given index from the index hash table, and free
** its memory structures.
**
** The index is removed from the database hash tables but
** it is not unlinked from the Table that it indexes.
** Unlinking from the Table must be done by the calling function.
*/
static void sqliteDeleteIndex(Index *p){
  Index *pOld;
  const char *zName = p->zName;

  pOld = sqlite3HashInsert(&p->pSchema->idxHash, zName, strlen( zName)+1, 0);
  assert( pOld==0 || pOld==p );
  freeIndex(p);
}

/*
** For the index called zIdxName which is found in the database iDb,
** unlike that index from its Table then remove the index from
** the index hash table and free all memory structures associated
** with the index.
*/
void sqlite3UnlinkAndDeleteIndex(sqlite3 *db, int iDb, const char *zIdxName){
  Index *pIndex;
  int len;
  Hash *pHash = &db->aDb[iDb].pSchema->idxHash;

  len = strlen(zIdxName);
  pIndex = sqlite3HashInsert(pHash, zIdxName, len+1, 0);
  if( pIndex ){
    if( pIndex->pTable->pIndex==pIndex ){
      pIndex->pTable->pIndex = pIndex->pNext;
    }else{
      Index *p;
      for(p=pIndex->pTable->pIndex; p && p->pNext!=pIndex; p=p->pNext){}
      if( p && p->pNext==pIndex ){
        p->pNext = pIndex->pNext;
      }
    }
    freeIndex(pIndex);
  }
  db->flags |= SQLITE_InternChanges;
}

/*
** Erase all schema information from the in-memory hash tables of
** a single database.  This routine is called to reclaim memory
** before the database closes.  It is also called during a rollback
** if there were schema changes during the transaction or if a
** schema-cookie mismatch occurs.
**
** If iDb<=0 then reset the internal schema tables for all database
** files.  If iDb>=2 then reset the internal schema for only the
** single file indicated.
*/
void sqlite3ResetInternalSchema(sqlite3 *db, int iDb){
  int i, j;

  assert( iDb>=0 && iDb<db->nDb );

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩一区三区四区| 欧美一区二区在线看| 亚洲三级小视频| 国产一本一道久久香蕉| 欧美一级xxx| 国产成人免费网站| 日韩三级免费观看| 亚洲激情网站免费观看| 91视频91自| 久久亚洲精华国产精华液| 高清不卡在线观看| 三级成人在线视频| 日韩欧美色电影| 免费视频一区二区| 久久久久久久国产精品影院| 日本aⅴ精品一区二区三区 | 亚洲欧美一区二区三区久本道91 | av不卡免费在线观看| 99精品视频免费在线观看| 亚洲国产欧美一区二区三区丁香婷| 大白屁股一区二区视频| 亚洲一区二区在线免费观看视频 | 欧美变态tickle挠乳网站| 国产精品小仙女| 久久久久久久综合| 99久久婷婷国产综合精品| 91国偷自产一区二区开放时间 | 国产亚洲综合在线| 国产精品2024| 亚洲丝袜另类动漫二区| 欧美一级艳片视频免费观看| 国产在线日韩欧美| 亚洲欧洲精品一区二区三区| 91精品国产aⅴ一区二区| 色综合婷婷久久| 天天影视色香欲综合网老头| 亚洲色欲色欲www在线观看| 91精品国产欧美一区二区| 97久久超碰精品国产| 亚洲国产成人av网| 亚洲美女屁股眼交| 欧美日韩高清一区二区不卡| 蜜臀久久99精品久久久久久9| 国产精品色婷婷| 中文字幕欧美日本乱码一线二线 | 国产精品久久久久久久久免费丝袜 | 久久夜色精品国产噜噜av| 欧美一区二区三区喷汁尤物| 色综合一个色综合| 91同城在线观看| jlzzjlzz国产精品久久| 日本韩国欧美一区| 婷婷丁香激情综合| 日韩中文字幕1| 亚洲国产中文字幕在线视频综合| 亚洲一区在线看| 国产成人aaaa| 在线精品视频一区二区三四| 7777精品伊人久久久大香线蕉超级流畅 | 亚洲乱码国产乱码精品精可以看| 亚洲色图在线看| 亚洲午夜激情av| www.成人在线| 欧美一二三区在线观看| 亚洲一二三区在线观看| 亚洲成人精品影院| 久久超碰97人人做人人爱| 色老头久久综合| 日韩午夜激情av| 亚洲一区二区av在线| 国产99久久久国产精品潘金网站| 色国产综合视频| 天堂在线亚洲视频| 欧美日韩一级大片网址| 亚洲精品在线观看视频| 欧美亚洲综合另类| 亚洲激情网站免费观看| 欧美日韩中文字幕一区| 精品一区二区成人精品| 国产欧美一区二区精品性| 国精产品一区一区三区mba视频| 91麻豆精品国产91久久久久| 欧美激情一区二区三区不卡 | 99精品在线观看视频| 国产女人18毛片水真多成人如厕 | 欧美亚洲动漫制服丝袜| 亚洲免费毛片网站| 欧美性xxxxx极品少妇| 青青草原综合久久大伊人精品 | 91在线国产观看| 亚洲成人777| 91精品视频网| 亚洲视频图片小说| 亚洲欧美韩国综合色| 精品在线视频一区| 3atv在线一区二区三区| 韩国三级电影一区二区| 亚洲精品免费一二三区| 欧美成人午夜电影| 免费不卡在线视频| 国产一区二区三区四区五区美女 | 亚洲欧洲国产专区| 色综合天天综合网国产成人综合天 | 欧美色男人天堂| 亚洲国产精品尤物yw在线观看| 欧美一区二区三区免费视频| 国产做a爰片久久毛片| 亚洲精品久久7777| 国产精品青草综合久久久久99| 亚洲午夜在线观看视频在线| 亚洲日本在线天堂| 国产精品久久久久久一区二区三区 | 性做久久久久久免费观看欧美| 色综合久久久网| 亚洲成av人片www| 色婷婷国产精品综合在线观看| 激情综合色播激情啊| 国产999精品久久久久久绿帽| 国产精品无人区| 91精品在线麻豆| 亚洲色图19p| 国产蜜臀av在线一区二区三区| 91精品国产综合久久国产大片| 婷婷成人综合网| 欧美a级一区二区| 国产欧美一区在线| 色综合一区二区三区| 丁香亚洲综合激情啪啪综合| 成人免费在线观看入口| 欧美一区午夜精品| 国产美女一区二区| 国产精品国产三级国产aⅴ无密码| 在线国产亚洲欧美| 国产成人免费在线观看不卡| 亚洲精品国产品国语在线app| 精品久久久久一区二区国产| 日本欧美久久久久免费播放网| 91丝袜高跟美女视频| 亚洲国产sm捆绑调教视频| 91色在线porny| 成人深夜福利app| 日韩美女视频一区二区| 欧美一区二区三区白人| 亚洲男人天堂av网| 午夜伦理一区二区| 黑人巨大精品欧美黑白配亚洲| 欧美日本视频在线| 精品国产乱码久久久久久1区2区| 久久美女高清视频| 精品一二线国产| 欧美一区二区三区日韩视频| 日韩一二三四区| 久久国产精品72免费观看| 91福利在线免费观看| 久久综合九色欧美综合狠狠| 亚洲综合清纯丝袜自拍| 欧美日韩免费高清一区色橹橹| 久久九九影视网| 久久国产精品99精品国产 | 精品欧美乱码久久久久久| 蜜乳av一区二区三区| 99精品偷自拍| 国产婷婷色一区二区三区| 亚洲乱码中文字幕| 亚州成人在线电影| 久久97超碰色| 欧美亚洲日本国产| 91麻豆精品一区二区三区| 欧美激情在线看| 国产乱码精品一区二区三区五月婷 | 色综合久久中文综合久久97| 欧美日本在线观看| 日韩免费在线观看| 国产日韩高清在线| 久久久亚洲欧洲日产国码αv| 欧美韩国日本一区| 国产精品人妖ts系列视频| 亚洲国产成人一区二区三区| 亚洲天堂网中文字| 国产精品久久久久婷婷二区次| 亚洲国产精品视频| 欧美中文字幕一区二区三区亚洲| 欧美主播一区二区三区| 亚洲精品日日夜夜| 51午夜精品国产| 亚洲自拍偷拍欧美| 成人国产视频在线观看| 最新国产精品久久精品| 播五月开心婷婷综合| 欧美在线观看一二区| 午夜精品爽啪视频| 久久免费视频色| 色系网站成人免费| 久久91精品国产91久久小草| 中文一区在线播放| 欧美视频在线一区二区三区| 国产麻豆精品95视频| 亚洲综合一区二区精品导航| 欧美大片拔萝卜| 日本电影亚洲天堂一区|