Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 7872 invoked from network); 7 Jul 2009 21:44:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Jul 2009 21:44:27 -0000 Received: (qmail 684 invoked by uid 500); 7 Jul 2009 21:44:37 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 610 invoked by uid 500); 7 Jul 2009 21:44:37 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 599 invoked by uid 99); 7 Jul 2009 21:44:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jul 2009 21:44:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jul 2009 21:44:35 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 226F6234C1E6 for ; Tue, 7 Jul 2009 14:44:15 -0700 (PDT) Message-ID: <881889455.1247003055140.JavaMail.jira@brutus> Date: Tue, 7 Jul 2009 14:44:15 -0700 (PDT) From: "Suran Jayathilaka (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-712) Support for sequences In-Reply-To: <665694319.1132200569950.JavaMail.jira@ajax.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12728376#action_12728376 ] Suran Jayathilaka commented on DERBY-712: ----------------------------------------- Hi Rick, Thanks for fixing the patch. I made those changes in dropAllPermDescriptors() and the uniqueness array in my own code (which I think are the only 2 places that needed to be changed?). I added the following in DD_Version.doFullUpgrade(). -------------------------------------------------------------------------- if (fromMajorVersionNumber <= DataDictionary.DD_VERSION_DERBY_10_5) { // On ugrade from versions before 10.6, create system procedures // added in 10.6. bootingDictionary.create_10_6_system_procedures(tc, newlyCreatedRoutines); // On upgrade from versions before 10.6, create system catalogs // added in 10.6 bootingDictionary.upgradeMakeCatalog( tc, DataDictionary.SYSSEQUENCES_CATALOG_NUM); bootingDictionary.upgradeMakeCatalog( tc, DataDictionary.SYSPERMS_CATALOG_NUM); } ----------------------------------------------------------------------------- When I ran upgrade tests with 10.5.1.1. as the sole old release, I did see the test failures you ran into. >java -XX:MaxPermSize=128M -Xmx512m -DderbyTesting.oldReleasePath=D:/projects/derby-trunk/tests/old-rels junit.textui.TestRunner org.apache.derbyTesting.functionTests.tests.upgradeTests._Suite ... ... ALARM: Non-existing location for jar files: 'D:/projects/derby-trunk/tests/old-rels\10.4.2.0'. Upgrade tests can NOT be run! ...............E...............E..E.E........ .......................E.................. ................. Time: 78.156 There were 5 errors: 1) testGetTablesModify(org.apache.derbyTesting.functionTests.tests.jdbcapi.DatabaseMetaDataTest)java.sql.SQLException: The conglomerate (-1) requested does not exist. at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:95) at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:201) at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:391) at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:346) at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2201) at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:81) at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1323) at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:625) at org.apache.derby.impl.jdbc.EmbedStatement.executeUpdate(EmbedStatement.java:175) at org.apache.derbyTesting.junit.JDBC.dropSchema(JDBC.java:323) at org.apache.derbyTesting.functionTests.tests.jdbcapi.DatabaseMetaDataTest.tearDown(DatabaseMetaDataTest.java:184) at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:109) at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24) at junit.extensions.TestSetup$1.protect(TestSetup.java:21) ... Tests run: 99, Failures: 0, Errors: 5 I can't figure out what's causing this failure, which I think is causing the remaining failures in turn. > Support for sequences > --------------------- > > Key: DERBY-712 > URL: https://issues.apache.org/jira/browse/DERBY-712 > Project: Derby > Issue Type: Improvement > Components: SQL > Environment: feature request > Reporter: Tony Dahbura > Assignee: Suran Jayathilaka > Fix For: 10.6.0.0 > > Attachments: altertable.diff, catalogs_a.patch, catalogs_b.patch, catalogs_c.patch, catalogs_d.patch, catalogs_e.patch, catalogs_f.patch, catalogs_f_2.patch, catalogs_g.diff, SequenceGenerator.html > > > Would like to see support added for sequences. This would permit a select against the sequence to always obtain a ever increasing/decreasing value. The identity column works fine but there are times for applications where the application needs to obtain the sequence number and use it prior to the database write. Subsequent calls to the table/column would result in a new number on each call. > SQL such as the following: > SELECT NEXT VALUE FOR sequence_name FROM sometable ; would result in a next value. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.