1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Bring comments on the INSERT code generator up-to-date. Fix the INSERT code

generator so that it correctly handles inserts from a SELECT into a virtual
table with non-terminal hidden columns.

FossilOrigin-Name: 4ac81fac6c6302c042be3df493a41630b733fff0
This commit is contained in:
drh
2015-04-19 18:32:43 +00:00
parent 816070cf5c
commit a21f78b93f
6 changed files with 61 additions and 31 deletions

View File

@@ -559,6 +559,7 @@ static int vtabCallConstructor(
rc = SQLITE_ERROR;
}else{
int iCol;
u8 oooHidden = 0;
/* If everything went according to plan, link the new VTable structure
** into the linked list headed by pTab->pVTable. Then loop through the
** columns of the table to see if any of them contain the token "hidden".
@@ -571,7 +572,10 @@ static int vtabCallConstructor(
char *zType = pTab->aCol[iCol].zType;
int nType;
int i = 0;
if( !zType ) continue;
if( !zType ){
pTab->tabFlags |= oooHidden;
continue;
}
nType = sqlite3Strlen30(zType);
if( sqlite3StrNICmp("hidden", zType, 6)||(zType[6] && zType[6]!=' ') ){
for(i=0; i<nType; i++){
@@ -594,6 +598,9 @@ static int vtabCallConstructor(
zType[i-1] = '\0';
}
pTab->aCol[iCol].colFlags |= COLFLAG_HIDDEN;
oooHidden = TF_OOOHidden;
}else{
pTab->tabFlags |= oooHidden;
}
}
}