db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r545865 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests: master/ master/DerbyNet/ master/DerbyNetClient/ tests/jdbcapi/
Date Sun, 10 Jun 2007 11:27:26 GMT
Author: kahatlen
Date: Sun Jun 10 04:27:25 2007
New Revision: 545865

URL: http://svn.apache.org/viewvc?view=rev&rev=545865
Log:
DERBY-2758: ODBC metadata function "SQLForeignKeys" returns different
results in 10.3.

Added test case. Contributed by Jørgen Løland.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/metadata.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/odbc_metadata.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/metadata.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/odbc_metadata.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/metadata.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/odbc_metadata.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/metadata_test.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/metadata.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/metadata.out?view=diff&rev=545865&r1=545864&r2=545865
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/metadata.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/metadata.out
Sun Jun 10 04:27:25 2007
@@ -211,6 +211,8 @@
 getCrossReference('',null,'reftab','','APP','reftab' ):
 PKTABLE_CAT[VARCHAR],PKTABLE_SCHEM[VARCHAR],PKTABLE_NAME[VARCHAR],PKCOLUMN_NAME[VARCHAR],FKTABLE_CAT[VARCHAR],FKTABLE_SCHEM[VARCHAR],FKTABLE_NAME[VARCHAR],FKCOLUMN_NAME[VARCHAR],KEY_SEQ[SMALLINT],UPDATE_RULE[SMALLINT],DELETE_RULE[SMALLINT],FK_NAME[VARCHAR],PK_NAME[VARCHAR],DEFERRABILITY[SMALLINT]
 ,APP,REFTAB,DPRIM,,APP,REFTAB,DFOR,1,3,3,FKEYSELF,PKEY_REFTAB,7
+getCrossReference('', 'APP', '%','','APP', '%'):
+PKTABLE_CAT[VARCHAR],PKTABLE_SCHEM[VARCHAR],PKTABLE_NAME[VARCHAR],PKCOLUMN_NAME[VARCHAR],FKTABLE_CAT[VARCHAR],FKTABLE_SCHEM[VARCHAR],FKTABLE_NAME[VARCHAR],FKCOLUMN_NAME[VARCHAR],KEY_SEQ[SMALLINT],UPDATE_RULE[SMALLINT],DELETE_RULE[SMALLINT],FK_NAME[VARCHAR],PK_NAME[VARCHAR],DEFERRABILITY[SMALLINT]
 getImportedKeys('',null,null,'','APP','reftab' ):
 PKTABLE_CAT[VARCHAR],PKTABLE_SCHEM[VARCHAR],PKTABLE_NAME[VARCHAR],PKCOLUMN_NAME[VARCHAR],FKTABLE_CAT[VARCHAR],FKTABLE_SCHEM[VARCHAR],FKTABLE_NAME[VARCHAR],FKCOLUMN_NAME[VARCHAR],KEY_SEQ[SMALLINT],UPDATE_RULE[SMALLINT],DELETE_RULE[SMALLINT],FK_NAME[VARCHAR],PK_NAME[VARCHAR],DEFERRABILITY[SMALLINT]
 ,APP,LOUIE,VC10,,APP,REFTAB,VC10,1,3,3,FKEY1,PRIMKEY,7

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/odbc_metadata.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/odbc_metadata.out?view=diff&rev=545865&r1=545864&r2=545865
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/odbc_metadata.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/odbc_metadata.out
Sun Jun 10 04:27:25 2007
@@ -241,6 +241,17 @@
 getCrossReference('',null,'reftab','','APP','reftab' ):
 PKTABLE_CAT[VARCHAR],PKTABLE_SCHEM[VARCHAR],PKTABLE_NAME[VARCHAR],PKCOLUMN_NAME[VARCHAR],FKTABLE_CAT[VARCHAR],FKTABLE_SCHEM[VARCHAR],FKTABLE_NAME[VARCHAR],FKCOLUMN_NAME[VARCHAR],KEY_SEQ[SMALLINT],UPDATE_RULE[SMALLINT],DELETE_RULE[SMALLINT],FK_NAME[VARCHAR],PK_NAME[VARCHAR],DEFERRABILITY[SMALLINT]
 ,APP,REFTAB,DPRIM,,APP,REFTAB,DFOR,1,3,3,FKEYSELF,PKEY_REFTAB,7
