mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-12 23:22:53 +03:00
In expression nodes of type REGISTER with sub-type COLUMN, ensure that the
iColumn field is set correctly, as otherwise the "IS NULL" operator might be incorrectly optimized. Fix for the problem described by [forum:/forumpost/d010a26798915b53|forum post d010a26798915b53]. FossilOrigin-Name: 0819a1869a39d54a405259ea323365506a182962a02affdef16a03446005da64
This commit is contained in:
@@ -506,6 +506,7 @@ static int lookupName(
|
||||
if( pParse->bReturning ){
|
||||
eNewExprOp = TK_REGISTER;
|
||||
pExpr->op2 = TK_COLUMN;
|
||||
pExpr->iColumn = iCol;
|
||||
pExpr->iTable = pNC->uNC.iBaseReg + (pTab->nCol+1)*pExpr->iTable +
|
||||
sqlite3TableColumnToStorage(pTab, iCol) + 1;
|
||||
}else{
|
||||
|
Reference in New Issue
Block a user