diff options
author | drh <drh@noemail.net> | 2017-01-16 16:43:02 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2017-01-16 16:43:02 +0000 |
commit | da060052e3d6436e5998f94bb7c92ce1a70d5004 (patch) | |
tree | c06f290718b4820dbcbc3c786ded97f8b888382b /src | |
parent | ce31643fd9d7989a90a6cd73d8b5dd4896e323eb (diff) | |
download | sqlite-da060052e3d6436e5998f94bb7c92ce1a70d5004.tar.gz sqlite-da060052e3d6436e5998f94bb7c92ce1a70d5004.zip |
Back out check-in [0b3174e0b1364c] and replace it with a better fix
for ticket [91e2e8ba6ff2e2] - a fix that does not cause the problem
identified by ticket [7ffd1ca1d2ad4ec].
FossilOrigin-Name: 0613665274346917f5482f9210bf0c60a0fed7d9
Diffstat (limited to 'src')
-rw-r--r-- | src/delete.c | 4 | ||||
-rw-r--r-- | src/update.c | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/delete.c b/src/delete.c index 1a5edb59d..1d3162223 100644 --- a/src/delete.c +++ b/src/delete.c @@ -873,6 +873,10 @@ int sqlite3GenerateIndexKey( } if( regOut ){ sqlite3VdbeAddOp3(v, OP_MakeRecord, regBase, nCol, regOut); + if( pIdx->pTable->pSelect ){ + const char *zAff = sqlite3IndexAffinityStr(pParse->db, pIdx); + sqlite3VdbeChangeP4(v, -1, zAff, P4_TRANSIENT); + } } sqlite3ReleaseTempRange(pParse, regBase, nCol); return regBase; diff --git a/src/update.c b/src/update.c index 8bdb740c1..45af001c3 100644 --- a/src/update.c +++ b/src/update.c @@ -71,12 +71,12 @@ void sqlite3ColumnDefault(Vdbe *v, Table *pTab, int i, int iReg){ if( pValue ){ sqlite3VdbeAppendP4(v, pValue, P4_MEM); } + } #ifndef SQLITE_OMIT_FLOATING_POINT - if( pTab->aCol[i].affinity==SQLITE_AFF_REAL ){ - sqlite3VdbeAddOp1(v, OP_RealAffinity, iReg); - } -#endif + if( pTab->aCol[i].affinity==SQLITE_AFF_REAL ){ + sqlite3VdbeAddOp1(v, OP_RealAffinity, iReg); } +#endif } /* |