mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Change the way generated columns are computed so that no column is computed
inside branch code that might not be taken. Ticket [4fc08501f4e56692] FossilOrigin-Name: 9e07b48934e9a972dcf62e3538b3b21ffa044c553feba0441675ac0bbe13bcb2
This commit is contained in:
11
src/expr.c
11
src/expr.c
@@ -3645,16 +3645,7 @@ expr_code_doover:
|
||||
iSrc = sqlite3TableColumnToStorage(pTab, iCol) - pParse->iSelfTab;
|
||||
#ifndef SQLITE_OMIT_GENERATED_COLUMNS
|
||||
if( pCol->colFlags & COLFLAG_GENERATED ){
|
||||
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);
|
||||
sqlite3ExprCodeGeneratedColumn(pParse, pCol, iSrc);
|
||||
return iSrc;
|
||||
}else
|
||||
#endif /* SQLITE_OMIT_GENERATED_COLUMNS */
|
||||
|
||||
Reference in New Issue
Block a user