grammar: Parse columns with explicit NULL (un-)constraint correctly

Table definitions like these wouldn't work before:
CREATE TABLE test(
    a int NOT NULL,    -- This worked fine
    b int NULL         -- This didn't but does now.
);

See issue #741.
This commit is contained in:
Martin Kleusberg
2017-01-05 22:41:51 +01:00
parent 99a5d02925
commit 94849fccf2

View File

@@ -739,6 +739,11 @@ void CreateTableWalker::parsecolumn(Table& table, antlr::RefAST c)
notnull = true;
}
break;
case sqlite3TokenTypes::NULL_T:
{
notnull = false;
}
break;
case sqlite3TokenTypes::CHECK:
{
con = con->getNextSibling(); //LPAREN