mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Fix issues with quering from an auxiliary index that must refer back to the
PRIMARY KEY index of a WITHOUT ROWID table. FossilOrigin-Name: cff1f55c52ff57557d9b728a5cd830a367091794
This commit is contained in:
@@ -2222,7 +2222,11 @@ void sqlite3ExprCodeGetColumnOfTable(
|
||||
sqlite3VdbeAddOp2(v, OP_Rowid, iTabCur, regOut);
|
||||
}else{
|
||||
int op = IsVirtual(pTab) ? OP_VColumn : OP_Column;
|
||||
sqlite3VdbeAddOp3(v, op, iTabCur, iCol, regOut);
|
||||
int x = iCol;
|
||||
if( !HasRowid(pTab) ){
|
||||
x = sqlite3ColumnOfIndex(sqlite3PrimaryKeyIndex(pTab), iCol);
|
||||
}
|
||||
sqlite3VdbeAddOp3(v, op, iTabCur, x, regOut);
|
||||
}
|
||||
if( iCol>=0 ){
|
||||
sqlite3ColumnDefault(v, pTab, iCol, regOut);
|
||||
|
||||
Reference in New Issue
Block a user