[ http://issues.apache.org/jira/browse/DERBY-331?page=all ]
Dag H. Wanvik updated DERBY-331:
--------------------------------
Attachment: 331.stat
331.diff
This patch fixes a look-ahead problem in the parser: In the method
DB2DefaultOption,
the look-ahead for miscBuiltins is too liberal: it mistakenly thinks it has
found a
builtin in this case. I made the look-ahead more specific by adding a check
against comma.
I have extended the test lang/columnDefaults.sql with this case.
I have run derbyall with no errors.
> create table fails when a constraint defintion follows a column default
> -----------------------------------------------------------------------
>
> Key: DERBY-331
> URL: http://issues.apache.org/jira/browse/DERBY-331
> Project: Derby
> Type: Bug
> Components: SQL
> Versions: 10.0.2.1
> Environment: Windows XP
> Reporter: Gin Ng
> Assignee: Dag H. Wanvik
> Priority: Minor
> Attachments: 331.diff, 331.stat
>
> The following statement fails with syntax error.
> ij> create table t (a int not null, b int default 0, unique (a));
> ERROR 42X01: Syntax error: Encountered "0" at line 1, column 47.
> And it will work if I remove either default 0 or unique(a).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira