diff options
author | drh <drh@noemail.net> | 2019-10-19 13:29:10 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2019-10-19 13:29:10 +0000 |
commit | b9bcf7ca600ab8a94018adc2eac4115441a09d89 (patch) | |
tree | 320096c64bdaaa2b5d9b1ca19ff3db9413b7adfe /src/insert.c | |
parent | f95909c7648942e7157722c33b5e5f9293bf3436 (diff) | |
download | sqlite-b9bcf7ca600ab8a94018adc2eac4115441a09d89.tar.gz sqlite-b9bcf7ca600ab8a94018adc2eac4115441a09d89.zip |
Refactor names of column index transformation functions, for clarity.
Get generated columns working with ALTER TABLE RENAME COLUMN.
FossilOrigin-Name: 27ab41c9102e7801ff829488fc123a8040da008bef373d6704efbe2f93e1da90
Diffstat (limited to 'src/insert.c')
-rw-r--r-- | src/insert.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/insert.c b/src/insert.c index fe275d5a0..88b8e6ad2 100644 --- a/src/insert.c +++ b/src/insert.c @@ -1055,7 +1055,7 @@ void sqlite3Insert( int k; u32 colFlags; assert( i>=nHidden ); - assert( iRegStore==sqlite3ColumnOfTable(pTab,i)+regRowid+1 ); + assert( iRegStore==sqlite3TableColumnToStorage(pTab,i)+regRowid+1 ); if( i==pTab->iPKey ){ /* The value of the INTEGER PRIMARY KEY column is always a NULL. ** Whenever this column is read, the rowid will be substituted @@ -1464,7 +1464,7 @@ void sqlite3GenerateConstraintChecks( pParse->iSelfTab = 0; if( onError==OE_Replace ) onError = OE_Abort; }else{ - iReg = sqlite3ColumnOfTable(pTab, i) + regNewData + 1; + iReg = sqlite3TableColumnToStorage(pTab, i) + regNewData + 1; } switch( onError ){ case OE_Replace: { @@ -1782,7 +1782,7 @@ void sqlite3GenerateConstraintChecks( VdbeComment((v, "%s column %d", pIdx->zName, i)); #endif }else{ - x = sqlite3ColumnOfTable(pTab, iField) + regNewData + 1; + x = sqlite3TableColumnToStorage(pTab, iField) + regNewData + 1; sqlite3VdbeAddOp2(v, OP_SCopy, x, regIdx+i); VdbeComment((v, "%s", pTab->aCol[iField].zName)); } @@ -1873,7 +1873,7 @@ void sqlite3GenerateConstraintChecks( if( pIdx!=pPk ){ for(i=0; i<pPk->nKeyCol; i++){ assert( pPk->aiColumn[i]>=0 ); - x = sqlite3ColumnOfIndex(pIdx, pPk->aiColumn[i]); + x = sqlite3TableColumnToIndex(pIdx, pPk->aiColumn[i]); sqlite3VdbeAddOp3(v, OP_Column, iThisCur, x, regR+i); VdbeComment((v, "%s.%s", pTab->zName, pTab->aCol[pPk->aiColumn[i]].zName)); |