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

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

?? insert.c

?? 新版輕量級嵌入式數據庫
?? 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一区二区三区免费野_久草精品视频
色菇凉天天综合网| 成人高清免费观看| 国产精品久久看| 7777精品伊人久久久大香线蕉完整版 | 欧美日本在线视频| 国产成人丝袜美腿| 日韩vs国产vs欧美| 亚洲欧美经典视频| 久久久99久久| 日韩精品一区二区三区中文不卡| 欧美精品tushy高清| 成人午夜精品在线| 国产一区二区久久| 免费一区二区视频| 亚洲国产中文字幕在线视频综合| 国产精品丝袜久久久久久app| 91精品国产麻豆国产自产在线| 亚洲色图19p| 首页亚洲欧美制服丝腿| 91精品国产高清一区二区三区| 中文字幕不卡在线观看| 在线不卡免费av| 久久久亚洲国产美女国产盗摄 | 视频在线观看91| 91视频国产资源| 中文字幕中文在线不卡住| 国产成人av电影在线观看| 中文字幕欧美区| 91福利视频网站| 奇米精品一区二区三区四区| 精品国产髙清在线看国产毛片| 狠狠色丁香久久婷婷综| 国产精品无遮挡| 国产一区二区三区精品欧美日韩一区二区三区 | 不卡av电影在线播放| 久久99国产精品尤物| 亚洲精品精品亚洲| 亚洲人成网站色在线观看| av在线播放一区二区三区| 国产不卡免费视频| 国产成人av在线影院| 91在线播放网址| 成人一级片网址| 国产成人精品亚洲777人妖| 国产一区二区在线电影| 狠狠色综合播放一区二区| 国产资源精品在线观看| 国产乱码精品1区2区3区| 韩国一区二区视频| 国产成人综合亚洲91猫咪| 国产高清无密码一区二区三区| 国产超碰在线一区| 99r国产精品| 中文字幕免费观看一区| 久久精品av麻豆的观看方式| 免费久久99精品国产| 狠狠色狠狠色合久久伊人| 国产91清纯白嫩初高中在线观看 | 成人激情小说乱人伦| 成人久久久精品乱码一区二区三区| 成人免费毛片嘿嘿连载视频| 波波电影院一区二区三区| 91在线观看一区二区| 欧美在线制服丝袜| 欧美一区二区性放荡片| 久久你懂得1024| 中文字幕日韩一区| 婷婷久久综合九色国产成人| 美脚の诱脚舐め脚责91| 国产精品白丝av| 一本色道久久综合亚洲精品按摩| 欧美视频中文字幕| 精品久久五月天| 一区在线观看免费| 日韩精品亚洲一区二区三区免费| 国产在线视频一区二区三区| jlzzjlzz欧美大全| 色欧美乱欧美15图片| 欧美一区二区大片| 国产精品久久久久永久免费观看 | 91精品免费在线观看| 久久亚洲春色中文字幕久久久| 17c精品麻豆一区二区免费| 日韩经典一区二区| 成人美女视频在线看| 在线不卡欧美精品一区二区三区| 国产欧美日韩另类视频免费观看 | 一区二区三区 在线观看视频| 麻豆精品一区二区综合av| av在线不卡电影| 欧美成人伊人久久综合网| 亚洲欧美另类图片小说| 久久91精品国产91久久小草| www.欧美日韩| 欧美一级夜夜爽| 亚洲欧洲综合另类| 国内精品免费**视频| 欧美亚洲丝袜传媒另类| 中文字幕乱码久久午夜不卡| 轻轻草成人在线| 91在线免费播放| 精品第一国产综合精品aⅴ| 亚洲成人在线免费| 色综合天天综合| 久久久777精品电影网影网 | 久久精品在线免费观看| 三级欧美韩日大片在线看| 99久久久国产精品免费蜜臀| 精品嫩草影院久久| 日本中文字幕一区二区视频| 色综合久久久久综合体 | 日韩经典一区二区| 欧美性一区二区| 日韩美女视频19| 国产盗摄精品一区二区三区在线| 日韩欧美在线一区二区三区| 一区二区三区视频在线看| 成人精品小蝌蚪| 久久久九九九九| 国内精品伊人久久久久av影院| 777午夜精品免费视频| 洋洋av久久久久久久一区| 99这里只有久久精品视频| 国产午夜亚洲精品不卡| 国产黄色91视频| 国产片一区二区| 国产高清久久久| 久久久99久久| 国产夫妻精品视频| 久久精品一区二区三区av| 国产在线视视频有精品| 日韩精品一区二区三区视频| 男女激情视频一区| 日韩欧美激情四射| 蜜臀av性久久久久蜜臀av麻豆| 欧美人牲a欧美精品| 午夜视频在线观看一区| 欧美乱熟臀69xxxxxx| 日韩高清一区在线| 91精品国模一区二区三区| 日本女人一区二区三区| 91麻豆精品国产综合久久久久久| 日韩激情av在线| 日韩一级黄色片| 国产一区二区美女诱惑| 久久久影院官网| 成人免费毛片嘿嘿连载视频| 亚洲人一二三区| 欧美视频一区二区在线观看| 五月天一区二区| 欧美成人性福生活免费看| 国产黄色精品视频| 亚洲免费av高清| 欧美片网站yy| 国产综合一区二区| 国产欧美视频在线观看| 91网站最新地址| 天使萌一区二区三区免费观看| 日韩一区二区中文字幕| 久久99国产精品久久| 国产香蕉久久精品综合网| av激情综合网| 亚洲va欧美va人人爽| 精品久久人人做人人爽| 波多野结衣中文字幕一区| 夜夜嗨av一区二区三区四季av| 欧美一区二区日韩| 成人性生交大片免费看中文网站| 日韩毛片视频在线看| 欧美日本在线视频| 国产不卡免费视频| 午夜婷婷国产麻豆精品| 国产日产欧美一区二区视频| 欧美亚洲一区二区三区四区| 伦理电影国产精品| 国产精品美女久久久久久2018 | 国产一区在线看| 亚洲乱码国产乱码精品精小说| 欧美肥妇bbw| 国产白丝精品91爽爽久久| 亚洲一本大道在线| 精品国产伦一区二区三区观看体验| a级精品国产片在线观看| 日韩精品1区2区3区| 中文字幕一区二区三区四区 | 国产精品国产成人国产三级| 欧美一级专区免费大片| www.亚洲在线| 久久99久久99| 亚洲午夜激情av| 国产亚洲综合色| 欧美精品在线观看播放| 成人av影视在线观看| 日韩成人精品在线| 亚洲精品v日韩精品| 久久蜜臀精品av| 欧美一卡2卡三卡4卡5免费| 在线观看欧美黄色| 成人美女视频在线看| 国产一区二区在线电影|