db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Myrna van Lunteren (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4767) Detailed prompt for Error XCL16 is different between Client and Embed
Date Wed, 11 Aug 2010 15:20:16 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4767?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12897302#action_12897302
] 

Myrna van Lunteren commented on DERBY-4767:
-------------------------------------------

The why is probably, because the client came from a different background than embedded.

In DERBY-3801 I mentioned I took a quick look and *thought* it was possible to pass on the
operation that caused the CLIENT_RESULT_SET_NOT_OPEN to be passed on. But I'm not a client/server/drda
expert, so perhaps I'm wrong.

To pull these two messages together, without losing helpful information, the thing to do would
be to add the information about the operation causing the error situation to be propogated.

You cannot simply replace CLIENT_RESULT_SET_NOT_OPEN by LANG_RESULT_SET_NOT_OPEN, because
the LANG one has an additional parameter, that's not available *right now* for the CLIENT
one. You'd get NPEs at worst, empty strings at best. So, some work is involved in finding
what the operation is in each call for the CLIENT one. 

As the CLIENT one seems to be called from one of two methods (client.am.ResultSet.checkForClosedResultSet(),
and client.am.SectionManager()), those methods will need to be changed to pass the operation
through. Judging by the usage of LANG_RESULT_SET_NOT_OPEN, depending on the situation, either
variables for the operation strings (like they're defined for the LANG message in e.g. impl.sql.execute.BasicNoPutResultSetImpl.java)
 will have to get defined somewhere (I don't know the best place for that, but I believe the
client code has a central place for strings like that), or they can be hardcoded/ad hoc (like
e.g. in MaterializedResultSet). 

(note, the operations are commands, not language constructs/messages, so don't need to be
translated, and thus, can be hardcoded).

> Detailed prompt for Error XCL16 is different between Client and Embed
> ---------------------------------------------------------------------
>
>                 Key: DERBY-4767
>                 URL: https://issues.apache.org/jira/browse/DERBY-4767
>             Project: Derby
>          Issue Type: Improvement
>          Components: JDBC
>            Reporter: Yun Lee
>            Assignee: Yun Lee
>
> For the sql script below:
> create table t1(c11 int, c12 int);
> -- insert data into tables
> insert into t1 values(1,1);
> insert into t1 values(2,2);
> -- set autocommit off
> autocommit off;
> get with nohold cursor jdk1 as 'SELECT * FROM t1';
> next jdk1;
> -- clean up.
> close jdk1;
> for the line "next jdk1;", an Error XCL16 will be thrown. However, detailed prompt for
Error XCL16 is different between Client and Embed.
> In client mode, we get "ERROR XCL16: ResultSet not open.  Verify that autocommit is OFF."
> While, in embed mode, we get "ERROR XCL16: ResultSet not open. Operation 'next' not permitted.
Verify that autocommit is OFF."

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message