Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 65566 invoked from network); 3 Feb 2006 21:26:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Feb 2006 21:26:32 -0000 Received: (qmail 63425 invoked by uid 500); 3 Feb 2006 21:26:31 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 63389 invoked by uid 500); 3 Feb 2006 21:26:31 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 63380 invoked by uid 99); 3 Feb 2006 21:26:31 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2006 13:26:31 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of gcaddd-derby-dev@m.gmane.org designates 80.91.229.2 as permitted sender) Received: from [80.91.229.2] (HELO ciao.gmane.org) (80.91.229.2) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2006 13:26:30 -0800 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1F58RM-0001kJ-Pf for derby-dev@db.apache.org; Fri, 03 Feb 2006 22:26:00 +0100 Received: from 217-113-29.511210.adsl.tele2.no ([193.217.113.29]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 03 Feb 2006 22:26:00 +0100 Received: from Knut.Hatlen by 217-113-29.511210.adsl.tele2.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 03 Feb 2006 22:26:00 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: derby-dev@db.apache.org From: Knut Anders Hatlen Subject: Question about DERBY-44 test case (paging Myrna) Date: 03 Feb 2006 22:30:46 +0100 Organization: Sun Microsystems Lines: 38 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 217-113-29.511210.adsl.tele2.no User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Sender: news X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, I have a question about a test case for DERBY-44 (which appears to have been fixed by Myrna). In jdbcapi/parameterMetaDataJdbc30.java, I found this test case: // variation, and also test out empty string in the escape (jira 44). System.out.println("variation 1, testing jira 44"); ps = con.prepareStatement("select * from sys.systables where tablename like ? escape ?"); ps.setString (1, "SYS%"); ps.setString (2, ""); paramMetaData = ps.getParameterMetaData(); System.out.println("parameters count for prepared statement is " + paramMetaData.getParameterCount()); dumpParameterMetaData(paramMetaData); ps.execute(); I wonder what the purpose of this test is. Is it to test that the escape keyword is accepted by the SQL parser/compiler, or is it to test that specifiying an empty escape string shouldn't cause ps.execute() to fail? The reason why I'm asking is that this case failed when I was testing a patch for DERBY-822. In DERBY-822, we want the client driver to prefetch data in the execute call. Since having an empty string as escape character is not allowed by the SQL spec, this test will fail if we do prefetching in execute(). However, the test code does not attempt to fetch the results from the query, so it doesn't fail if we don't prefetch data. To me, this test case looks a bit odd (testing that executing invalid SQL doesn't fail), but I thought I'd ask before changing it, in case there's a reason for doing it like this. Thanks. -- Knut Anders