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

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

?? update.c

?? 新版輕量級嵌入式數據庫
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*** 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 parser** to handle UPDATE statements.**** $Id: update.c,v 1.123 2006/02/24 02:53:50 drh Exp $*/#include "sqliteInt.h"/*** The most recently coded instruction was an OP_Column to retrieve the** i-th column of table pTab. This routine sets the P3 parameter of the ** OP_Column to the default value, if any.**** The default value of a column is specified by a DEFAULT clause in the ** column definition. This was either supplied by the user when the table** was created, or added later to the table definition by an ALTER TABLE** command. If the latter, then the row-records in the table btree on disk** may not contain a value for the column and the default value, taken** from the P3 parameter of the OP_Column instruction, is returned instead.** If the former, then all row-records are guaranteed to include a value** for the column and the P3 value is not required.**** Column definitions created by an ALTER TABLE command may only have ** literal default values specified: a number, null or a string. (If a more** complicated default expression value was provided, it is evaluated ** when the ALTER TABLE is executed and one of the literal values written** into the sqlite_master table.)**** Therefore, the P3 parameter is only required if the default value for** the column is a literal number, string or null. The sqlite3ValueFromExpr()** function is capable of transforming these types of expressions into** sqlite3_value objects.*/void sqlite3ColumnDefault(Vdbe *v, Table *pTab, int i){  if( pTab && !pTab->pSelect ){    sqlite3_value *pValue;    u8 enc = ENC(sqlite3VdbeDb(v));    Column *pCol = &pTab->aCol[i];    sqlite3ValueFromExpr(pCol->pDflt, enc, pCol->affinity, &pValue);    if( pValue ){      sqlite3VdbeChangeP3(v, -1, (const char *)pValue, P3_MEM);    }else{      VdbeComment((v, "# %s.%s", pTab->zName, pCol->zName));    }  }}/*** Process an UPDATE statement.****   UPDATE OR IGNORE table_wxyz SET a=b, c=d WHERE e<5 AND f NOT NULL;**          \_______/ \________/     \______/       \________________/*            onError   pTabList      pChanges             pWhere*/void sqlite3Update(  Parse *pParse,         /* The parser context */  SrcList *pTabList,     /* The table in which we should change things */  ExprList *pChanges,    /* Things to be changed */  Expr *pWhere,          /* The WHERE clause.  May be null */  int onError            /* How to handle constraint errors */){  int i, j;              /* Loop counters */  Table *pTab;           /* The table to be updated */  int addr = 0;          /* VDBE instruction address of the start of the loop */  WhereInfo *pWInfo;     /* Information about the WHERE clause */  Vdbe *v;               /* The virtual database engine */  Index *pIdx;           /* For looping over indices */  int nIdx;              /* Number of indices that need updating */  int nIdxTotal;         /* Total number of indices */  int iCur;              /* VDBE Cursor number of pTab */  sqlite3 *db;           /* The database structure */  Index **apIdx = 0;     /* An array of indices that need updating too */  char *aIdxUsed = 0;    /* aIdxUsed[i]==1 if the i-th index is used */  int *aXRef = 0;        /* aXRef[i] is the index in pChanges->a[] of the                         ** an expression for the i-th column of the table.                         ** aXRef[i]==-1 if the i-th column is not changed. */  int chngRowid;         /* True if the record number is being changed */  Expr *pRowidExpr = 0;  /* Expression defining the new record number */  int openAll = 0;       /* True if all indices need to be opened */  AuthContext sContext;  /* The authorization context */  NameContext sNC;       /* The name-context to resolve expressions in */  int iDb;               /* Database containing the table being updated */#ifndef SQLITE_OMIT_TRIGGER  int isView;                  /* Trying to update a view */  int triggers_exist = 0;      /* True if any row triggers exist */#endif  int newIdx      = -1;  /* index of trigger "new" temp table       */  int oldIdx      = -1;  /* index of trigger "old" temp table       */  sContext.pParse = 0;  if( pParse->nErr || sqlite3MallocFailed() ){    goto update_cleanup;  }  db = pParse->db;  assert( pTabList->nSrc==1 );  /* Locate the table which we want to update.   */  pTab = sqlite3SrcListLookup(pParse, pTabList);  if( pTab==0 ) goto update_cleanup;  iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);  /* Figure out if we have any triggers and if the table being  ** updated is a view  */#ifndef SQLITE_OMIT_TRIGGER  triggers_exist = sqlite3TriggersExist(pParse, pTab, TK_UPDATE, pChanges);  isView = pTab->pSelect!=0;#else# define triggers_exist 0# define isView 0#endif#ifdef SQLITE_OMIT_VIEW# undef isView# define isView 0#endif  if( sqlite3IsReadOnly(pParse, pTab, triggers_exist) ){    goto update_cleanup;  }  if( isView ){    if( sqlite3ViewGetColumnNames(pParse, pTab) ){      goto update_cleanup;    }  }  aXRef = sqliteMallocRaw( sizeof(int) * pTab->nCol );  if( aXRef==0 ) goto update_cleanup;  for(i=0; i<pTab->nCol; i++) aXRef[i] = -1;  /* If there are FOR EACH ROW triggers, allocate cursors for the  ** special OLD and NEW tables  */  if( triggers_exist ){    newIdx = pParse->nTab++;    oldIdx = pParse->nTab++;  }  /* Allocate a cursors for the main database table and for all indices.  ** The index cursors might not be used, but if they are used they  ** need to occur right after the database cursor.  So go ahead and  ** allocate enough space, just in case.  */  pTabList->a[0].iCursor = iCur = pParse->nTab++;  for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){    pParse->nTab++;  }  /* Initialize the name-context */  memset(&sNC, 0, sizeof(sNC));  sNC.pParse = pParse;  sNC.pSrcList = pTabList;  /* Resolve the column names in all the expressions of the  ** of the UPDATE statement.  Also find the column index  ** for each column to be updated in the pChanges array.  For each  ** column to be updated, make sure we have authorization to change  ** that column.  */  chngRowid = 0;  for(i=0; i<pChanges->nExpr; i++){    if( sqlite3ExprResolveNames(&sNC, pChanges->a[i].pExpr) ){      goto update_cleanup;    }    for(j=0; j<pTab->nCol; j++){      if( sqlite3StrICmp(pTab->aCol[j].zName, pChanges->a[i].zName)==0 ){        if( j==pTab->iPKey ){          chngRowid = 1;          pRowidExpr = pChanges->a[i].pExpr;        }        aXRef[j] = i;        break;      }    }    if( j>=pTab->nCol ){      if( sqlite3IsRowid(pChanges->a[i].zName) ){        chngRowid = 1;        pRowidExpr = pChanges->a[i].pExpr;      }else{        sqlite3ErrorMsg(pParse, "no such column: %s", pChanges->a[i].zName);        goto update_cleanup;      }    }#ifndef SQLITE_OMIT_AUTHORIZATION    {      int rc;      rc = sqlite3AuthCheck(pParse, SQLITE_UPDATE, pTab->zName,                           pTab->aCol[j].zName, db->aDb[iDb].zName);      if( rc==SQLITE_DENY ){        goto update_cleanup;      }else if( rc==SQLITE_IGNORE ){        aXRef[j] = -1;      }    }#endif  }  /* Allocate memory for the array apIdx[] and fill it with pointers to every  ** index that needs to be updated.  Indices only need updating if their  ** key includes one of the columns named in pChanges or if the record  ** number of the original table entry is changing.  */  for(nIdx=nIdxTotal=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, nIdxTotal++){    if( chngRowid ){      i = 0;    }else {      for(i=0; i<pIdx->nColumn; i++){        if( aXRef[pIdx->aiColumn[i]]>=0 ) break;      }    }    if( i<pIdx->nColumn ) nIdx++;  }  if( nIdxTotal>0 ){    apIdx = sqliteMallocRaw( sizeof(Index*) * nIdx + nIdxTotal );    if( apIdx==0 ) goto update_cleanup;    aIdxUsed = (char*)&apIdx[nIdx];  }  for(nIdx=j=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, j++){    if( chngRowid ){      i = 0;    }else{      for(i=0; i<pIdx->nColumn; i++){        if( aXRef[pIdx->aiColumn[i]]>=0 ) break;      }    }    if( i<pIdx->nColumn ){      apIdx[nIdx++] = pIdx;      aIdxUsed[j] = 1;    }else{      aIdxUsed[j] = 0;    }  }  /* Resolve the column names in all the expressions in the  ** WHERE clause.  */  if( sqlite3ExprResolveNames(&sNC, pWhere) ){    goto update_cleanup;  }  /* Start the view context  */  if( isView ){    sqlite3AuthContextPush(pParse, &sContext, pTab->zName);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美久久久久久蜜桃| 欧美精品一区二区在线观看| 日韩精品欧美精品| 一区二区三区欧美久久| 亚洲桃色在线一区| 亚洲女人小视频在线观看| 成人免费在线观看入口| 国产目拍亚洲精品99久久精品| 精品国产乱码久久久久久久久| 精品国精品国产| 久久久精品日韩欧美| 欧美激情一区二区三区不卡| 国产日本一区二区| 最新久久zyz资源站| 亚洲自拍与偷拍| 亚洲www啪成人一区二区麻豆| 欧美国产在线观看| 国产一区二区免费视频| 欧美一区二区三区系列电影| 一级女性全黄久久生活片免费| 国产宾馆实践打屁股91| 欧美mv和日韩mv的网站| 天天色综合天天| 欧美日韩免费不卡视频一区二区三区| 国产欧美中文在线| 国产一二精品视频| 亚洲综合在线观看视频| 北条麻妃国产九九精品视频| 久久久噜噜噜久久中文字幕色伊伊 | 韩国成人福利片在线播放| 欧美日韩一级二级| 亚洲国产精品一区二区尤物区| 高清国产一区二区| 国产精品免费久久久久| 成人激情校园春色| 中文字幕在线观看一区| 97久久精品人人澡人人爽| 中文字幕一区二区三区四区不卡 | 国产一区91精品张津瑜| 久久99精品久久久久久久久久久久| 国内偷窥港台综合视频在线播放| 成人av在线资源网| 欧美成人猛片aaaaaaa| 国产精品久久久久久福利一牛影视 | 一区二区三区.www| 国产精品自在在线| 欧美日韩不卡在线| 国产精品传媒在线| 精品一区中文字幕| 欧美日韩免费一区二区三区 | 国产高清精品网站| 久久99精品国产麻豆婷婷 | 亚洲品质自拍视频网站| 在线免费精品视频| 麻豆专区一区二区三区四区五区| 日韩欧美国产三级| 粉嫩高潮美女一区二区三区| 自拍偷自拍亚洲精品播放| 欧美日韩卡一卡二| 国产精品18久久久久| 亚洲同性同志一二三专区| 欧洲激情一区二区| 国产在线视视频有精品| 亚洲人亚洲人成电影网站色| 欧美精选在线播放| 国产成人欧美日韩在线电影| 亚洲永久免费视频| 2024国产精品| 国产盗摄视频一区二区三区| 亚洲欧洲制服丝袜| 精品免费日韩av| 日本久久一区二区| 国产高清不卡二三区| 亚洲成年人网站在线观看| 精品久久99ma| 91免费看片在线观看| 久久精品国产999大香线蕉| 国产精品女同互慰在线看| 337p亚洲精品色噜噜噜| caoporn国产一区二区| 日本欧美韩国一区三区| 亚洲免费观看高清完整版在线观看 | 日本丰满少妇一区二区三区| 蜜桃视频免费观看一区| 国产精品无码永久免费888| 日韩一区二区影院| 在线视频一区二区三| 亚洲免费资源在线播放| 欧美韩国一区二区| 欧美mv日韩mv国产网站| 69p69国产精品| 91视频国产资源| 国产成人精品三级麻豆| 久久精品国产99| 蜜桃免费网站一区二区三区| 视频在线观看一区| 一区二区三区四区中文字幕| 亚洲国产经典视频| 2019国产精品| 欧美成人精品二区三区99精品| 欧美性淫爽ww久久久久无| av色综合久久天堂av综合| 国产精品一区二区在线观看不卡| 日韩激情一二三区| 亚洲成a人片综合在线| 一区二区三区欧美亚洲| 亚洲美女淫视频| 国产精品嫩草99a| 国产精品五月天| 国产女人18水真多18精品一级做 | 国产做a爰片久久毛片| 婷婷丁香激情综合| 婷婷激情综合网| 日本欧美在线观看| 精品亚洲aⅴ乱码一区二区三区| 免费的国产精品| 久久精品国产亚洲5555| 韩日欧美一区二区三区| 国产乱子伦一区二区三区国色天香| 久久aⅴ国产欧美74aaa| 国产自产2019最新不卡| 国产一区二区三区在线观看免费视频| 激情综合网av| 国产精品一色哟哟哟| 国产成人精品免费在线| 成人午夜精品一区二区三区| 成人激情图片网| 色综合中文综合网| 欧美视频在线一区二区三区| 欧美日韩精品一区二区三区| 欧美精品日韩精品| 日韩欧美亚洲国产另类| 久久久久久久久伊人| 国产精品久久网站| 亚洲主播在线观看| 久久91精品久久久久久秒播| 国产一区二区影院| 99vv1com这只有精品| 欧美日本国产视频| 久久亚洲精精品中文字幕早川悠里 | 91免费看视频| 666欧美在线视频| 久久久久国产精品免费免费搜索| 中文字幕中文在线不卡住| 亚洲一区二区三区四区五区中文| 美国毛片一区二区| 成人午夜av电影| 欧美久久免费观看| 欧美激情一区二区三区四区| 亚洲综合丝袜美腿| 国产老妇另类xxxxx| 色婷婷国产精品综合在线观看| 欧美一区二区免费| 一区精品在线播放| 日韩有码一区二区三区| 成人精品视频网站| 欧美日韩色综合| 欧美高清一级片在线观看| 亚洲最新在线观看| 韩国av一区二区三区在线观看| 成人免费看视频| 欧美日韩国产一级| 中文字幕中文字幕中文字幕亚洲无线| 天堂午夜影视日韩欧美一区二区| 国产·精品毛片| 欧美一区二区不卡视频| 亚洲青青青在线视频| 国产精品自拍网站| 欧美丰满嫩嫩电影| 《视频一区视频二区| 狠狠色综合色综合网络| 欧美日韩国产一区二区三区地区| 中文字幕人成不卡一区| 蜜桃视频在线一区| 欧美日韩在线播放三区| 国产精品乱码妇女bbbb| 国产一区二区视频在线播放| 欧美系列在线观看| 日韩伦理免费电影| 粗大黑人巨茎大战欧美成人| 欧美不卡视频一区| 视频一区视频二区中文字幕| 色视频一区二区| 亚洲婷婷国产精品电影人久久| 国产在线精品一区二区夜色 | 精品视频1区2区3区| 专区另类欧美日韩| 成人av电影在线| 国产精品女同一区二区三区| 国产精品影音先锋| 2024国产精品| 国产美女视频91| 精品日韩av一区二区| 奇米一区二区三区| 91麻豆精品国产自产在线| 天天爽夜夜爽夜夜爽精品视频| 欧美日韩在线播放三区| 午夜欧美2019年伦理| 欧美网站大全在线观看| 亚洲电影你懂得|