Joe Wilson <[EMAIL PROTECTED]> wrote: > Given an arbitrary SELECT in a parse tree that has been > resolved via sqlite3SelectResolve, and assuming that > Expr.op==TK_COLUMN does Expr.iTable always yield the > correct index into the Expr.pTab array in the same Expr > struct? >
No. When Expr.op==TK_COLUMN, Expr.iTable is the integer cursor number of that table in the virtual machine. For simple queries, where each table in the FROM clause maps to a cursor (no indices are used) then your assertion above might, by chance, turn out to be correct. But for most interesting queries it will not. -- D. Richard Hipp <[EMAIL PROTECTED]>