fix test case to handle absense of expr

parent ac6b6a9c
......@@ -26,6 +26,7 @@ import (
"time"
"github.com/cznic/strutil"
"github.com/kr/pretty"
)
// Note: All benchmarks report MB/s equal to record/s.
......@@ -2754,7 +2755,7 @@ func testMentionedColumns(s stmt) (err error) {
case error:
err = x
default:
err = fmt.Errorf("error: %v", e)
err = fmt.Errorf("error: %v\n%s", e, pretty.Sprint(s))
}
}
}()
......@@ -2802,7 +2803,14 @@ func testMentionedColumns(s stmt) (err error) {
}
}
if w := x.where; w != nil {
mentionedColumns(w.expr)
if e := w.expr; e != nil {
mentionedColumns(w.expr)
}
if s := w.sel; s != nil {
if err := testMentionedColumns(s); err != nil {
return err
}
}
}
case *updateStmt:
for _, v := range x.list {
......
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