db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mamta Satoor" <msat...@gmail.com>
Subject [PATCH}DERBY-1327:Identity column can be created with wrong and very large start with value
Date Thu, 08 Jun 2006 15:51:48 GMT
Hi,

DERBY-1327 can cause system tables to have incorrect start with values for
new tables as well as existing tables.

The fix for this would be to reduce the number of parameters required by the
constructor to <=10 in
org.apache.derby.iapi.sql.dictionary.ColumnDescriptorclass. While
researching into this, I found that all the 3 constructors in
the class have a parameter named autoinc and it is defined as a boolean.
This parameter is always equal to (parameter named autoincInc != 0). In my
patch which is attached to the JIRA, I have removed the autoinc parameter
and inside the constructors, I use (parameter named autoincInc != 0) instead
of relying on autoinc. This cleans up the constructor parameter passing for
all the 3 constructors and also brings down the number of parameters to
<=10. The test program from the JIRA entry runs fine with this change and I
have created a new test JitTest.java based on that test program. Hopefully
this test can be a place holder for any future JIT issues. I also ran the
test suites and there were no new failures.
The patch, Derby1327WrongStartKeyPatch1CodelineTrunk.txt, is for the main
codeline. If it looks good and there are no comments on it, I can submit
similar patch for 10.1 codeline as well. So, if the changes look good, can a
committer please commit it? As a cleanup, I also removed the import of
org.apache.derby.iapi.sql.dictionary.ColumnDescriptor from some classes
which didn't really use ColumnDescriptor.

svn stat
M java\engine\org\apache\derby\impl\sql\compile\FromSubquery.java
M java\engine\org\apache\derby\impl\sql\compile\CallStatementNode.java
M java\engine\org\apache\derby\impl\sql\compile\UpdateNode.java
M java\engine\org\apache\derby\impl\sql\compile\FromList.java
M java\engine\org\apache\derby\impl\sql\compile\InsertNode.java
M java\engine\org\apache\derby\impl\sql\compile\SubqueryList.java
M java\engine\org\apache\derby\impl\sql\compile\ResultColumnList.java
M
java\engine\org\apache\derby\impl\sql\execute\WriteCursorConstantAction.java
M java\engine\org\apache\derby\impl\sql\execute\GenericResultSetFactory.java
M
java\engine\org\apache\derby\impl\sql\execute\DropSchemaConstantAction.java
M
java\engine\org\apache\derby\impl\sql\execute\CreateTableConstantAction.java
M
java\engine\org\apache\derby\impl\sql\execute\CreateViewConstantAction.java
M java\engine\org\apache\derby\impl\sql\execute\IndexConstantAction.java
M
java\engine\org\apache\derby\impl\sql\execute\DropConstraintConstantAction.java
M
java\engine\org\apache\derby\impl\sql\execute\SetConstraintsConstantAction.java
M java\engine\org\apache\derby\impl\sql\execute\InsertConstantAction.java
M java\engine\org\apache\derby\impl\sql\execute\DropViewConstantAction.java
M
java\engine\org\apache\derby\impl\sql\execute\ConstraintConstantAction.java
M java\engine\org\apache\derby\impl\sql\execute\DropIndexConstantAction.java
M
java\engine\org\apache\derby\impl\sql\execute\AlterTableConstantAction.java
M java\engine\org\apache\derby\impl\sql\catalog\SYSCOLUMNSRowFactory.java
M java\engine\org\apache\derby\impl\sql\catalog\DataDictionaryImpl.java
M java\engine\org\apache\derby\impl\sql\catalog\SYSFILESRowFactory.java
M java\engine\org\apache\derby\iapi\sql\conn\LanguageConnectionContext.java
M java\engine\org\apache\derby\iapi\sql\dictionary\ColumnDescriptor.java
A java\testing\org\apache\derbyTesting\functionTests\tests\lang\JitTest.java
A java\testing\org\apache\derbyTesting\functionTests\master\JitTest.out
M java\testing\org\apache\derbyTesting\functionTests\suites\derbylang.runall

thanks,
Mamta

Mime
View raw message