You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Jianxia Chen (JIRA)" <ji...@apache.org> on 2019/02/20 00:11:00 UTC
[jira] [Updated] (GEODE-6431) JDBC Connector should use NULL as
default catalog and schema instead of empty string
[ https://issues.apache.org/jira/browse/GEODE-6431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jianxia Chen updated GEODE-6431:
--------------------------------
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.
was:
From the 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.
> JDBC Connector should use NULL as default catalog and schema instead of empty string
> ------------------------------------------------------------------------------------
>
> Key: GEODE-6431
> URL: https://issues.apache.org/jira/browse/GEODE-6431
> Project: Geode
> Issue Type: Bug
> Components: extensions
> Reporter: Jianxia Chen
> Priority: Major
>
>
> 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.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)