+getCrossReference('', 'APP', '%','','APP', '%'):
+PKTABLE_CAT[VARCHAR],PKTABLE_SCHEM[VARCHAR],PKTABLE_NAME[VARCHAR],PKCOLUMN_NAME[VARCHAR],FKTABLE_CAT[VARCHAR],FKTABLE_SCHEM[VARCHAR],FKTABLE_NAME[VARCHAR],FKCOLUMN_NAME[VARCHAR],KEY_SEQ[SMALLINT],UPDATE_RULE[SMALLINT],DELETE_RULE[SMALLINT],FK_NAME[VARCHAR],PK_NAME[VARCHAR],DEFERRABILITY[SMALLINT]
+,APP,LOUIE,VC10,,APP,REFTAB,VC10,1,3,3,FKEY1,PRIMKEY,7
+,APP,LOUIE,I,,APP,REFTAB,I,2,3,3,FKEY1,PRIMKEY,7
+,APP,LOUIE,C30,,APP,REFTAB,C30,1,3,3,FKEY2,UNIQUEKEY,7
+,APP,LOUIE,S,,APP,REFTAB,S2,2,3,3,FKEY2,UNIQUEKEY,7
+,APP,LOUIE,C30,,APP,REFTAB,C30,1,3,3,FKEY3,UNIQUEKEY,7
+,APP,LOUIE,S,,APP,REFTAB,S,2,3,3,FKEY3,UNIQUEKEY,7
+,APP,REFTAB,DPRIM,,APP,REFTAB,DFOR,1,3,3,FKEYSELF,PKEY_REFTAB,7
+,APP,LOUIE,VC10,,APP,REFTAB2,T2_VC10,1,3,3,T2_FKEY1,PRIMKEY,7
+,APP,LOUIE,I,,APP,REFTAB2,T2_I,2,3,3,T2_FKEY1,PRIMKEY,7
 getImportedKeys('',null,null,'','APP','reftab' ):
 PKTABLE_CAT[VARCHAR],PKTABLE_SCHEM[VARCHAR],PKTABLE_NAME[VARCHAR],PKCOLUMN_NAME[VARCHAR],FKTABLE_CAT[VARCHAR],FKTABLE_SCHEM[VARCHAR],FKTABLE_NAME[VARCHAR],FKCOLUMN_NAME[VARCHAR],KEY_SEQ[SMALLINT],UPDATE_RULE[SMALLINT],DELETE_RULE[SMALLINT],FK_NAME[VARCHAR],PK_NAME[VARCHAR],DEFERRABILITY[SMALLINT]
 ,APP,LOUIE,VC10,,APP,REFTAB,VC10,1,3,3,FKEY1,PRIMKEY,7

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/metadata.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/metadata.out?view=diff&rev=545865&r1=545864&r2=545865
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/metadata.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/metadata.out
Sun Jun 10 04:27:25 2007
@@ -219,6 +219,8 @@
 getCrossReference('',null,'reftab','','APP','reftab' ):
 PKTABLE_CAT[VARCHAR],PKTABLE_SCHEM[VARCHAR],PKTABLE_NAME[VARCHAR],PKCOLUMN_NAME[VARCHAR],FKTABLE_CAT[VARCHAR],FKTABLE_SCHEM[VARCHAR],FKTABLE_NAME[VARCHAR],FKCOLUMN_NAME[VARCHAR],KEY_SEQ[SMALLINT],UPDATE_RULE[SMALLINT],DELETE_RULE[SMALLINT],FK_NAME[VARCHAR],PK_NAME[VARCHAR],DEFERRABILITY[SMALLINT]
 ,APP,REFTAB,DPRIM,,APP,REFTAB,DFOR,1,3,3,FKEYSELF,PKEY_REFTAB,7
