|
This wasn't immediately clear from the stored_proc_repro.java file, but I seem to *also* get the same exception if I use the Derby Client Driver. I tweaked the reproduction code to say:
Class.forName("org.apache.derby.jdbc.ClientDriver").newInstance(); Connection conn = DriverManager.getConnection( "jdbc:derby://localhost:1527/testdb", "bah", "humbug"); instead of referencing the DB2JCC driver, and I get the following exception, which I assume is the same as the bug you observed: -=- ERROR 1 REPRODUCED: org.apache.derby.client.am.DisconnectException: actual code point, -2 does not match expected code point, 8709 at org.apache.derby.client.net.Reply.zThrowSyntaxError(Reply.java:1163) at org.apache.derby.client.net.Reply.parseLengthAndMatchCodePoint(Reply.java:1063) at org.apache.derby.client.net.NetStatementReply.parseOPNQRYRM(NetStatementReply.java:724) at org.apache.derby.client.net.NetStatementReply.parseResultSetCursor(NetStatementReply.java:400) at org.apache.derby.client.net.NetStatementReply.parseResultSetProcedure(NetStatementReply.java:377) at org.apache.derby.client.net.NetStatementReply.parseEXCSQLSTTreply(NetStatementReply.java:279) at org.apache.derby.client.net.NetStatementReply.readExecuteCall(NetStatementReply.java:97) at org.apache.derby.client.net.StatementReply.readExecuteCall(StatementReply.java:74) at org.apache.derby.client.net.NetStatement.readExecuteCall_(NetStatement.java:174) at org.apache.derby.client.am.Statement.readExecuteCall(Statement.java:1117) at org.apache.derby.client.am.PreparedStatement.flowExecute(PreparedStatement.java:1428) at org.apache.derby.client.am.CallableStatement.executeX(CallableStatement.java:124) at org.apache.derby.client.am.CallableStatement.execute(CallableStatement.java:114) at stored_proc_repro.main(stored_proc_repro.java:57) Attached is a patch proposal which addresses both this bug and
*** Start: procedure jdk1.4.2_06 DerbyNetClient derbynetmats:derbynetmats 2006-01-13 12:55:45 *** 941 del < JIRA-492 successful -- no hang! 941 add > ERROR (no SQLState): only one of the VCM, VCS length can be greater than 0 > org.apache.derby.client.am.DisconnectException: only one of the VCM, VCS length can be greater than 0 Test Failed. The change looks good. When you sync up, it would be good to add some comments about the changes to the code and include a reference to The changes.html wonderful and educational as always. I have not really worked with this low level protocol code much so it is great to have such a great tutorial included with the patch. After reading and learning more about these issues. I really think your proposal to fill the buffer with a known value in sane builds or if derby.drda.debug=true would be very valuable. It would be interesting even to see how we do in the tests with this turned on. Updated patch, against latest trunk. I added a few additional comments to this patch to try to explain the changes more clearly, and also I added a reference to this bug entry to help the reader find more information. Now that
I think that this patch proposal is now ready for review. Kathey, Army, other interested reviewers, please have a look and tell me what you think! Updated the comments in the regression test to explain the test behavior more clearly and accurately, and to include a pointer to this bug entry for the interested reader to get more details.
Bernt, if you have the time to look at this and commit it, that would be great! thanks, bryan For those wondering, Bryan's latest patch addreses comments I made here:
http://article.gmane.org/gmane.comp.apache.db.derby.devel/12818 Thanks as always for the phenomenal explanations in the latest version of changes.html. The new comments in the tests look good to me, and I have no other issues with the patch. This is great work... +1 to commit. Set fix version to 10.2.0.0. This bug was fixed in the trunk in January.
Re-opened to merge this fix to the 10.1 branch.
Merged the change from the trunk back to the 10.1 branch. The merge was straightforward. I verified that I could still reproduce the bug in 10.1, that the test demonstrated the bug, and that the code change fixed it.
Committed to subversion as revision 398093: svn.apache.org/viewcvs?rev=398093&view=rev |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
DERBY-170)