db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andre...@apache.org
Subject svn commit: r415557 - in /db/derby/code/trunk/java: client/org/apache/derby/client/net/NetConnectionRequest.java drda/org/apache/derby/impl/drda/DRDAConnThread.java
Date Tue, 20 Jun 2006 08:21:55 GMT
Author: andreask
Date: Tue Jun 20 01:21:55 2006
New Revision: 415557

URL: http://svn.apache.org/viewvc?rev=415557&view=rev
Log:
DERBY-1374 compatibility test fails with PROTOCOL Data Stream Syntax Error.Patch contributed
by Fernanda Pizzorno

Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionRequest.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionRequest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionRequest.java?rev=415557&r1=415556&r2=415557&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionRequest.java
(original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionRequest.java
Tue Jun 20 01:21:55 2006
@@ -395,9 +395,6 @@
                 typdef.isCcsidMbcSet(),
                 typdef.getCcsidMbc());
 
-        // This specifies the SQL Error Diagnostic Level
-        buildDIAGLVL();
-
         // RDB allow update is an optional parameter which indicates
         // whether the RDB allows the requester to perform update operations
         // in the RDB.  If update operations are not allowed, this connection
@@ -565,13 +562,6 @@
 
         updateLengthBytes();
 
-    }
-
-    private void buildDIAGLVL() throws SqlException {
-        markLengthBytes(CodePoint.DIAGLVL);
-        
-        writeByte(CodePoint.DIAGLVL2);
-        updateLengthBytes();
     }
 
     private void buildMGRLVLLS(int agent,

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java?rev=415557&r1=415556&r2=415557&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java Tue Jun 20
01:21:55 2006
@@ -2901,6 +2901,14 @@
 					}
 					else sendWarningsOnCNTQRY = false;
 
+					// The client can not request DIAGLVL because when run with
+					// an older server it will cause an exception. Older version
+					// of the server do not recognize requests for DIAGLVL.
+					if ((appRequester.getClientType() == appRequester.DNC_CLIENT) &&
+							appRequester.greaterThanOrEqualTo(10, 2, 0)) {
+						diagnosticLevel = CodePoint.DIAGLVL1;
+					}
+
 					removeFromRequired(CodePoint.PRDID);
 					break;
 				//required
@@ -2937,10 +2945,6 @@
 				case CodePoint.STTSTRDEL:
 					codePointNotSupported(codePoint);
 					break;
-				// optional
-				case CodePoint.DIAGLVL:
-					diagnosticLevel = reader.readByte();
-					break;
 				default:
 					invalidCodePoint(codePoint);
 			}
@@ -6243,7 +6247,7 @@
 			// popped by client onto its rowUpdated state, i.e. this 
 			// warning should not reach API level.
 			if (rs != null && rs.rowUpdated()) {
-				SQLWarning w = new SQLWarning(null, SQLState.ROW_UPDATED,
+				SQLWarning w = new SQLWarning("", SQLState.ROW_UPDATED,
 						ExceptionSeverity.WARNING_SEVERITY);
 				if (sqlw != null) {
 					sqlw.setNextWarning(w);
@@ -6255,7 +6259,7 @@
 			// SQLCARD and a null data group. The SQLCARD has a warning
 			// SQLSTATE of 02502
 			if (rs != null && rs.rowDeleted()) {
-				SQLWarning w = new SQLWarning(null, SQLState.ROW_DELETED,
+				SQLWarning w = new SQLWarning("", SQLState.ROW_DELETED,
 						ExceptionSeverity.WARNING_SEVERITY);
 				if (sqlw != null) {
 					sqlw.setNextWarning(w);



Mime
View raw message