aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordrh <>2023-03-20 01:55:39 +0000
committerdrh <>2023-03-20 01:55:39 +0000
commit6263cefcf5d236f8d1ed1a6b997ed858b6c8dc4b (patch)
tree8ae189082d14e33f41f5ce39acb8cff067d37950 /src/expr.c
parent715963f1ba3c173a7145858e5ee2461fc8431660 (diff)
downloadsqlite-6263cefcf5d236f8d1ed1a6b997ed858b6c8dc4b.tar.gz
sqlite-6263cefcf5d236f8d1ed1a6b997ed858b6c8dc4b.zip
A better fix for the sqlite3_error_offset() problem on generated columns.
FossilOrigin-Name: 770b3e67c89ca16b08a9234acb626917a26ea414b3bc0340f9601644cb7504f2
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/expr.c b/src/expr.c
index ac6f53872..0a52e6230 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -3839,10 +3839,10 @@ void sqlite3ExprCodeGeneratedColumn(
){
int iAddr;
Vdbe *v = pParse->pVdbe;
+ int nErr = pParse->nErr;
assert( v!=0 );
assert( pParse->iSelfTab!=0 );
- if( pParse->nErr ) return;
- if( pParse->iSelfTab>0 ){
+ if( pParse->iSelfTab>0 ){
iAddr = sqlite3VdbeAddOp3(v, OP_IfNullRow, pParse->iSelfTab-1, 0, regOut);
}else{
iAddr = 0;
@@ -3852,7 +3852,7 @@ void sqlite3ExprCodeGeneratedColumn(
sqlite3VdbeAddOp4(v, OP_Affinity, regOut, 1, 0, &pCol->affinity, 1);
}
if( iAddr ) sqlite3VdbeJumpHere(v, iAddr);
- pParse->db->errByteOffset = -1;
+ if( pParse->nErr>nErr ) pParse->db->errByteOffset = -1;
}
#endif /* SQLITE_OMIT_GENERATED_COLUMNS */