Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 37026 invoked from network); 9 Mar 2005 16:55:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 9 Mar 2005 16:55:27 -0000 Received: (qmail 76625 invoked by uid 500); 9 Mar 2005 16:55:26 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 76595 invoked by uid 500); 9 Mar 2005 16:55:26 -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: "Derby Development" Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 76582 invoked by uid 99); 9 Mar 2005 16:55:25 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of msatoor@gmail.com designates 64.233.184.196 as permitted sender) Received: from wproxy.gmail.com (HELO wproxy.gmail.com) (64.233.184.196) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 09 Mar 2005 08:55:25 -0800 Received: by wproxy.gmail.com with SMTP id 58so281916wri for ; Wed, 09 Mar 2005 08:55:22 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:references; b=fG5TD+77G6qV5SUpiR7ToWk8njsYmlGfadfDYwG56mzZGIG+QWwgjI5WgrtilfwuO0ifIl+YZxNBZJebvIqu4PSBYCgcvMybeLwzSJ4h4DcxRFJQpXBUfYYEFsYCeJMMRz3Sy/V7e5DneygkodJBTCen1gVGHFYcrIHRPnV8sBg= Received: by 10.54.4.8 with SMTP id 8mr952616wrd; Wed, 09 Mar 2005 08:55:22 -0800 (PST) Received: by 10.54.49.63 with HTTP; Wed, 9 Mar 2005 08:55:22 -0800 (PST) Message-ID: Date: Wed, 9 Mar 2005 08:55:22 -0800 From: Mamta Satoor Reply-To: Mamta Satoor To: Derby Development Subject: [PATCH] (DERBY-169) DatabaseMetaData calls related to changes made by others return incorrect values in Network Server mode. In-Reply-To: <978589343.1110354112497.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1935_15907117.1110387322306" References: <978589343.1110354112497.JavaMail.jira@ajax.apache.org> X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------=_Part_1935_15907117.1110387322306 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline On Wed, 9 Mar 2005 08:41:52 +0100 (CET), Mamta A. Satoor (JIRA) wrote: > DatabaseMetaData calls related to changes made by others return incorrect values in Network Server mode. > -------------------------------------------------------------------------------------------------------- > > Key: DERBY-169 > URL: http://issues.apache.org/jira/browse/DERBY-169 > Project: Derby > Type: Bug > Components: Network Server > Versions: 10.0.2.1 > Reporter: Mamta A. Satoor > Assigned to: Mamta A. Satoor > > I am working on getting updatable resultsets to work under Network Server mode. While running the test lang/updatableResultSet.java in Network Server mode, I came across following issue. DatabaseMetaData among other methods has 3 methods, othersUpdatesAreVisible, othersDeletesAreVisible and othersInsertsAreVisible. These 3 methods currently return true for TYPE_SCROLL_INSENSITIVE and TYPE_SCROLL_SENSITIVE when running in Network Server mode. They should be returning false for TYPE_SCROLL_INSENSITIVE and TYPE_SCROLL_SENSITIVE. The reason for that is > Derby does not yet implement scroll sensitive ResultSets and hence the 3 metadata calls mentioned above should return false. Also, scroll insensitive ResultSets by their definition do not see changes made by others and hence the 3 metadata calls should return false. > > The fix for this is very easy and requires changes in apache\derby\impl\sql\catalog\metadata_net.properties. > > -- > 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 > - > If you want more information on JIRA, or have a bug to report see: > http://www.atlassian.com/software/jira > > Here is a very simple fix for the bug with the tests, I have run the test suites and the fix hasn't caused any failures. svn stat output M java\engine\org\apache\derby\impl\sql\catalog\metadata_net.properties M java\testing\org\apache\derbyTesting\functionTests\tests\jdbcapi\metadataJdbc20.java M java\testing\org\apache\derbyTesting\functionTests\master\DerbyNet\metadataJdbc20.out M java\testing\org\apache\derbyTesting\functionTests\master\metadataJdbc20.out M java\testing\org\apache\derbyTesting\functionTests\master\DerbyNetClient\metadataJdbc20.out Thanks, Mamta ------=_Part_1935_15907117.1110387322306 Content-Type: text/plain; name="diff030805.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="diff030805.txt" Index: java/engine/org/apache/derby/impl/sql/catalog/metadata_net.propertie= s =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- java/engine/org/apache/derby/impl/sql/catalog/metadata_net.properties= =09(revision 156618) +++ java/engine/org/apache/derby/impl/sql/catalog/metadata_net.properties= =09(working copy) @@ -298,9 +298,9 @@ =09'',\ =09'',\ =09'',\ -=09'1003,1004,1005',\ -=09'1003,1004,1005',\ -=09'1003,1004,1005',\ +=09'1003',\ +=09'1003',\ +=09'1003',\ =09'',\ =09'',\ =09'',\ Index: java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/met= adataJdbc20.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/metada= taJdbc20.java=09(revision 156618) +++ java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/metada= taJdbc20.java=09(working copy) @@ -88,6 +88,21 @@ =09=09=09userNamedTypes[1] =3D java.sql.Types.STRUCT; =09=09=09dumpRS(met.getUDTs("a", null, null, userNamedTypes)); =20 +=09=09=09System.out.println("Test the metadata calls related to visibility= of changes made by others for different resultset types"); +=09=09=09System.out.println("Since Derby materializes a forward only Resul= tSet incrementally, it is possible to see changes"); +=09=09=09System.out.println("made by others and hence following 3 metadata= calls will return true for forward only ResultSets."); +=09=09=09System.out.println("othersUpdatesAreVisible(ResultSet.TYPE_FORWAR= D_ONLY)? " + met.othersUpdatesAreVisible(ResultSet.TYPE_FORWARD_ONLY)); +=09=09=09System.out.println("othersDeletesAreVisible(ResultSet.TYPE_FORWAR= D_ONLY)? " + met.othersDeletesAreVisible(ResultSet.TYPE_FORWARD_ONLY)); +=09=09=09System.out.println("othersInsertsAreVisible(ResultSet.TYPE_FORWAR= D_ONLY)? " + met.othersInsertsAreVisible(ResultSet.TYPE_FORWARD_ONLY)); +=09=09=09System.out.println("Scroll insensitive ResultSet by their definit= ion do not see changes made by others and hence following metadata calls re= turn false"); +=09=09=09System.out.println("othersUpdatesAreVisible(ResultSet.TYPE_SCROLL= _INSENSITIVE)? " + met.othersUpdatesAreVisible(ResultSet.TYPE_SCROLL_INSENS= ITIVE)); +=09=09=09System.out.println("othersDeletesAreVisible(ResultSet.TYPE_SCROLL= _INSENSITIVE)? " + met.othersDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENS= ITIVE)); +=09=09=09System.out.println("othersInsertsAreVisible(ResultSet.TYPE_SCROLL= _INSENSITIVE)? " + met.othersInsertsAreVisible(ResultSet.TYPE_SCROLL_INSENS= ITIVE)); +=09=09=09System.out.println("Derby does not yet implement scroll sensitive= resultsets and hence following metadata calls return false"); +=09=09=09System.out.println("othersUpdatesAreVisible(ResultSet.TYPE_SCROLL= _SENSITIVE)? " + met.othersUpdatesAreVisible(ResultSet.TYPE_SCROLL_SENSITIV= E)); +=09=09=09System.out.println("othersDeletesAreVisible(ResultSet.TYPE_SCROLL= _SENSITIVE)? " + met.othersDeletesAreVisible(ResultSet.TYPE_SCROLL_SENSITIV= E)); +=09=09=09System.out.println("othersInsertsAreVisible(ResultSet.TYPE_SCROLL= _SENSITIVE)? " + met.othersInsertsAreVisible(ResultSet.TYPE_SCROLL_SENSITIV= E)); + =09=09=09s.close(); =20 =09=09=09con.close(); Index: java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/m= etadataJdbc20.out =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/meta= dataJdbc20.out=09(revision 156618) +++ java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/meta= dataJdbc20.out=09(working copy) @@ -11,4 +11,18 @@ TYPE_CAT,TYPE_SCHEM,TYPE_NAME,CLASS_NAME,DATA_TYPE,REMARKS getUDTs() with user-named types in ('JAVA_OBJECT', 'STRUCT') : TYPE_CAT,TYPE_SCHEM,TYPE_NAME,CLASS_NAME,DATA_TYPE,REMARKS +Test the metadata calls related to visibility of changes made by others fo= r different resultset types +Since Derby materializes a forward only ResultSet incrementally, it is pos= sible to see changes +made by others and hence following 3 metadata calls will return true for f= orward only ResultSets. +othersUpdatesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? true +othersDeletesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? true +othersInsertsAreVisible(ResultSet.TYPE_FORWARD_ONLY)? true +Scroll insensitive ResultSet by their definition do not see changes made b= y others and hence following metadata calls return false +othersUpdatesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false +othersDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false +othersInsertsAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false +Derby does not yet implement scroll sensitive resultsets and hence followi= ng metadata calls return false +othersUpdatesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false +othersDeletesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false +othersInsertsAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false Test metadataJdbc20 finished Index: java/testing/org/apache/derbyTesting/functionTests/master/metadataJd= bc20.out =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- java/testing/org/apache/derbyTesting/functionTests/master/metadataJdbc2= 0.out=09(revision 156618) +++ java/testing/org/apache/derbyTesting/functionTests/master/metadataJdbc2= 0.out=09(working copy) @@ -11,4 +11,18 @@ TYPE_CAT,TYPE_SCHEM,TYPE_NAME,CLASS_NAME,DATA_TYPE,REMARKS getUDTs() with user-named types in ('JAVA_OBJECT', 'STRUCT') : TYPE_CAT,TYPE_SCHEM,TYPE_NAME,CLASS_NAME,DATA_TYPE,REMARKS +Test the metadata calls related to visibility of changes made by others fo= r different resultset types +Since Derby materializes a forward only ResultSet incrementally, it is pos= sible to see changes +made by others and hence following 3 metadata calls will return true for f= orward only ResultSets. +othersUpdatesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? true +othersDeletesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? true +othersInsertsAreVisible(ResultSet.TYPE_FORWARD_ONLY)? true +Scroll insensitive ResultSet by their definition do not see changes made b= y others and hence following metadata calls return false +othersUpdatesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false +othersDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false +othersInsertsAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false +Derby does not yet implement scroll sensitive resultsets and hence followi= ng metadata calls return false +othersUpdatesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false +othersDeletesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false +othersInsertsAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false Test metadataJdbc20 finished Index: java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetCl= ient/metadataJdbc20.out =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClien= t/metadataJdbc20.out=09(revision 156618) +++ java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClien= t/metadataJdbc20.out=09(working copy) @@ -11,4 +11,18 @@ TYPE_CAT,TYPE_SCHEM,TYPE_NAME,CLASS_NAME,DATA_TYPE,REMARKS getUDTs() with user-named types in ('JAVA_OBJECT', 'STRUCT') : TYPE_CAT,TYPE_SCHEM,TYPE_NAME,CLASS_NAME,DATA_TYPE,REMARKS +Test the metadata calls related to visibility of changes made by others fo= r different resultset types +Since Derby materializes a forward only ResultSet incrementally, it is pos= sible to see changes +made by others and hence following 3 metadata calls will return true for f= orward only ResultSets. +othersUpdatesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? true +othersDeletesAreVisible(ResultSet.TYPE_FORWARD_ONLY)? true +othersInsertsAreVisible(ResultSet.TYPE_FORWARD_ONLY)? true +Scroll insensitive ResultSet by their definition do not see changes made b= y others and hence following metadata calls return false +othersUpdatesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false +othersDeletesAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false +othersInsertsAreVisible(ResultSet.TYPE_SCROLL_INSENSITIVE)? false +Derby does not yet implement scroll sensitive resultsets and hence followi= ng metadata calls return false +othersUpdatesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false +othersDeletesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false +othersInsertsAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE)? false Test metadataJdbc20 finished ------=_Part_1935_15907117.1110387322306--