db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@debrunners.com>
Subject Re: DERBY-167 has done but ...
Date Thu, 05 May 2005 18:02:33 GMT
TomohitoNakayama wrote:

> Hello.
> I think coding for solution-1 of DERBY-167 has done.
> I attach patch file to this mail for others to confirm it.

There seems to be a lot of code re-formatting in this patch. This makes
it much harder for the reviewers to see the actual changes. For example
are there any real changes to TableElementList.java or is it just
re-formatting? This seems to be the case with several files. Try to
avoid re-formatting code while making changes.

For the upgrade check, the string passed should not include the bug
number, just the syntax being disallowed.

+               checkVersion(DataDictionary.DD_VERSION_DERBY_10_1,
+                            "GENERATED BY DEFAULT");

The creation of the DefaultNode needs to go through the factory,
nodeFactory.getNode(...) like all the other nodes.

In sqlgrammar.jj you increase the size of the long[] autoIncrementInfo
but don't seem to use the extra space.

The assigning of 'value' in the GENERATED rule in sqlgrammar.jj seems to
be wrong. It seems if the DEFAULT option is there it is set to a
DefaultNode, but that will be overwritten if the optional START BY or
INCREMENT BY are used.

Some more testing would be good:

- do inserts into t2 without giving a value for T2_AUTOGEN continue to
work after the insert that provided a value.

- test BY DEFAULT with the INCREMENT/START BY options, I think that
would have exposed the value assignment bug in sqlgrammar.jj

- what happens if there is a primary key, unique index or unique
constraint on the column and user value is provided that matches the
next automatically generated value.


View raw message