+getCrossReference('', 'APP', '%','','APP', '%'):
+PKTABLE_CAT[VARCHAR],PKTABLE_SCHEM[VARCHAR],PKTABLE_NAME[VARCHAR],PKCOLUMN_NAME[VARCHAR],FKTABLE_CAT[VARCHAR],FKTABLE_SCHEM[VARCHAR],FKTABLE_NAME[VARCHAR],FKCOLUMN_NAME[VARCHAR],KEY_SEQ[SMALLINT],UPDATE_RULE[SMALLINT],DELETE_RULE[SMALLINT],FK_NAME[VARCHAR],PK_NAME[VARCHAR],DEFERRABILITY[SMALLINT]
 getImportedKeys('',null,null,'','APP','reftab' ):
 PKTABLE_CAT[VARCHAR],PKTABLE_SCHEM[VARCHAR],PKTABLE_NAME[VARCHAR],PKCOLUMN_NAME[VARCHAR],FKTABLE_CAT[VARCHAR],FKTABLE_SCHEM[VARCHAR],FKTABLE_NAME[VARCHAR],FKCOLUMN_NAME[VARCHAR],KEY_SEQ[SMALLINT],UPDATE_RULE[SMALLINT],DELETE_RULE[SMALLINT],FK_NAME[VARCHAR],PK_NAME[VARCHAR],DEFERRABILITY[SMALLINT]
 ,APP,LOUIE,VC10,,APP,REFTAB,VC10,1,3,3,FKEY1,PRIMKEY,7

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/odbc_metadata.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/odbc_metadata.out?view=diff&rev=545865&r1=545864&r2=545865
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/odbc_metadata.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/odbc_metadata.out
Sun Jun 10 04:27:25 2007
@@ -249,6 +249,17 @@
 getCrossReference('',null,'reftab','','APP','reftab' ):
 PKTABLE_CAT[VARCHAR],PKTABLE_SCHEM[VARCHAR],PKTABLE_NAME[VARCHAR],PKCOLUMN_NAME[VARCHAR],FKTABLE_CAT[VARCHAR],FKTABLE_SCHEM[VARCHAR],FKTABLE_NAME[VARCHAR],FKCOLUMN_NAME[VARCHAR],KEY_SEQ[SMALLINT],UPDATE_RULE[SMALLINT],DELETE_RULE[SMALLINT],FK_NAME[VARCHAR],PK_NAME[VARCHAR],DEFERRABILITY[SMALLINT]
 ,APP,REFTAB,DPRIM,,APP,REFTAB,DFOR,1,3,3,FKEYSELF,PKEY_REFTAB,7
+getCrossReference('', 'APP', '%','','APP', '%'):
+PKTABLE_CAT[VARCHAR],PKTABLE_SCHEM[VARCHAR],PKTABLE_NAME[VARCHAR],PKCOLUMN_NAME[VARCHAR],FKTABLE_CAT[VARCHAR],FKTABLE_SCHEM[VARCHAR],FKTABLE_NAME[VARCHAR],FKCOLUMN_NAME[VARCHAR],KEY_SEQ[SMALLINT],UPDATE_RULE[SMALLINT],DELETE_RULE[SMALLINT],FK_NAME[VARCHAR],PK_NAME[VARCHAR],DEFERRABILITY[SMALLINT]
+,APP,LOUIE,VC10,,APP,REFTAB,VC10,1,3,3,FKEY1,PRIMKEY,7
+,APP,LOUIE,I,,APP,REFTAB,I,2,3,3,FKEY1,PRIMKEY,7
+,APP,LOUIE,C30,,APP,REFTAB,C30,1,3,3,FKEY2,UNIQUEKEY,7
+,APP,LOUIE,S,,APP,REFTAB,S2,2,3,3,FKEY2,UNIQUEKEY,7
+,APP,LOUIE,C30,,APP,REFTAB,C30,1,3,3,FKEY3,UNIQUEKEY,7
+,APP,LOUIE,S,,APP,REFTAB,S,2,3,3,FKEY3,UNIQUEKEY,7
+,APP,REFTAB,DPRIM,,APP,REFTAB,DFOR,1,3,3,FKEYSELF,PKEY_REFTAB,7
+,APP,LOUIE,VC10,,APP,REFTAB2,T2_VC10,1,3,3,T2_FKEY1,PRIMKEY,7
+,APP,LOUIE,I,,APP,REFTAB2,T2_I,2,3,3,T2_FKEY1,PRIMKEY,7
 getImportedKeys('',null,null,'','APP','reftab' ):
 PKTABLE_CAT[VARCHAR],PKTABLE_SCHEM[VARCHAR],PKTABLE_NAME[VARCHAR],PKCOLUMN_NAME[VARCHAR],FKTABLE_CAT[VARCHAR],FKTABLE_SCHEM[VARCHAR],FKTABLE_NAME[VARCHAR],FKCOLUMN_NAME[VARCHAR],KEY_SEQ[SMALLINT],UPDATE_RULE[SMALLINT],DELETE_RULE[SMALLINT],FK_NAME[VARCHAR],PK_NAME[VARCHAR],DEFERRABILITY[SMALLINT]
 ,APP,LOUIE,VC10,,APP,REFTAB,VC10,1,3,3,FKEY1,PRIMKEY,7

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/metadata.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/metadata.out?view=diff&rev=545865&r1=545864&r2=545865
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/metadata.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/metadata.out
Sun Jun 10 04:27:25 2007
@@ -219,6 +219,8 @@
 getCrossReference('',null,'reftab','','APP','reftab' ):
 PKTABLE_CAT[VARCHAR],PKTABLE_SCHEM[VARCHAR],PKTABLE_NAME[VARCHAR],PKCOLUMN_NAME[VARCHAR],FKTABLE_CAT[VARCHAR],FKTABLE_SCHEM[VARCHAR],FKTABLE_NAME[VARCHAR],FKCOLUMN_NAME[VARCHAR],KEY_SEQ[SMALLINT],UPDATE_RULE[SMALLINT],DELETE_RULE[SMALLINT],FK_NAME[VARCHAR],PK_NAME[VARCHAR],DEFERRABILITY[SMALLINT]
 ,APP,REFTAB,DPRIM,,APP,REFTAB,DFOR,1,3,3,FKEYSELF,PKEY_REFTAB,7
