code: func (parser *Parser) ParseOneStmt(sql, charset, collation string) (ast.StmtNode, error) {
  	stmts, err := parser.Parse(sql, charset, collation)
  	if err != nil {
  		return nil, errors.Trace(err)
  	}
  	if len(stmts) != 1 {
  		return nil, ErrSyntax
  	}
  	ast.SetFlag(stmts[0])
  	return stmts[0], nil
  }
docs: // ParseOneStmt parses a query and returns an ast.StmtNode.
  // The query must have one statement, otherwise ErrSyntax is returned.