mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-10 01:02:56 +03:00
Expression errors in generated columns should not generate non-negative
sqlite3_error_offset() returns. Second of two defenses against [33aa4c0de8a62e33]. FossilOrigin-Name: 2adb4e0dda471ffc9b2a5cbad01b6c2bc6091b7526a8c8b19944cb2d4a5111e7
This commit is contained in:
@@ -3841,6 +3841,7 @@ void sqlite3ExprCodeGeneratedColumn(
|
||||
Vdbe *v = pParse->pVdbe;
|
||||
assert( v!=0 );
|
||||
assert( pParse->iSelfTab!=0 );
|
||||
if( pParse->nErr ) return;
|
||||
if( pParse->iSelfTab>0 ){
|
||||
iAddr = sqlite3VdbeAddOp3(v, OP_IfNullRow, pParse->iSelfTab-1, 0, regOut);
|
||||
}else{
|
||||
@@ -3851,6 +3852,7 @@ void sqlite3ExprCodeGeneratedColumn(
|
||||
sqlite3VdbeAddOp4(v, OP_Affinity, regOut, 1, 0, &pCol->affinity, 1);
|
||||
}
|
||||
if( iAddr ) sqlite3VdbeJumpHere(v, iAddr);
|
||||
pParse->db->errByteOffset = -1;
|
||||
}
|
||||
#endif /* SQLITE_OMIT_GENERATED_COLUMNS */
|
||||
|
||||
|
Reference in New Issue
Block a user