+getCrossReference('', 'APP', '%','','APP', '%'):
+PKTABLE_CAT[VARCHAR],PKTABLE_SCHEM[VARCHAR],PKTABLE_NAME[VARCHAR],PKCOLUMN_NAME[VARCHAR],FKTABLE_CAT[VARCHAR],FKTABLE_SCHEM[VARCHAR],FKTABLE_NAME[VARCHAR],FKCOLUMN_NAME[VARCHAR],KEY_SEQ[SMALLINT],UPDATE_RULE[SMALLINT],DELETE_RULE[SMALLINT],FK_NAME[VARCHAR],PK_NAME[VARCHAR],DEFERRABILITY[SMALLINT]
 getImportedKeys('',null,null,'','APP','reftab' ):
 PKTABLE_CAT[VARCHAR],PKTABLE_SCHEM[VARCHAR],PKTABLE_NAME[VARCHAR],PKCOLUMN_NAME[VARCHAR],FKTABLE_CAT[VARCHAR],FKTABLE_SCHEM[VARCHAR],FKTABLE_NAME[VARCHAR],FKCOLUMN_NAME[VARCHAR],KEY_SEQ[SMALLINT],UPDATE_RULE[SMALLINT],DELETE_RULE[SMALLINT],FK_NAME[VARCHAR],PK_NAME[VARCHAR],DEFERRABILITY[SMALLINT]
 ,APP,LOUIE,VC10,,APP,REFTAB,VC10,1,3,3,FKEY1,PRIMKEY,7

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/odbc_metadata.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/odbc_metadata.out?view=diff&rev=545865&r1=545864&r2=545865
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/odbc_metadata.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/odbc_metadata.out
Sun Jun 10 04:27:25 2007
@@ -249,6 +249,17 @@
 getCrossReference('',null,'reftab','','APP','reftab' ):
 PKTABLE_CAT[VARCHAR],PKTABLE_SCHEM[VARCHAR],PKTABLE_NAME[VARCHAR],PKCOLUMN_NAME[VARCHAR],FKTABLE_CAT[VARCHAR],FKTABLE_SCHEM[VARCHAR],FKTABLE_NAME[VARCHAR],FKCOLUMN_NAME[VARCHAR],KEY_SEQ[SMALLINT],UPDATE_RULE[SMALLINT],DELETE_RULE[SMALLINT],FK_NAME[VARCHAR],PK_NAME[VARCHAR],DEFERRABILITY[SMALLINT]
 ,APP,REFTAB,DPRIM,,APP,REFTAB,DFOR,1,3,3,FKEYSELF,PKEY_REFTAB,7
