Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-6431

JDBC Connector should use NULL as default catalog and schema instead of empty string

    XMLWordPrintableJSON

Details

    • Bug
    • Status: In Progress
    • Major
    • Resolution: Unresolved
    • None
    • None
    • extensions
    • None

    Description

       
      From the DatabaseMetaData.getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) Javadoc: https://docs.oracle.com/javase/7/docs/api/java/sql/DatabaseMetaData.html#getTables(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String[])

      "retrieves those without a catalog; null means that the catalog name should not be used to narrow the search"

      From the DatabaseMetaData.getSchemas(String catalog, String schemaPattern) javadoc:
      https://docs.oracle.com/javase/7/docs/api/java/sql/DatabaseMetaData.html#getSchemas(java.lang.String,%20java.lang.String)

      catalog - a catalog name; must match the catalog name as it is stored in the database;"" retrieves those without a catalog; null means catalog name should not be used to narrow down the search.

      For example, for MySQL, if using empty string as default value for catalog and schema, DatabaseMetaData.getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) cannot return the expected table.

      Compared to ""(empty string), NULL is a better default value for catalog and schema.

      Attachments

        Issue Links

          Activity

            People

              jchen21 Jianxia Chen
              jchen21 Jianxia Chen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m