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

Fix problems with INSERT INTO ... SELECT ... statements that write to tables with __hidden__ columns.

FossilOrigin-Name: 59bd0ec7d4327852ee8c0206b2c59d0a12484db8
This commit is contained in:
dan
2015-11-19 16:46:46 +00:00
parent 1a1d3cd2f3
commit ba68f8f3f5
7 changed files with 51 additions and 17 deletions

View File

@@ -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 */
}