db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrn...@apache.org
Subject svn commit: r703170 - in /db/derby/code/trunk/java: drda/org/apache/derby/impl/drda/DRDAConnThread.java shared/org/apache/derby/shared/common/reference/SQLState.java
Date Thu, 09 Oct 2008 14:16:32 GMT
Author: myrnavl
Date: Thu Oct  9 07:16:32 2008
New Revision: 703170

URL: http://svn.apache.org/viewvc?rev=703170&view=rev
Log:
DERBY-1411 - remove never-thrown SQLState NO_SUCH_DATABASE and check for it

Modified:
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
    db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java

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=703170&r1=703169&r2=703170&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 Thu Oct 
9 07:16:32 2008
@@ -1247,13 +1247,11 @@
 	private int getRdbAccessErrorCodePoint()
 	{
 		String sqlState = databaseAccessException.getSQLState();
-		// These tests are ok since DATABASE_NOT_FOUND,
-		// NO_SUCH_DATABASE and AUTH_INVALID_USER_NAME are not
-		// ambigious error codes (on the first five characters) in
-		// SQLState. If they were, we would have to perform a similar
-		// check as done in method isAuthenticationException
-		if (sqlState.regionMatches(0,SQLState.DATABASE_NOT_FOUND,0,5) ||
-			sqlState.regionMatches(0,SQLState.NO_SUCH_DATABASE,0,5)) {
+		// These tests are ok since DATABASE_NOT_FOUND and 
+		// AUTH_INVALID_USER_NAME are not ambigious error codes (on the first
+		// five characters) in SQLState. If they were, we would have to
+		// perform a similar check as done in method isAuthenticationException
+		if (sqlState.regionMatches(0,SQLState.DATABASE_NOT_FOUND,0,5)) {
 			// RDB not found codepoint
 			return CodePoint.RDBNFNRM;
 		} else {

Modified: db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java?rev=703170&r1=703169&r2=703170&view=diff
==============================================================================
--- db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java
(original)
+++ db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java
Thu Oct  9 07:16:32 2008
@@ -1589,7 +1589,6 @@
     String CONFLICTING_CREATE_ATTRIBUTES = "XJ049.C";
 	String CONFLICTING_RESTORE_ATTRIBUTES = "XJ081.C";
     String INVALID_ATTRIBUTE = "XJ05B.C";
-    String NO_SUCH_DATABASE = "X0RQ3.C";
     
     // Connection exceptions - SQL State class 08
     



Mime
View raw message