From issues-return-95544-archive-asf-public=cust-asf.ponee.io@ignite.apache.org Mon Apr 22 03:22:02 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 293E2180658 for ; Mon, 22 Apr 2019 05:22:02 +0200 (CEST) Received: (qmail 44433 invoked by uid 500); 22 Apr 2019 03:22:01 -0000 Mailing-List: contact issues-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list issues@ignite.apache.org Received: (qmail 44424 invoked by uid 99); 22 Apr 2019 03:22:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Apr 2019 03:22:01 +0000 Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 88D05E282F for ; Mon, 22 Apr 2019 03:22:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 1C0DF24593 for ; Mon, 22 Apr 2019 03:22:00 +0000 (UTC) Date: Mon, 22 Apr 2019 03:22:00 +0000 (UTC) From: "Pat Patterson (JIRA)" To: issues@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (IGNITE-9730) JdbcThinDatabaseMetadata.getTables() is case-sensitive MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/IGNITE-9730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16822847#comment-16822847 ] Pat Patterson commented on IGNITE-9730: --------------------------------------- Looks like a typo somewhere - I believe IGNITE-9730 above should be IGNITE-9720. Would be helpful to delete the above two bot-generated comments. > JdbcThinDatabaseMetadata.getTables() is case-sensitive > ------------------------------------------------------ > > Key: IGNITE-9730 > URL: https://issues.apache.org/jira/browse/IGNITE-9730 > Project: Ignite > Issue Type: Bug > Affects Versions: 2.6 > Reporter: Pat Patterson > Priority: Minor > > Create a table {{Tester}}, try to get its metadata via {{JdbcThinDatabaseMetadata.getTables()}}. No metadata is returned unless you use an uppercase table name. > Issue seems to be that {{matches()}} in {{JdbcRequestHandler}} is case sensitive, unlike {{matches()}} in the client driver at {{JdbcDatabaseMetadata}}. > Easily reproducible: > {noformat} > public static void testGetTables() throws ClassNotFoundException, SQLException { > // Register JDBC driver. > Class.forName("org.apache.ignite.IgniteJdbcThinDriver"); > // Open JDBC connection. > try (Connection conn = DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1/")) { > String tableName = "Tester"; > // Create database table > try (Statement stmt = conn.createStatement()) { > stmt.executeUpdate("CREATE TABLE " + tableName + " (" + > " ID LONG PRIMARY KEY, NAME VARCHAR) " + > " WITH \"template=replicated\""); > } > // Get database metadata > DatabaseMetaData md = conn.getMetaData(); > // Get table metadata > ResultSet rs = md.getTables(conn.getCatalog(), "", tableName, new String[]{"TABLE"}); > System.out.println((rs.next() ? "Found metadata for " : "No metadata for ") + tableName); > // Try again with uppercase > tableName = tableName.toUpperCase(); > rs = md.getTables(conn.getCatalog(), "", tableName, new String[]{"TABLE"}); > System.out.println((rs.next() ? "Found metadata for " : "No metadata for ") + tableName); > } > } > {noformat} > Expected output: > {noformat} > Found metadata for Tester > Found metadata for TESTER > {noformat} > Actual output: > {noformat} > No metadata for Tester > Found metadata for TESTER > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)