db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manjula Kutty" <manjula.ku...@gmail.com>
Subject Re: CurrentOfTest.java in the client/server mode
Date Wed, 07 Feb 2007 23:20:07 GMT
Thanks Knut for your clarification. Please bear in mind that I don't know
much about cursor states. But my strong feeling is that it should behave
similar in both embedded and n/w server, other than the difference in the
SQL states. But please find the attached test (which is a miniature of the
CurrentOfTest.java), where I expect that cursor.getCursorName() should
return null. And it works as expected in the embedded mode. But in N/w
server it has a cursor name. Is that the correct behaviour?? If so please
give me some more inputs..

You can run the test in embedded mode as

java TestCursor embedded

in n/w server ( have to start the server seperately)

java TestCursor NetworkServer


On 2/7/07, Knut Anders Hatlen <Knut.Hatlen@sun.com> wrote:
> Manjula Kutty <manjula.kutty@gmail.com> writes:
> > While converting the currentof.java I came across this. I thought this
> test
> > will be a good candidate to run both on embedded and client/server
> modes.
> > But the test passes only on embedded mode. In the client/server mode the
> > test fails with "junit.framework.ComparisonFailure: Unexpected SQL
> state.
> > expected:<24000> but was:<XCL07>" .  The test is doing negative test
> > trying to delete cursor past last row caught. In the embedded mode it
> does
> > what is expected, but in client/server mode the cursor is getting
> closed. So
> > getting a different exception than expected. I ran the old
> > currentof.javatest in the client/server mode and also got the same
> > error. So this test is
> > expected to run only in embedded mode? And this cursor feature is not
> > implemented in client/server mode?
> This sounds like a side effect of DERBY-821. If you move past the last
> row with a forward-only cursor, the cursor will be closed on the
> server. This is an optimization so that the network client doesn't
> have to send a message to the server when it later closes the
> cursor. Apart from the different messages and SQL states, embedded and
> client/server behave the same way in this case, as neither of them
> deletes a row.
> --
> Knut Anders

View raw message