Commit 176d53f8 authored by Don Brower's avatar Don Brower

Use physical columns when constructing index list

There is an invariant that simple index n+1 is for physical column n.
The difference between the physical column list and the logical column
list only appears when a column is dropped.

Fixes #187
parent e802d322
......@@ -985,7 +985,7 @@ func (db *DB) createIndex2() error {
expr := "id()"
if i != 0 {
expr = t.cols[i-1].name
expr = t.cols0[i-1].name
}
if err := db.insertIndex2(t.name, index.name, []string{expr}, index.unique, true, index.xroot); err != nil {
......
......@@ -8446,3 +8446,8 @@ SELECT * FROM t ORDER BY á;
┌Order by á,
└Output field names ["á"]
---- 1355
SELECT * FROM t;
┌Iterate all rows of table "t"
└Output field names ["c"]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment