1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Bug fixes so that "make test" once against runs with no errors.

FossilOrigin-Name: 7bfe0f679d8951b3e925bdf549efa0f8d6b514eddeaca69cbfddbd9476cfff5f
This commit is contained in:
drh
2019-10-17 14:21:07 +00:00
parent ab3c5f26ab
commit 676fa25a0f
4 changed files with 20 additions and 15 deletions

View File

@@ -1009,6 +1009,7 @@ void sqlite3Insert(
iRegStore = regRowid+1;
for(i=0; i<pTab->nCol; i++, iRegStore++){
int k;
u32 colFlags;
assert( i>=nHidden );
assert( iRegStore==sqlite3ColumnOfTable(pTab,i)+regRowid+1 );
if( i==pTab->iPKey ){
@@ -1020,16 +1021,18 @@ void sqlite3Insert(
sqlite3VdbeAddOp1(v, OP_SoftNull, iRegStore);
continue;
}
if( pTab->aCol[i].colFlags & COLFLAG_NOINSERT ){
if( ((colFlags = pTab->aCol[i].colFlags) & COLFLAG_NOINSERT)!=0 ){
nHidden++;
if( pTab->aCol[i].colFlags & COLFLAG_VIRTUAL ){
if( (colFlags & COLFLAG_VIRTUAL)!=0 ){
/* Virtual columns are no stored */
iRegStore--;
}else{
/* Hidden and stored columns get the default value */
continue;
}else if( (colFlags & COLFLAG_STORED)!=0 || pColumn==0 ){
/* Stored columns get the default value. Also hidden columns
** that are not explicitly named in the INSERT */
sqlite3ExprCodeFactorable(pParse, pTab->aCol[i].pDflt, iRegStore);
continue;
}
continue;
}
if( pColumn ){
for(j=0; j<pColumn->nId && pColumn->a[j].idx!=i; j++){}