Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 82530105B2 for ; Sat, 19 Oct 2013 19:01:50 +0000 (UTC) Received: (qmail 39494 invoked by uid 500); 19 Oct 2013 19:01:50 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 38462 invoked by uid 500); 19 Oct 2013 19:01:44 -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 38088 invoked by uid 99); 19 Oct 2013 19:01:42 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 Oct 2013 19:01:42 +0000 Date: Sat, 19 Oct 2013 19:01:42 +0000 (UTC) From: "Dyre Tjeldvoll (JIRA)" To: derby-dev@db.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DERBY-6228) DisconnectException when executing an SELECT [LOB column] ORDER BY [...] statement with TYPE_SCROLL_[IN]SENSITIVE and CONCUR_UPDATABLE MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-6228?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1379= 9979#comment-13799979 ]=20 Dyre Tjeldvoll commented on DERBY-6228: --------------------------------------- I have verified that the exception comes from the client not being able to = parse the {{SQLCARD}} added to the reply as a result of the downgrade warni= ng. Adding code to parse the warning removes the crash, but you cannot see = the warning since the warning gets cleared later, which is probably another= bug. If you change c to {{VARCHAR(32)}} it does not fail. Which is reasonable, s= ince this downgrade *is* tested in {{SURTest.testDowngradeToScrollReadOnly(= )}}, but I'm guessing not with a LOB. The interesting thing here is that th= e warning is *only* produced when *creating* a {{ResultSet}}, so we would e= xpect to see this warning on the previous line where the {{ResultSet}} obje= ct is actually created. And sure enough, if you modify the repro so that it= prints warnings before calling {{next()}}, you'll see the downgrade-warnin= g. I'm guessing that {{getRowCount()}} creates a temporary {{ResultSet}} wi= th the same attributes as the one just created so that it too gets the down= grade warning, but this warning is added to the {{next()}}-reply, which is = not set up to handle it. > DisconnectException when executing an SELECT [LOB column] ORDER BY [...] = statement with TYPE_SCROLL_[IN]SENSITIVE and CONCUR_UPDATABLE > -------------------------------------------------------------------------= ------------------------------------------------------------- > > Key: DERBY-6228 > URL: https://issues.apache.org/jira/browse/DERBY-6228 > Project: Derby > Issue Type: Bug > Components: Network Client > Affects Versions: 10.8.3.0, 10.10.1.1 > Reporter: Lukas Eder > Labels: derby_triage10_11 > Attachments: Derby6228.java > > > Here's a minimal program to reproduce the issue: > Connection c =3D DriverManager.getConnection( > "jdbc:derby://localhost:1527/test;create=3Dtrue", "TEST", "TE= ST"); > Statement s =3D c.createStatement(); > s.executeUpdate( > "CREATE TABLE t(" + > "id INT NOT NULL, " + > "c CLOB" + > ")"); > s.executeUpdate("INSERT INTO t VALUES (1, null)"); > s.executeUpdate("INSERT INTO t VALUES (2, null)"); > PreparedStatement stmt =3D c.prepareStatement( > "SELECT * FROM t ORDER BY id", > ResultSet.TYPE_SCROLL_INSENSITIVE, > ResultSet.CONCUR_UPDATABLE); > ResultSet rs =3D stmt.executeQuery(); > rs.next(); > The above leads to this exception: > java.sql.SQLNonTransientConnectionException: Netzwerkprotokollausnahme: D= SS-L=C3=A4nge ist beim Beenden des Parsing-Vorgangs der ID-Kette gr=C3=B6= =C3=9Fer als 0. Die Verbindung wurde beendet. > =09at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Un= known Source) > =09at org.apache.derby.client.am.SqlException.getSQLException(Unknown Sou= rce) > =09at org.apache.derby.client.am.ResultSet.next(Unknown Source) > =09at org.jooq.test._.testcases.KeepResultSetTests.testKeepRSWithUpdateOn= ChangeLazy(KeepResultSetTests.java:330) > =09at org.jooq.test.jOOQAbstractTest.testKeepRSWithUpdateOnChangeLazy(jOO= QAbstractTest.java:2240) > ... > Caused by: org.apache.derby.client.am.DisconnectException: Netzwerkprotok= ollausnahme: DSS-L=C3=A4nge ist beim Beenden des Parsing-Vorgangs der ID-Ke= tte gr=C3=B6=C3=9Fer als 0. Die Verbindung wurde beendet. > =09at org.apache.derby.client.net.Reply.endOfSameIdChainData(Unknown Sour= ce) > =09at org.apache.derby.client.net.NetResultSetReply.readPositioningFetch(= Unknown Source) > =09at org.apache.derby.client.net.ResultSetReply.readPositioningFetch(Unk= nown Source) > =09at org.apache.derby.client.net.NetResultSet.readPositioningFetch_(Unkn= own Source) > =09at org.apache.derby.client.am.ResultSet.getRowCount(Unknown Source) > =09at org.apache.derby.client.am.ResultSet.resultSetContainsNoRows(Unknow= n Source) > =09at org.apache.derby.client.am.ResultSet.getNextRowset(Unknown Source) > =09at org.apache.derby.client.am.ResultSet.nextX(Unknown Source) > =09... 30 more > To reproduce the above, all of the following things seem relevant: > 1. There is at least one BLOB or CLOB column being selected > 2. An ORDER BY clause is added > 3. ResultSet.TYPE_SCROLL_SENSITIVE or ResultSet.TYPE_SCROLL_INSENSITIVE i= s set > 4. ResultSet.CONCUR_UPDATABLE is set -- This message was sent by Atlassian JIRA (v6.1#6144)