diff options
author | dan <dan@noemail.net> | 2015-11-19 16:46:46 +0000 |
---|---|---|
committer | dan <dan@noemail.net> | 2015-11-19 16:46:46 +0000 |
commit | ba68f8f3f58437deaea3d1bb26ca44a09faa837f (patch) | |
tree | f7a467d0f485237899e50cc52e3000bcda160fa5 /src/insert.c | |
parent | 1a1d3cd2f3b9d9dadf50fe84c839e7d7c8b00488 (diff) | |
download | sqlite-ba68f8f3f58437deaea3d1bb26ca44a09faa837f.tar.gz sqlite-ba68f8f3f58437deaea3d1bb26ca44a09faa837f.zip |
Fix problems with INSERT INTO ... SELECT ... statements that write to tables with __hidden__ columns.
FossilOrigin-Name: 59bd0ec7d4327852ee8c0206b2c59d0a12484db8
Diffstat (limited to 'src/insert.c')
-rw-r--r-- | src/insert.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/insert.c b/src/insert.c index 618b2dee7..4b8ed2210 100644 --- a/src/insert.c +++ b/src/insert.c @@ -1909,6 +1909,11 @@ static int xferOptimization( for(i=0; i<pDest->nCol; i++){ Column *pDestCol = &pDest->aCol[i]; Column *pSrcCol = &pSrc->aCol[i]; +#ifdef SQLITE_ENABLE_HIDDEN_COLUMNS + if( (pDestCol->colFlags | pSrcCol->colFlags) & COLFLAG_HIDDEN ){ + return 0; /* Neither table may have __hidden__ columns */ + } +#endif if( pDestCol->affinity!=pSrcCol->affinity ){ return 0; /* Affinity must be the same on all columns */ } |