Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4798462

REGRESSION: getTableTypes() for MS Access returns wrong result set

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P3 P3
    • None
    • 1.4.1
    • core-libs



      Name: rmT116609 Date: 01/02/2003


      FULL PRODUCT VERSION :
      java version "1.4.1_01"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
      Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)

      FULL OPERATING SYSTEM VERSION :
      Microsoft Windows 2000 [Version 5.00.2195]

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      MS Windows 2000 Professional, SP3

      A DESCRIPTION OF THE PROBLEM :
      I tring to get table types result set via JDBC-ODBC brige sun.jdbc.odbc.JdbcOdbcDriver" from MS Access 2000 Northwind database.
      Returned result set contains 34 duplicated strings.
      Actually there are 3 distinct values: TABLE,VIEW,SYSTEM TABLE.
      When I use jdk 1.4.0 - table type result set returns 4 distinct values : TABLE,VIEW,SYSTEM TABLE and SYNONYM.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Load JDBC-ODBC brige driver.
      2. Connect to Access sample database Northwind.
      3. Get table types result set.
      4. Inspect it.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      Expected result:
      found TABLE TYPE : SYSTEM TABLE
      found TABLE TYPE : SYNONYM
      found TABLE TYPE : TABLE
      found TABLE TYPE : VIEW

      Actual result:
      found TABLE TYPE : SYSTEM TABLE
      found TABLE TYPE : SYSTEM TABLE
      found TABLE TYPE : SYSTEM TABLE
      found TABLE TYPE : SYSTEM TABLE
      found TABLE TYPE : SYSTEM TABLE
      found TABLE TYPE : SYSTEM TABLE
      found TABLE TYPE : SYSTEM TABLE
      found TABLE TYPE : SYSTEM TABLE
      found TABLE TYPE : TABLE
      found TABLE TYPE : TABLE
      found TABLE TYPE : TABLE
      found TABLE TYPE : TABLE
      found TABLE TYPE : TABLE
      found TABLE TYPE : TABLE
      found TABLE TYPE : TABLE
      found TABLE TYPE : TABLE
      found TABLE TYPE : VIEW
      found TABLE TYPE : VIEW
      found TABLE TYPE : VIEW
      found TABLE TYPE : VIEW
      found TABLE TYPE : VIEW
      found TABLE TYPE : VIEW
      found TABLE TYPE : VIEW
      found TABLE TYPE : VIEW
      found TABLE TYPE : VIEW
      found TABLE TYPE : VIEW
      found TABLE TYPE : VIEW
      found TABLE TYPE : VIEW
      found TABLE TYPE : VIEW
      found TABLE TYPE : VIEW
      found TABLE TYPE : VIEW
      found TABLE TYPE : VIEW
      found TABLE TYPE : VIEW
      found TABLE TYPE : VIEW

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      public class TestAccess {
                public static void main (String [] args) {
                    try {
                    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                    String url = "jdbc:odbc:Northwind";
                    Connection con = DriverManager.getConnection(url, "", "");
                    if (con != null) {
                        DatabaseMetaData dbMeta= con.getMetaData();
                        ResultSet tTypes= dbMeta.getTableTypes();
                        int i= 0;
                        while (tTypes.next()) {
                            String curTT= tTypes.getString(1);
                            System.out.println("found TABLE TYPE : " + curTT);
                            i++;
                        }
                        System.out.println("all : " + i);
                    }else {
                        throw new SQLException("Unexpected error!");
                    }
                    } catch(Exception ex) {
                        System.out.println("Found error : " + ex.getMessage());

                    }
                }
      }

      ---------- END SOURCE ----------

      Release Regression From : 1.4
      The above release value was the last known release where this
      bug was known to work. Since then there has been a regression.

      (Review ID: 179539)
      ======================================================================

            ahandasunw Amit Handa (Inactive)
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: