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

Bug fix with INSERT using an explicit column list on a table with

a non-final STORED column.

FossilOrigin-Name: 61b4459ae6a6cc182c11abbc8b1dd629f77beb088d7ccad5e563d8d4769056df
This commit is contained in:
drh
2019-10-17 18:07:22 +00:00
parent c143114460
commit d4cd292c2a
3 changed files with 9 additions and 9 deletions

View File

@@ -220,7 +220,7 @@ void sqlite3ComputeStoredColumns(
for(i=0; i<pTab->nCol; i++, iRegStore++){
u32 colFlags = pTab->aCol[i].colFlags;
if( (colFlags & COLFLAG_VIRTUAL)!=0 ){
/* Virtual columns are no stored */
/* Virtual columns are not stored */
iRegStore--;
}else if( (colFlags & COLFLAG_STORED)!=0 ){
/* Stored columns are handled on the second pass */
@@ -694,7 +694,7 @@ void sqlite3Insert(
** is appears in the original table. (The index of the INTEGER
** PRIMARY KEY in the original table is pTab->iPKey.)
*/
bIdListInOrder = (pTab->tabFlags & TF_OOOHidden)==0;
bIdListInOrder = (pTab->tabFlags & (TF_OOOHidden|TF_HasStored))==0;
if( pColumn ){
for(i=0; i<pColumn->nId; i++){
pColumn->a[i].idx = -1;