Skip to content

Commit

Permalink
Fixed: failed to parse WHERE / GROUP BY clauses in a SELECT statement…
Browse files Browse the repository at this point in the history
… without a FROM table (pingcap#587)
  • Loading branch information
zhenghaoz authored and tangenta committed Oct 27, 2019
1 parent fad2389 commit 8f42cd7
Show file tree
Hide file tree
Showing 3 changed files with 3,282 additions and 3,332 deletions.
3 changes: 0 additions & 3 deletions ast/dml.go
Original file line number Diff line number Diff line change
Expand Up @@ -864,9 +864,6 @@ func (n *SelectStmt) Restore(ctx *RestoreCtx) error {
}
}

if n.From == nil && n.Where != nil {
ctx.WriteKeyWord(" FROM DUAL")
}
if n.Where != nil {
ctx.WriteKeyWord(" WHERE ")
if err := n.Where.Restore(ctx); err != nil {
Expand Down
Loading

0 comments on commit 8f42cd7

Please sign in to comment.