db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fernanda Pizzorno (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-1481) Client driver: ResultSet.beforeFirst() gives protocol error on scrollable, updatable result sets that are downgraded to read-only
Date Fri, 14 Jul 2006 07:58:31 GMT
     [ http://issues.apache.org/jira/browse/DERBY-1481?page=all ]

Fernanda Pizzorno updated DERBY-1481:
-------------------------------------

    Attachment: derby-1481.diff
                derby-1481.stat

When the result set is downgraded from updatable to read-only because the query generating
the result set cannot produce an updatable result set, the result set will be downgraded on
the server side, and a warning (SQLCARD) indicating the downgrade will be sent to the client.
Warnings on the server side are not cleared after they are sent to the client causing the
server to send the same warning several times.

Positioning commands like ResultSet.beforeFirst() that do not return any data also do not
expect warnings to be returned. The protocol error was being caused by this downgrade warning
that was being sent several times, one of them being in a response to a ResultSet.beforeFirst()
command.

The attached patch (derby-1481.diff) fixed the problem by clearing the warnings after they
are sent so that the same warning will not be sent more than once.

I have successfully run derbyall with this patch. Can someone please review it?

> Client driver: ResultSet.beforeFirst() gives protocol error on scrollable, updatable
result sets that are downgraded to read-only
> ---------------------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-1481
>          URL: http://issues.apache.org/jira/browse/DERBY-1481
>      Project: Derby
>         Type: Bug

>   Components: JDBC, Network Client
>     Versions: 10.2.0.0
>     Reporter: Knut Anders Hatlen
>     Assignee: Fernanda Pizzorno
>  Attachments: Repro.java, derby-1481.diff, derby-1481.stat
>
> When a statement that produces scrollable, updatable result sets executes a query which
cannot produce an updatable result set (a join for instance), ResultSet.beforeFirst() fails
with the following error:
> Exception in thread "main" java.sql.SQLException: A network protocol error was encountered
and the connection has been terminated: Network protocol exception: DSS length not 0 at end
of same id chain parse.  The connection has been terminated.
>         at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
>         at org.apache.derby.client.am.SqlException.getSQLException(SqlException.java:344)
>         at org.apache.derby.client.am.ResultSet.beforeFirst(ResultSet.java:2101)
>         at Repro.main(Repro.java:16)
> Caused by: org.apache.derby.client.am.DisconnectException: A network protocol error was
encountered and the connection has been terminated: Network protocol exception: DSS length
not 0 at end of same id chain parse.  The connection has been terminated.
>         at org.apache.derby.client.am.ResultSet.flowPositioningFetch(ResultSet.java:3888)
>         at org.apache.derby.client.am.ResultSet.moveToBeforeFirst(ResultSet.java:4149)
>         at org.apache.derby.client.am.ResultSet.beforeFirstX(ResultSet.java:2118)
>         at org.apache.derby.client.am.ResultSet.beforeFirst(ResultSet.java:2096)
>         ... 1 more

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message