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

Restore generated column loop detection logic that was incorrectly removed

from the previous check-in [9e07b48934e9a972].  This fixes ticket
[299b50ba812d8e54]

FossilOrigin-Name: 104a2beb57037f9353ffa77096aae0eb64e4682e667f31623bfd3d064dd8d881
This commit is contained in:
drh
2019-11-07 02:32:54 +00:00
parent dfa15270c4
commit 4e8e533bf7
4 changed files with 28 additions and 9 deletions

View File

@@ -3645,7 +3645,16 @@ expr_code_doover:
iSrc = sqlite3TableColumnToStorage(pTab, iCol) - pParse->iSelfTab;
#ifndef SQLITE_OMIT_GENERATED_COLUMNS
if( pCol->colFlags & COLFLAG_GENERATED ){
sqlite3ExprCodeGeneratedColumn(pParse, pCol, iSrc);
if( pCol->colFlags & COLFLAG_BUSY ){
sqlite3ErrorMsg(pParse, "generated column loop on \"%s\"",
pCol->zName);
return 0;
}
pCol->colFlags |= COLFLAG_BUSY;
if( pCol->colFlags & COLFLAG_NOTAVAIL ){
sqlite3ExprCodeGeneratedColumn(pParse, pCol, iSrc);
}
pCol->colFlags &= ~(COLFLAG_BUSY|COLFLAG_NOTAVAIL);
return iSrc;
}else
#endif /* SQLITE_OMIT_GENERATED_COLUMNS */