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

Make a copy of the expression that defines a value of a generated column

before sending it to the code generator routines.

FossilOrigin-Name: 03d201c041c17579e791c73fe6babd60b9f892a84ffd1470851f8eb2857d3990
This commit is contained in:
drh
2020-03-10 13:35:04 +00:00
parent 0c76e892d9
commit 24e399038b
3 changed files with 8 additions and 8 deletions

View File

@@ -3497,7 +3497,7 @@ void sqlite3ExprCodeGeneratedColumn(
}else{
iAddr = 0;
}
sqlite3ExprCode(pParse, pCol->pDflt, regOut);
sqlite3ExprCodeCopy(pParse, pCol->pDflt, regOut);
if( pCol->affinity>=SQLITE_AFF_TEXT ){
sqlite3VdbeAddOp4(v, OP_Affinity, regOut, 1, 0, &pCol->affinity, 1);
}