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 2B13410DD9 for ; Fri, 6 Sep 2013 08:43:58 +0000 (UTC) Received: (qmail 47344 invoked by uid 500); 6 Sep 2013 08:43:57 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 46721 invoked by uid 500); 6 Sep 2013 08:43:55 -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 46677 invoked by uid 99); 6 Sep 2013 08:43:52 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Sep 2013 08:43:52 +0000 Date: Fri, 6 Sep 2013 08:43:52 +0000 (UTC) From: "Dag H. Wanvik (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=3D1376= 0061#comment-13760061 ]=20 Dag H. Wanvik commented on DERBY-6228: -------------------------------------- The ORDER BY seems to be the issue here: Scrollable, updatable result sets = are not allowed with ORDER BY, so the query gets downgraded to being read only: this generates a warning that= probably breaks in the protocol somehow. =20 > 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 is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira