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

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

?? pragma.c

?? sqlite 3.3.8 支持加密的版本
?? C
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
/*
** 2003 April 6
**
** 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 code used to implement the PRAGMA command.
**
** $Id: pragma.c,v 1.24 2006/10/12 21:34:22 rmsimpson Exp $
*/
#include "sqliteInt.h"
#include "os.h"
#include <ctype.h>

/* Ignore this whole file if pragmas are disabled
*/
#if !defined(SQLITE_OMIT_PRAGMA) && !defined(SQLITE_OMIT_PARSER)

#if defined(SQLITE_DEBUG) || defined(SQLITE_TEST)
# include "pager.h"
# include "btree.h"
#endif

/*
** Interpret the given string as a safety level.  Return 0 for OFF,
** 1 for ON or NORMAL and 2 for FULL.  Return 1 for an empty or 
** unrecognized string argument.
**
** Note that the values returned are one less that the values that
** should be passed into sqlite3BtreeSetSafetyLevel().  The is done
** to support legacy SQL code.  The safety level used to be boolean
** and older scripts may have used numbers 0 for OFF and 1 for ON.
*/
static int getSafetyLevel(const char *z){
                             /* 123456789 123456789 */
  static const char zText[] = "onoffalseyestruefull";
  static const u8 iOffset[] = {0, 1, 2, 4, 9, 12, 16};
  static const u8 iLength[] = {2, 2, 3, 5, 3, 4, 4};
  static const u8 iValue[] =  {1, 0, 0, 0, 1, 1, 2};
  int i, n;
  if( isdigit(*z) ){
    return atoi(z);
  }
  n = strlen(z);
  for(i=0; i<sizeof(iLength); i++){
    if( iLength[i]==n && sqlite3StrNICmp(&zText[iOffset[i]],z,n)==0 ){
      return iValue[i];
    }
  }
  return 1;
}

/*
** Interpret the given string as a boolean value.
*/
static int getBoolean(const char *z){
  return getSafetyLevel(z)&1;
}

#ifndef SQLITE_OMIT_PAGER_PRAGMAS
/*
** Interpret the given string as a temp db location. Return 1 for file
** backed temporary databases, 2 for the Red-Black tree in memory database
** and 0 to use the compile-time default.
*/
static int getTempStore(const char *z){
  if( z[0]>='0' && z[0]<='2' ){
    return z[0] - '0';
  }else if( sqlite3StrICmp(z, "file")==0 ){
    return 1;
  }else if( sqlite3StrICmp(z, "memory")==0 ){
    return 2;
  }else{
    return 0;
  }
}
#endif /* SQLITE_PAGER_PRAGMAS */

#ifndef SQLITE_OMIT_PAGER_PRAGMAS
/*
** Invalidate temp storage, either when the temp storage is changed
** from default, or when 'file' and the temp_store_directory has changed
*/
static int invalidateTempStorage(Parse *pParse){
  sqlite3 *db = pParse->db;
  if( db->aDb[1].pBt!=0 ){
    if( db->flags & SQLITE_InTrans ){
      sqlite3ErrorMsg(pParse, "temporary storage cannot be changed "
        "from within a transaction");
      return SQLITE_ERROR;
    }
    sqlite3BtreeClose(db->aDb[1].pBt);
    db->aDb[1].pBt = 0;
    sqlite3ResetInternalSchema(db, 0);
  }
  return SQLITE_OK;
}
#endif /* SQLITE_PAGER_PRAGMAS */

#ifndef SQLITE_OMIT_PAGER_PRAGMAS
/*
** If the TEMP database is open, close it and mark the database schema
** as needing reloading.  This must be done when using the TEMP_STORE
** or DEFAULT_TEMP_STORE pragmas.
*/
static int changeTempStorage(Parse *pParse, const char *zStorageType){
  int ts = getTempStore(zStorageType);
  sqlite3 *db = pParse->db;
  if( db->temp_store==ts ) return SQLITE_OK;
  if( invalidateTempStorage( pParse ) != SQLITE_OK ){
    return SQLITE_ERROR;
  }
  db->temp_store = ts;
  return SQLITE_OK;
}
#endif /* SQLITE_PAGER_PRAGMAS */