+getCrossReference('', 'APP', '%','','APP', '%'):
+PKTABLE_CAT[VARCHAR],PKTABLE_SCHEM[VARCHAR],PKTABLE_NAME[VARCHAR],PKCOLUMN_NAME[VARCHAR],FKTABLE_CAT[VARCHAR],FKTABLE_SCHEM[VARCHAR],FKTABLE_NAME[VARCHAR],FKCOLUMN_NAME[VARCHAR],KEY_SEQ[SMALLINT],UPDATE_RULE[SMALLINT],DELETE_RULE[SMALLINT],FK_NAME[VARCHAR],PK_NAME[VARCHAR],DEFERRABILITY[SMALLINT]
+,APP,LOUIE,VC10,,APP,REFTAB,VC10,1,3,3,FKEY1,PRIMKEY,7
+,APP,LOUIE,I,,APP,REFTAB,I,2,3,3,FKEY1,PRIMKEY,7
+,APP,LOUIE,C30,,APP,REFTAB,C30,1,3,3,FKEY2,UNIQUEKEY,7
+,APP,LOUIE,S,,APP,REFTAB,S2,2,3,3,FKEY2,UNIQUEKEY,7
+,APP,LOUIE,C30,,APP,REFTAB,C30,1,3,3,FKEY3,UNIQUEKEY,7
+,APP,LOUIE,S,,APP,REFTAB,S,2,3,3,FKEY3,UNIQUEKEY,7
+,APP,REFTAB,DPRIM,,APP,REFTAB,DFOR,1,3,3,FKEYSELF,PKEY_REFTAB,7
+,APP,LOUIE,VC10,,APP,REFTAB2,T2_VC10,1,3,3,T2_FKEY1,PRIMKEY,7
+,APP,LOUIE,I,,APP,REFTAB2,T2_I,2,3,3,T2_FKEY1,PRIMKEY,7
 getImportedKeys('',null,null,'','APP','reftab' ):
 PKTABLE_CAT[VARCHAR],PKTABLE_SCHEM[VARCHAR],PKTABLE_NAME[VARCHAR],PKCOLUMN_NAME[VARCHAR],FKTABLE_CAT[VARCHAR],FKTABLE_SCHEM[VARCHAR],FKTABLE_NAME[VARCHAR],FKCOLUMN_NAME[VARCHAR],KEY_SEQ[SMALLINT],UPDATE_RULE[SMALLINT],DELETE_RULE[SMALLINT],FK_NAME[VARCHAR],PK_NAME[VARCHAR],DEFERRABILITY[SMALLINT]
 ,APP,LOUIE,VC10,,APP,REFTAB,VC10,1,3,3,FKEY1,PRIMKEY,7

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/metadata_test.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/metadata_test.java?view=diff&rev=545865&r1=545864&r2=545865
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/metadata_test.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/metadata_test.java
Sun Jun 10 04:27:25 2007
@@ -526,6 +526,16 @@
 				new String [] {"", null, "REFTAB", "", "APP", "REFTAB"},
 				null, null, null));
 
+			// DERBY-2758 start - getCrossReference with table name
+			// value '%' should be treated as a wildcard for ODBC but
+			// not for JDBC. I.e., only odbc_metadata.out, not
+			// metadata.out, should have returned rows here.
+			System.out.println(
+						"\ngetCrossReference('', 'APP', '%','','APP', '%'):");
+			dumpRS(GET_CROSS_REFERENCE, getMetaDataRS(met, GET_CROSS_REFERENCE,
+				new String [] {"", "APP", "%", "", "APP", "%"},
+				null, null, null));
+
 			System.out.println("\ngetImportedKeys('',null,null,'','APP','reftab' ):");
 			dumpRS(GET_IMPORTED_KEYS, getMetaDataRS(met, GET_IMPORTED_KEYS,
 				new String [] {"", "APP", "REFTAB"},



Mime
View raw message