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

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

?? insert.c

?? sqlite庫
?? C
?? 第 1 頁 / 共 3 頁
字號:
      sqlite3VdbeAddOp(v, OP_Goto, 0, iSelectLoop);      sqlite3VdbeResolveLabel(v, iCleanup);    }else{      sqlite3VdbeJumpHere(v, iInitCode);    }  }else{    /* This is the case if the data for the INSERT is coming from a VALUES    ** clause    */    NameContext sNC;    memset(&sNC, 0, sizeof(sNC));    sNC.pParse = pParse;    assert( pList!=0 );    srcTab = -1;    useTempTable = 0;    assert( pList );    nColumn = pList->nExpr;    for(i=0; i<nColumn; i++){      if( sqlite3ExprResolveNames(&sNC, pList->a[i].pExpr) ){        goto insert_cleanup;      }    }  }  /* Make sure the number of columns in the source data matches the number  ** of columns to be inserted into the table.  */  if( pColumn==0 && nColumn!=pTab->nCol ){    sqlite3ErrorMsg(pParse,        "table %S has %d columns but %d values were supplied",       pTabList, 0, pTab->nCol, nColumn);    goto insert_cleanup;  }  if( pColumn!=0 && nColumn!=pColumn->nId ){    sqlite3ErrorMsg(pParse, "%d values for %d columns", nColumn, pColumn->nId);    goto insert_cleanup;  }  /* If the INSERT statement included an IDLIST term, then make sure  ** all elements of the IDLIST really are columns of the table and   ** remember the column indices.  **  ** If the table has an INTEGER PRIMARY KEY column and that column  ** is named in the IDLIST, then record in the keyColumn variable  ** the index into IDLIST of the primary key column.  keyColumn is  ** the index of the primary key as it appears in IDLIST, not as  ** is appears in the original table.  (The index of the primary  ** key in the original table is pTab->iPKey.)  */  if( pColumn ){    for(i=0; i<pColumn->nId; i++){      pColumn->a[i].idx = -1;    }    for(i=0; i<pColumn->nId; i++){      for(j=0; j<pTab->nCol; j++){        if( sqlite3StrICmp(pColumn->a[i].zName, pTab->aCol[j].zName)==0 ){          pColumn->a[i].idx = j;          if( j==pTab->iPKey ){            keyColumn = i;          }          break;        }      }      if( j>=pTab->nCol ){        if( sqlite3IsRowid(pColumn->a[i].zName) ){          keyColumn = i;        }else{          sqlite3ErrorMsg(pParse, "table %S has no column named %s",              pTabList, 0, pColumn->a[i].zName);          pParse->nErr++;          goto insert_cleanup;        }      }    }  }  /* If there is no IDLIST term but the table has an integer primary  ** key, the set the keyColumn variable to the primary key column index  ** in the original table definition.  */  if( pColumn==0 ){    keyColumn = pTab->iPKey;  }  /* Open the temp table for FOR EACH ROW triggers  */  if( triggers_exist ){    sqlite3VdbeAddOp(v, OP_OpenPseudo, newIdx, 0);    sqlite3VdbeAddOp(v, OP_SetNumColumns, newIdx, pTab->nCol);  }      /* Initialize the count of rows to be inserted  */  if( db->flags & SQLITE_CountRows ){    iCntMem = pParse->nMem++;    sqlite3VdbeAddOp(v, OP_MemInt, 0, iCntMem);  }  /* Open tables and indices if there are no row triggers */  if( !triggers_exist ){    base = pParse->nTab;    sqlite3OpenTableAndIndices(pParse, pTab, base, OP_OpenWrite);  }  /* If the data source is a temporary table, then we have to create  ** a loop because there might be multiple rows of data.  If the data  ** source is a subroutine call from the SELECT statement, then we need  ** to launch the SELECT statement processing.  */  if( useTempTable ){    iBreak = sqlite3VdbeMakeLabel(v);    sqlite3VdbeAddOp(v, OP_Rewind, srcTab, iBreak);    iCont = sqlite3VdbeCurrentAddr(v);  }else if( pSelect ){    sqlite3VdbeAddOp(v, OP_Goto, 0, iSelectLoop);    sqlite3VdbeResolveLabel(v, iInsertBlock);  }  /* Run the BEFORE and INSTEAD OF triggers, if there are any  */  endOfLoop = sqlite3VdbeMakeLabel(v);  if( triggers_exist & TRIGGER_BEFORE ){    /* build the NEW.* reference row.  Note that if there is an INTEGER    ** PRIMARY KEY into which a NULL is being inserted, that NULL will be    ** translated into a unique ID for the row.  But on a BEFORE trigger,    ** we do not know what the unique ID will be (because the insert has    ** not happened yet) so we substitute a rowid of -1    */    if( keyColumn<0 ){      sqlite3VdbeAddOp(v, OP_Integer, -1, 0);    }else if( useTempTable ){      sqlite3VdbeAddOp(v, OP_Column, srcTab, keyColumn);    }else{      assert( pSelect==0 );  /* Otherwise useTempTable is true */      sqlite3ExprCode(pParse, pList->a[keyColumn].pExpr);      sqlite3VdbeAddOp(v, OP_NotNull, -1, sqlite3VdbeCurrentAddr(v)+3);      sqlite3VdbeAddOp(v, OP_Pop, 1, 0);      sqlite3VdbeAddOp(v, OP_Integer, -1, 0);      sqlite3VdbeAddOp(v, OP_MustBeInt, 0, 0);    }    /* Create the new column data    */    for(i=0; i<pTab->nCol; i++){      if( pColumn==0 ){        j = i;      }else{        for(j=0; j<pColumn->nId; j++){          if( pColumn->a[j].idx==i ) break;        }      }      if( pColumn && j>=pColumn->nId ){        sqlite3ExprCode(pParse, pTab->aCol[i].pDflt);      }else if( useTempTable ){        sqlite3VdbeAddOp(v, OP_Column, srcTab, j);       }else{        assert( pSelect==0 ); /* Otherwise useTempTable is true */        sqlite3ExprCodeAndCache(pParse, pList->a[j].pExpr);      }    }    sqlite3VdbeAddOp(v, OP_MakeRecord, pTab->nCol, 0);    /* If this is an INSERT on a view with an INSTEAD OF INSERT trigger,    ** do not attempt any conversions before assembling the record.    ** If this is a real table, attempt conversions as required by the    ** table column affinities.    */    if( !isView ){      sqlite3TableAffinityStr(v, pTab);    }    sqlite3VdbeAddOp(v, OP_Insert, newIdx, 0);    /* Fire BEFORE or INSTEAD OF triggers */    if( sqlite3CodeRowTrigger(pParse, TK_INSERT, 0, TRIGGER_BEFORE, pTab,         newIdx, -1, onError, endOfLoop) ){      goto insert_cleanup;    }  }  /* If any triggers exists, the opening of tables and indices is deferred  ** until now.  */  if( triggers_exist && !isView ){    base = pParse->nTab;    sqlite3OpenTableAndIndices(pParse, pTab, base, OP_OpenWrite);  }  /* Push the record number for the new entry onto the stack.  The  ** record number is a randomly generate integer created by NewRowid  ** except when the table has an INTEGER PRIMARY KEY column, in which  ** case the record number is the same as that column.   */  if( !isView ){    if( keyColumn>=0 ){      if( useTempTable ){        sqlite3VdbeAddOp(v, OP_Column, srcTab, keyColumn);      }else if( pSelect ){        sqlite3VdbeAddOp(v, OP_Dup, nColumn - keyColumn - 1, 1);      }else{        sqlite3ExprCode(pParse, pList->a[keyColumn].pExpr);      }      /* If the PRIMARY KEY expression is NULL, then use OP_NewRowid      ** to generate a unique primary key value.      */      sqlite3VdbeAddOp(v, OP_NotNull, -1, sqlite3VdbeCurrentAddr(v)+3);      sqlite3VdbeAddOp(v, OP_Pop, 1, 0);      sqlite3VdbeAddOp(v, OP_NewRowid, base, counterMem);      sqlite3VdbeAddOp(v, OP_MustBeInt, 0, 0);    }else{      sqlite3VdbeAddOp(v, OP_NewRowid, base, counterMem);    }#ifndef SQLITE_OMIT_AUTOINCREMENT    if( pTab->autoInc ){      sqlite3VdbeAddOp(v, OP_MemMax, counterMem, 0);    }#endif /* SQLITE_OMIT_AUTOINCREMENT */    /* Push onto the stack, data for all columns of the new entry, beginning    ** with the first column.    */    for(i=0; i<pTab->nCol; i++){      if( i==pTab->iPKey ){        /* The value of the INTEGER PRIMARY KEY column is always a NULL.        ** Whenever this column is read, the record number will be substituted        ** in its place.  So will fill this column with a NULL to avoid        ** taking up data space with information that will never be used. */        sqlite3VdbeAddOp(v, OP_Null, 0, 0);        continue;      }      if( pColumn==0 ){        j = i;      }else{        for(j=0; j<pColumn->nId; j++){          if( pColumn->a[j].idx==i ) break;        }      }      if( pColumn && j>=pColumn->nId ){        sqlite3ExprCode(pParse, pTab->aCol[i].pDflt);      }else if( useTempTable ){        sqlite3VdbeAddOp(v, OP_Column, srcTab, j);       }else if( pSelect ){        sqlite3VdbeAddOp(v, OP_Dup, i+nColumn-j, 1);      }else{        sqlite3ExprCode(pParse, pList->a[j].pExpr);      }    }    /* Generate code to check constraints and generate index keys and    ** do the insertion.    */    sqlite3GenerateConstraintChecks(pParse, pTab, base, 0, keyColumn>=0,                                   0, onError, endOfLoop);    sqlite3CompleteInsertion(pParse, pTab, base, 0,0,0,                            (triggers_exist & TRIGGER_AFTER)!=0 ? newIdx : -1);  }  /* Update the count of rows that are inserted  */  if( (db->flags & SQLITE_CountRows)!=0 ){    sqlite3VdbeAddOp(v, OP_MemIncr, 1, iCntMem);  }  if( triggers_exist ){    /* Close all tables opened */    if( !isView ){      sqlite3VdbeAddOp(v, OP_Close, base, 0);      for(idx=1, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, idx++){        sqlite3VdbeAddOp(v, OP_Close, idx+base, 0);      }    }    /* Code AFTER triggers */    if( sqlite3CodeRowTrigger(pParse, TK_INSERT, 0, TRIGGER_AFTER, pTab,          newIdx, -1, onError, endOfLoop) ){      goto insert_cleanup;    }  }  /* The bottom of the loop, if the data source is a SELECT statement  */  sqlite3VdbeResolveLabel(v, endOfLoop);  if( useTempTable ){    sqlite3VdbeAddOp(v, OP_Next, srcTab, iCont);    sqlite3VdbeResolveLabel(v, iBreak);    sqlite3VdbeAddOp(v, OP_Close, srcTab, 0);  }else if( pSelect ){    sqlite3VdbeAddOp(v, OP_Pop, nColumn, 0);    sqlite3VdbeAddOp(v, OP_Return, 0, 0);    sqlite3VdbeResolveLabel(v, iCleanup);  }  if( !triggers_exist ){    /* Close all tables opened */    sqlite3VdbeAddOp(v, OP_Close, base, 0);    for(idx=1, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, idx++){      sqlite3VdbeAddOp(v, OP_Close, idx+base, 0);    }  }#ifndef SQLITE_OMIT_AUTOINCREMENT  /* Update the sqlite_sequence table by storing the content of the  ** counter value in memory counterMem back into the sqlite_sequence  ** table.  */  if( pTab->autoInc ){    int iCur = pParse->nTab;    int addr = sqlite3VdbeCurrentAddr(v);    sqlite3OpenTable(pParse, iCur, iDb, pDb->pSchema->pSeqTab, OP_OpenWrite);    sqlite3VdbeAddOp(v, OP_MemLoad, counterRowid, 0);    sqlite3VdbeAddOp(v, OP_NotNull, -1, addr+7);    sqlite3VdbeAddOp(v, OP_Pop, 1, 0);    sqlite3VdbeAddOp(v, OP_NewRowid, iCur, 0);    sqlite3VdbeOp3(v, OP_String8, 0, 0, pTab->zName, 0);    sqlite3VdbeAddOp(v, OP_MemLoad, counterMem, 0);    sqlite3VdbeAddOp(v, OP_MakeRecord, 2, 0);    sqlite3VdbeAddOp(v, OP_Insert, iCur, 0);    sqlite3VdbeAddOp(v, OP_Close, iCur, 0);  }#endif  /*  ** Return the number of rows inserted. If this routine is   ** generating code because of a call to sqlite3NestedParse(), do not  ** invoke the callback function.  */  if( db->flags & SQLITE_CountRows && pParse->nested==0 && !pParse->trigStack ){    sqlite3VdbeAddOp(v, OP_MemLoad, iCntMem, 0);    sqlite3VdbeAddOp(v, OP_Callback, 1, 0);    sqlite3VdbeSetNumCols(v, 1);    sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "rows inserted", P3_STATIC);  }insert_cleanup:  sqlite3SrcListDelete(pTabList);  sqlite3ExprListDelete(pList);  sqlite3SelectDelete(pSelect);  sqlite3IdListDelete(pColumn);}/*** Generate code to do a constraint check prior to an INSERT or an UPDATE.**** When this routine is called, the stack contains (from bottom to top)** the following values:****    1.  The rowid of the row to be updated before the update.  This**        value is omitted unless we are doing an UPDATE that involves a**        change to the record number.****    2.  The rowid of the row after the update.****    3.  The data in the first column of the entry after the update.****    i.  Data from middle columns...****    N.  The data in the last column of the entry after the update.**** The old rowid shown as entry (1) above is omitted unless both isUpdate** and rowidChng are 1.  isUpdate is true for UPDATEs and false for** INSERTs and rowidChng is true if the record number is being changed.**** The code generated by this routine pushes additional entries onto** the stack which are the keys for new index entries for the new record.** The order of index keys is the same as the order of the indices on** the pTable->pIndex list.  A key is only created for index i if ** aIdxUsed!=0 and aIdxUsed[i]!=0.**** This routine also generates code to check constraints.  NOT NULL,** CHECK, and UNIQUE constraints are all checked.  If a constraint fails,** then the appropriate action is performed.  There are five possible** actions: ROLLBACK, ABORT, FAIL, REPLACE, and IGNORE.****  Constraint type  Action       What Happens**  ---------------  ----------   ----------------------------------------

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品一级爱片| 亚洲手机成人高清视频| 蜜桃传媒麻豆第一区在线观看| 91高清视频免费看| 最新国产の精品合集bt伙计| 成人综合激情网| 国产女同互慰高潮91漫画| 国产久卡久卡久卡久卡视频精品| 日韩精品一区二区三区在线| 久久91精品久久久久久秒播| 精品欧美黑人一区二区三区| 精品一区二区成人精品| 精品99一区二区三区| 麻豆精品视频在线观看免费| 精品久久久久99| 激情丁香综合五月| 国产日产精品一区| 成人丝袜18视频在线观看| 国产精品你懂的在线欣赏| 99天天综合性| 1024成人网色www| 色久优优欧美色久优优| 一区二区在线观看av| 色婷婷综合久久久久中文| 亚洲欧美日韩国产成人精品影院| 在线精品视频一区二区三四| 亚洲男人的天堂在线观看| 99久久精品免费看国产免费软件| 国产精品丝袜91| 99久久久国产精品免费蜜臀| 日韩毛片精品高清免费| 91麻豆精品在线观看| 亚洲天堂成人网| 一本大道av一区二区在线播放| 亚洲你懂的在线视频| 91原创在线视频| 一区二区三区中文在线观看| 一本色道久久加勒比精品 | 精品国产成人系列| 狠狠v欧美v日韩v亚洲ⅴ| 久久九九久精品国产免费直播| 国产永久精品大片wwwapp | 欧美剧在线免费观看网站| 日韩va欧美va亚洲va久久| 日韩三级在线观看| 激情欧美日韩一区二区| 国产欧美综合色| 99re视频精品| 亚洲一区av在线| 欧美精品99久久久**| 精品一区二区影视| 久久亚洲影视婷婷| 成人91在线观看| 亚洲国产美女搞黄色| 91精品国产综合久久国产大片| 极品少妇xxxx偷拍精品少妇| 久久蜜桃av一区二区天堂 | 亚洲成av人**亚洲成av**| 4438亚洲最大| 国产精品亚洲一区二区三区在线| 久久久精品免费免费| 国产精品一区在线观看乱码| 国产日韩欧美麻豆| 色婷婷av久久久久久久| 日韩影视精彩在线| 久久你懂得1024| 91免费版pro下载短视频| 一区二区在线观看av| 777亚洲妇女| 黑人精品欧美一区二区蜜桃| 亚洲色图视频免费播放| 欧美日韩国产免费| 国产一区二区三区免费在线观看 | 欧美一区二区三区在线观看视频| 精品一区免费av| 成人欧美一区二区三区1314| 欧美人牲a欧美精品| 国产精品91xxx| 亚洲韩国一区二区三区| 欧美成人性福生活免费看| 91在线一区二区三区| 视频一区视频二区中文| 国产欧美一区二区精品忘忧草| 欧美做爰猛烈大尺度电影无法无天| 奇米在线7777在线精品| 国产精品高潮呻吟久久| 777午夜精品视频在线播放| 国产成人午夜精品影院观看视频| 洋洋av久久久久久久一区| 欧美一区二区三区免费在线看 | 亚洲成人精品一区二区| 久久久久久久性| 一本一道综合狠狠老| 加勒比av一区二区| 一二三区精品视频| 国产调教视频一区| 538prom精品视频线放| www.欧美日韩| 久久精品国产网站| 亚洲一级电影视频| 国产精品日产欧美久久久久| 日韩欧美亚洲另类制服综合在线| 一本在线高清不卡dvd| 国产精品白丝jk白祙喷水网站| 婷婷丁香激情综合| 国产精品久久久久影视| 日韩精品在线网站| 欧美日韩三级一区二区| 成人福利视频在线看| 久久精品99国产精品| 亚洲最大成人综合| 国产欧美精品一区二区三区四区| 69堂国产成人免费视频| 色香蕉成人二区免费| 国产成人高清在线| 另类成人小视频在线| 亚洲国产精品人人做人人爽| 国产精品视频看| 日韩精品一区二区三区在线| 欧美日韩午夜精品| 99天天综合性| kk眼镜猥琐国模调教系列一区二区| 久草精品在线观看| 日韩成人午夜电影| 亚洲国产精品麻豆| 亚洲乱码国产乱码精品精小说| 国产亚洲欧美色| 欧美成人国产一区二区| 欧美精品免费视频| 日本丰满少妇一区二区三区| 不卡电影免费在线播放一区| 国产精品自拍毛片| 国产一区视频网站| 久久99久久久久| 日本欧美久久久久免费播放网| 亚洲日韩欧美一区二区在线| 久久久国产一区二区三区四区小说| 欧美高清hd18日本| 色呦呦一区二区三区| 99久久精品免费观看| caoporm超碰国产精品| 丁香婷婷综合五月| 国产a视频精品免费观看| 国产裸体歌舞团一区二区| 另类中文字幕网| 久久精品国产99国产| 麻豆精品在线播放| 精品一区二区三区日韩| 久久激情综合网| 青娱乐精品在线视频| 久久国产欧美日韩精品| 麻豆专区一区二区三区四区五区| 人人超碰91尤物精品国产| 日韩不卡一区二区三区 | 欧美激情一区二区三区在线| 欧美精品一区二区在线观看| 欧美成人综合网站| 欧美一区三区二区| 欧美日韩一区二区三区四区| 欧美二区三区的天堂| 91精品国产综合久久婷婷香蕉| 日韩一区二区三区电影| 欧美大胆人体bbbb| 久久蜜桃一区二区| 国产精品视频一区二区三区不卡| 中文字幕制服丝袜成人av | 5566中文字幕一区二区电影| 99久免费精品视频在线观看 | 亚洲在线视频网站| 亚洲伦理在线免费看| 亚洲国产综合人成综合网站| 午夜一区二区三区视频| 免费人成在线不卡| 国产伦精品一区二区三区免费迷 | 亚洲精品一卡二卡| 亚洲大型综合色站| 青青草91视频| 国产成人在线免费观看| voyeur盗摄精品| 91蜜桃传媒精品久久久一区二区| 欧美日韩第一区日日骚| 精品国产91久久久久久久妲己| 国产午夜精品福利| 国产精品久久久久婷婷二区次| 亚洲精品欧美在线| 青青草视频一区| 狠狠网亚洲精品| 3d动漫精品啪啪| 国产婷婷一区二区| 伊人色综合久久天天人手人婷| 日产国产欧美视频一区精品| 丝袜诱惑亚洲看片| 精品一区二区三区在线播放| 亚洲一区视频在线观看视频| 午夜欧美电影在线观看| 美女脱光内衣内裤视频久久网站| 日韩不卡免费视频| 日本欧美一区二区在线观看| 成人一区二区在线观看| 欧美日韩和欧美的一区二区|