/*
** Generate code to return a single integer value.
*/
static void returnSingleInt(Parse *pParse, const char *zLabel, int value){
  Vdbe *v = sqlite3GetVdbe(pParse);
  sqlite3VdbeAddOp(v, OP_Integer, value, 0);
  if( pParse->explain==0 ){
    sqlite3VdbeSetNumCols(v, 1);
    sqlite3VdbeSetColName(v, 0, COLNAME_NAME, zLabel, P3_STATIC);
  }
  sqlite3VdbeAddOp(v, OP_Callback, 1, 0);
}

#ifndef SQLITE_OMIT_FLAG_PRAGMAS
/*
** Check to see if zRight and zLeft refer to a pragma that queries
** or changes one of the flags in db->flags.  Return 1 if so and 0 if not.
** Also, implement the pragma.
*/
static int flagPragma(Parse *pParse, const char *zLeft, const char *zRight){
  static const struct sPragmaType {
    const char *zName;  /* Name of the pragma */
    int mask;           /* Mask for the db->flags value */
  } aPragma[] = {
    { "vdbe_trace",               SQLITE_VdbeTrace     },
    { "sql_trace",                SQLITE_SqlTrace      },
    { "vdbe_listing",             SQLITE_VdbeListing   },
    { "full_column_names",        SQLITE_FullColNames  },
    { "short_column_names",       SQLITE_ShortColNames },
    { "count_changes",            SQLITE_CountRows     },
    { "empty_result_callbacks",   SQLITE_NullCallback  },
    { "legacy_file_format",       SQLITE_LegacyFileFmt },
    { "fullfsync",                SQLITE_FullFSync     },
#ifndef SQLITE_OMIT_CHECK
    { "ignore_check_constraints", SQLITE_IgnoreChecks  },
#endif
    /* The following is VERY experimental */
    { "writable_schema",          SQLITE_WriteSchema   },
    { "omit_readlock",            SQLITE_NoReadlock    },

    /* TODO: Maybe it shouldn't be possible to change the ReadUncommitted
    ** flag if there are any active statements. */
    { "read_uncommitted",         SQLITE_ReadUncommitted },
  };
  int i;
  const struct sPragmaType *p;
  for(i=0, p=aPragma; i<sizeof(aPragma)/sizeof(aPragma[0]); i++, p++){
    if( sqlite3StrICmp(zLeft, p->zName)==0 ){
      sqlite3 *db = pParse->db;
      Vdbe *v;
      v = sqlite3GetVdbe(pParse);
      if( v ){
        if( zRight==0 ){
          returnSingleInt(pParse, p->zName, (db->flags & p->mask)!=0 );
        }else{
          if( getBoolean(zRight) ){
            db->flags |= p->mask;
          }else{
            db->flags &= ~p->mask;
          }
        }
      }
      return 1;
    }
  }
  return 0;
}
#endif /* SQLITE_OMIT_FLAG_PRAGMAS */

