From dfee11339e82d29d73f172646a15b1174fb4a625 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Thu, 9 Feb 2017 10:31:53 +0000 Subject: [PATCH] Fix SQL bug where NAMESPACE/DATABASE were needed twice DEFINE NAMESPACE and REMOVE NAMESPACE statements expected two NAMESPACE keywords in the SQL query. DEFINE DATABASE and REMOVE DATABASE statements expected two DATABASE keywords in the SQL query. --- sql/database.go | 8 -------- sql/namespace.go | 8 -------- 2 files changed, 16 deletions(-) diff --git a/sql/database.go b/sql/database.go index 5b10b9c4..9b884e87 100644 --- a/sql/database.go +++ b/sql/database.go @@ -22,10 +22,6 @@ func (p *parser) parseDefineDatabaseStatement() (stmt *DefineDatabaseStatement, return nil, err } - if _, _, err = p.shouldBe(DATABASE); err != nil { - return nil, err - } - if stmt.Name, err = p.parseName(); err != nil { return nil, err } @@ -42,10 +38,6 @@ func (p *parser) parseRemoveDatabaseStatement() (stmt *RemoveDatabaseStatement, return nil, err } - if _, _, err = p.shouldBe(DATABASE); err != nil { - return nil, err - } - if stmt.Name, err = p.parseName(); err != nil { return nil, err } diff --git a/sql/namespace.go b/sql/namespace.go index 7dece959..f7c18aba 100644 --- a/sql/namespace.go +++ b/sql/namespace.go @@ -22,10 +22,6 @@ func (p *parser) parseDefineNamespaceStatement() (stmt *DefineNamespaceStatement return nil, err } - if _, _, err = p.shouldBe(NAMESPACE); err != nil { - return nil, err - } - if stmt.Name, err = p.parseName(); err != nil { return nil, err } @@ -42,10 +38,6 @@ func (p *parser) parseRemoveNamespaceStatement() (stmt *RemoveNamespaceStatement return nil, err } - if _, _, err = p.shouldBe(NAMESPACE); err != nil { - return nil, err - } - if stmt.Name, err = p.parseName(); err != nil { return nil, err }