/*
** Process a pragma statement.  
**
** Pragmas are of this form:
**
**      PRAGMA [database.]id [= value]
**
** The identifier might also be a string.  The value is a string, and
** identifier, or a number.  If minusFlag is true, then the value is
** a number that was preceded by a minus sign.
**
** If the left side is "database.id" then pId1 is the database name
** and pId2 is the id.  If the left side is just "id" then pId1 is the
** id and pId2 is any empty string.
*/
void sqlite3Pragma(
  Parse *pParse, 
  Token *pId1,        /* First part of [database.]id field */
  Token *pId2,        /* Second part of [database.]id field, or NULL */
  Token *pValue,      /* Token for <value>, or NULL */
  int minusFlag       /* True if a '-' sign preceded <value> */
){
  char *zLeft = 0;       /* Nul-terminated UTF-8 string <id> */
  char *zRight = 0;      /* Nul-terminated UTF-8 string <value>, or NULL */
  const char *zDb = 0;   /* The database name */
  Token *pId;            /* Pointer to <id> token */
  int iDb;               /* Database index for <database> */
  sqlite3 *db = pParse->db;
  Db *pDb;
  Vdbe *v = sqlite3GetVdbe(pParse);
  if( v==0 ) return;

  /* Interpret the [database.] part of the pragma statement. iDb is the
  ** index of the database this pragma is being applied to in db.aDb[]. */
  iDb = sqlite3TwoPartName(pParse, pId1, pId2, &pId);
  if( iDb<0 ) return;
  pDb = &db->aDb[iDb];

  /* If the temp database has been explicitly named as part of the 
  ** pragma, make sure it is open. 
  */
  if( iDb==1 && sqlite3OpenTempDatabase(pParse) ){
    return;
  }

  zLeft = sqlite3NameFromToken(pId);
  if( !zLeft ) return;
  if( minusFlag ){
    zRight = sqlite3MPrintf("-%T", pValue);
  }else{
    zRight = sqlite3NameFromToken(pValue);
  }

  zDb = ((iDb>0)?pDb->zName:0);
  if( sqlite3AuthCheck(pParse, SQLITE_PRAGMA, zLeft, zRight, zDb) ){
    goto pragma_out;
  }
 
#ifndef SQLITE_OMIT_PAGER_PRAGMAS
  /*
  **  PRAGMA [database.]default_cache_size
  **  PRAGMA [database.]default_cache_size=N
  **
  ** The first form reports the current persistent setting for the
  ** page cache size.  The value returned is the maximum number of
  ** pages in the page cache.  The second form sets both the current
  ** page cache size value and the persistent page cache size value
  ** stored in the database file.
  **
  ** The default cache size is stored in meta-value 2 of page 1 of the
  ** database file.  The cache size is actually the absolute value of
  ** this memory location.  The sign of meta-value 2 determines the
  ** synchronous setting.  A negative value means synchronous is off
  ** and a positive value means synchronous is on.
  */
  if( sqlite3StrICmp(zLeft,"default_cache_size")==0 ){
    static const VdbeOpList getCacheSize[] = {
      { OP_ReadCookie,  0, 2,        0},  /* 0 */
      { OP_AbsValue,    0, 0,        0},
      { OP_Dup,         0, 0,        0},
      { OP_Integer,     0, 0,        0},
      { OP_Ne,          0, 6,        0},
      { OP_Integer,     0, 0,        0},  /* 5 */
      { OP_Callback,    1, 0,        0},
    };
    int addr;
    if( sqlite3ReadSchema(pParse) ) goto pragma_out;
    if( !zRight ){
      sqlite3VdbeSetNumCols(v, 1);
      sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "cache_size", P3_STATIC);
      addr = sqlite3VdbeAddOpList(v, ArraySize(getCacheSize), getCacheSize);
      sqlite3VdbeChangeP1(v, addr, iDb);
      sqlite3VdbeChangeP1(v, addr+5, MAX_PAGES);
    }else{
      int size = atoi(zRight);
      if( size<0 ) size = -size;
      sqlite3BeginWriteOperation(pParse, 0, iDb);
      sqlite3VdbeAddOp(v, OP_Integer, size, 0);
      sqlite3VdbeAddOp(v, OP_ReadCookie, iDb, 2);
      addr = sqlite3VdbeAddOp(v, OP_Integer, 0, 0);
      sqlite3VdbeAddOp(v, OP_Ge, 0, addr+3);
      sqlite3VdbeAddOp(v, OP_Negative, 0, 0);
      sqlite3VdbeAddOp(v, OP_SetCookie, iDb, 2);
      pDb->pSchema->cache_size = size;
      sqlite3BtreeSetCacheSize(pDb->pBt, pDb->pSchema->cache_size);
    }
  }else

  /*
  **  PRAGMA [database.]page_size
  **  PRAGMA [database.]page_size=N
  **
  ** The first form reports the current setting for the
  ** database page size in bytes.  The second form sets the
  ** database page size value.  The value can only be set if
  ** the database has not yet been created.
  */
  if( sqlite3StrICmp(zLeft,"page_size")==0 ){
    Btree *pBt = pDb->pBt;
    if( !zRight ){
      int size = pBt ? sqlite3BtreeGetPageSize(pBt) : 0;
      returnSingleInt(pParse, "page_size", size);
    }else{
      sqlite3BtreeSetPageSize(pBt, atoi(zRight), -1);
    }
  }else
#endif /* SQLITE_OMIT_PAGER_PRAGMAS */

  /*
  **  PRAGMA [database.]auto_vacuum
  **  PRAGMA [database.]auto_vacuum=N
  **
  ** Get or set the (boolean) value of the database 'auto-vacuum' parameter.
  */
#ifndef SQLITE_OMIT_AUTOVACUUM
  if( sqlite3StrICmp(zLeft,"auto_vacuum")==0 ){
    Btree *pBt = pDb->pBt;
    if( !zRight ){
      int auto_vacuum = 
          pBt ? sqlite3BtreeGetAutoVacuum(pBt) : SQLITE_DEFAULT_AUTOVACUUM;

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色综合天天综合狠狠| yourporn久久国产精品| 国产精品女同互慰在线看| 91国偷自产一区二区开放时间| 秋霞电影一区二区| 亚洲免费观看在线视频| www久久精品| 欧美日韩小视频| 色综合天天视频在线观看| 国产精品资源在线| 蜜桃视频在线一区| 亚洲狠狠爱一区二区三区| 日本一区二区三区国色天香| 欧美日韩在线观看一区二区| 成人精品gif动图一区| 蜜桃精品视频在线观看| 亚洲国产aⅴ成人精品无吗| 日韩一区欧美一区| 国产视频一区在线播放| 欧美白人最猛性xxxxx69交| 欧美午夜精品一区| 99国产精品国产精品久久| 国产电影一区在线| 狠狠色丁香九九婷婷综合五月| 日韩国产精品久久久| 亚洲一区免费视频| 亚洲免费视频中文字幕| 亚洲三级电影网站| 国产精品久久久久7777按摩| 国产欧美中文在线| 国产日产精品1区| 久久综合色之久久综合| 欧美va日韩va| 精品国产污网站| 欧美成人性战久久| 日韩欧美二区三区| 91精品国产麻豆| gogo大胆日本视频一区| 亚洲精品一区二区精华| 精品欧美黑人一区二区三区| 欧美一区二区三区公司| 欧美无乱码久久久免费午夜一区| 欧美在线你懂得| 欧美无砖砖区免费| 5858s免费视频成人| 91精品国产欧美一区二区18| 日韩美女视频在线| 精品国产髙清在线看国产毛片| 日韩精品一区二区三区在线| 欧美精品一区二区久久久| 2023国产精品| 国产不卡视频一区| 日韩高清不卡在线| 麻豆精品一区二区| 激情综合网天天干| 国产精品一区二区不卡| 成人av午夜电影| 色视频成人在线观看免| 欧美日韩国产综合一区二区| 日韩一区二区三区视频| 久久综合九色综合欧美就去吻| 国产日韩欧美在线一区| 中文无字幕一区二区三区| 中文字幕综合网| 亚洲18影院在线观看| 韩国av一区二区三区四区| 国产成人高清视频| 色94色欧美sute亚洲线路二| 7777精品伊人久久久大香线蕉的 | 欧美日韩亚洲综合在线| 精品理论电影在线观看| 中文字幕精品一区二区精品绿巨人| 亚洲人亚洲人成电影网站色| 视频在线观看91| 国产福利一区二区| 在线观看网站黄不卡| 日韩欧美中文字幕精品| 国产精品久久久久久久久动漫| 亚洲国产精品一区二区www| 麻豆国产精品一区二区三区 | 欧美在线啊v一区| 精品国产一区久久| 亚洲人成网站色在线观看| 午夜精品免费在线| 粉嫩久久99精品久久久久久夜| 欧美三级韩国三级日本一级| 欧美精品一区二区三区在线播放| 亚洲精品视频免费观看| 国精产品一区一区三区mba视频 | 日韩电影一区二区三区四区| 东方aⅴ免费观看久久av| 91久久精品一区二区| 久久久久久久久久电影| 亚洲国产日日夜夜| 粗大黑人巨茎大战欧美成人| 欧美日韩国产天堂| 国产精品久久综合| 精品在线亚洲视频| 欧美吻胸吃奶大尺度电影 | 精品少妇一区二区三区 | 高清国产一区二区| 日韩一区国产二区欧美三区| 亚洲欧美日韩在线不卡| 国产综合色视频| 欧美日韩国产一区| 综合婷婷亚洲小说| 国产精品一二三四五| 538prom精品视频线放| 自拍偷拍国产精品| 国产大片一区二区| 日韩一二三区视频| 午夜av一区二区三区| 一本色道久久综合精品竹菊 | 日韩极品在线观看| 色综合久久久久综合体桃花网| 国产午夜亚洲精品午夜鲁丝片| 青青草伊人久久| 欧美日韩国产天堂| 亚洲午夜久久久| 99精品久久久久久| 欧美韩日一区二区三区| 国产精品自拍在线| 26uuu另类欧美亚洲曰本| 捆绑变态av一区二区三区| 欧美日韩一级黄| 午夜免费久久看| 欧美久久高跟鞋激| 午夜久久电影网| 欧美喷潮久久久xxxxx| 国产精品自在在线| 欧美一卡二卡三卡四卡| 天堂久久久久va久久久久| 欧美亚洲日本一区| 亚洲国产视频一区二区| 精品视频在线看| 亚洲成av人片在线观看无码| 欧美三级三级三级爽爽爽| 亚洲国产日韩综合久久精品| 欧美日韩国产综合久久| 日韩一区精品字幕| 欧美变态口味重另类| 国内精品自线一区二区三区视频| 2014亚洲片线观看视频免费| 国产美女精品一区二区三区| 国产日韩欧美综合一区| av电影天堂一区二区在线| 亚洲欧洲色图综合| 在线影视一区二区三区| 亚洲国产视频a| 欧美日韩视频专区在线播放| 亚洲国产综合色| 欧美老人xxxx18| 精品伊人久久久久7777人| 日韩三级电影网址| 国产精品一区二区果冻传媒| 中文字幕不卡在线观看| 色综合色综合色综合| 午夜欧美在线一二页| 欧美tk丨vk视频| av日韩在线网站| 亚洲自拍偷拍九九九| 91精品国产91久久综合桃花| 精品一区二区三区日韩| 国产精品国产自产拍在线| 欧美性高清videossexo| 久色婷婷小香蕉久久| 国产精品无人区| 在线观看日韩精品| 精品一区二区三区日韩| 亚洲欧美一区二区视频| 91麻豆精品91久久久久久清纯| 国产一区三区三区| **欧美大码日韩| 欧美一级xxx| 99精品久久久久久| 麻豆精品一区二区av白丝在线| 国产精品嫩草影院com| 欧美色偷偷大香| 国产成人精品免费视频网站| 亚洲福利国产精品| 国产日韩精品一区二区三区| 欧洲精品一区二区三区在线观看| 韩国v欧美v亚洲v日本v| 亚洲一区二区五区| 国产日韩一级二级三级| 欧美日韩精品欧美日韩精品| 国产精品一二一区| 日韩av网站免费在线| 最近中文字幕一区二区三区| 日韩午夜在线播放| 91免费视频网| 国产一二精品视频| 天天av天天翘天天综合网色鬼国产 | 亚洲bdsm女犯bdsm网站| 久久九九久久九九| 欧美日韩夫妻久久| 色偷偷久久人人79超碰人人澡| 激情都市一区二区| 午夜视频在线观看一区二区| 亚洲色图制服诱惑 |