db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject svn commit: r672306 - in /db/derby/code/branches/10.4/java: engine/org/apache/derby/impl/store/raw/data/ engine/org/apache/derby/loc/ shared/org/apache/derby/shared/common/reference/ testing/org/apache/derbyTesting/functionTests/tests/lang/
Date Fri, 27 Jun 2008 15:44:19 GMT
Author: mikem
Date: Fri Jun 27 08:44:18 2008
New Revision: 672306

URL: http://svn.apache.org/viewvc?rev=672306&view=rev
Log:
DERBY-3725

Backporting fix from trunk to 10.4 branch (changes 669216 and 669312)

Added a page dump to this serious page corrupted error where the format id
has been corrupted so we don't know what kind of page it is, and thus can't
bootstrap the load to even create the object.


Modified:
    db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/store/raw/data/CachedPage.java
    db/derby/code/branches/10.4/java/engine/org/apache/derby/loc/messages.xml
    db/derby/code/branches/10.4/java/shared/org/apache/derby/shared/common/reference/SQLState.java
    db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java

Modified: db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/store/raw/data/CachedPage.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/store/raw/data/CachedPage.java?rev=672306&r1=672305&r2=672306&view=diff
==============================================================================
--- db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/store/raw/data/CachedPage.java
(original)
+++ db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/store/raw/data/CachedPage.java
Fri Jun 27 08:44:18 2008
@@ -262,7 +262,9 @@
 		if (formatId == -1)
         {
 			throw StandardException.newException(
-                    SQLState.DATA_UNKNOWN_PAGE_FORMAT, newIdentity);
+                    SQLState.DATA_UNKNOWN_PAGE_FORMAT_2, 
+                    newIdentity,
+                    org.apache.derby.iapi.util.StringUtil.hexDump(pageData));
         }
 
 		// createArgs[0] contains the integer form of the formatId 
@@ -341,6 +343,7 @@
 		 throws StandardException
 	{
 		CachedPage realPage;
+
 		try 
         {
 			realPage = 
@@ -356,7 +359,9 @@
             else
             {
                 throw StandardException.newException(
-                    SQLState.DATA_UNKNOWN_PAGE_FORMAT, se, newIdentity);
+                    SQLState.DATA_UNKNOWN_PAGE_FORMAT_2, 
+                    newIdentity,
+                    org.apache.derby.iapi.util.StringUtil.hexDump(pageData));
             }
 		}
 

Modified: db/derby/code/branches/10.4/java/engine/org/apache/derby/loc/messages.xml
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/engine/org/apache/derby/loc/messages.xml?rev=672306&r1=672305&r2=672306&view=diff
==============================================================================
--- db/derby/code/branches/10.4/java/engine/org/apache/derby/loc/messages.xml (original)
+++ db/derby/code/branches/10.4/java/engine/org/apache/derby/loc/messages.xml Fri Jun 27 08:44:18
2008
@@ -5315,6 +5315,13 @@
                 <arg>object</arg>
             </msg>
 
+            <msg>
+                <name>XSDBB.D</name>
+                <text>Unknown page format at page {0}, page dump follows: {1} </text>
+                <arg>page</arg>
+                <arg>value</arg>
+            </msg>
+
         </family>
 
 

Modified: db/derby/code/branches/10.4/java/shared/org/apache/derby/shared/common/reference/SQLState.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/shared/org/apache/derby/shared/common/reference/SQLState.java?rev=672306&r1=672305&r2=672306&view=diff
==============================================================================
--- db/derby/code/branches/10.4/java/shared/org/apache/derby/shared/common/reference/SQLState.java
(original)
+++ db/derby/code/branches/10.4/java/shared/org/apache/derby/shared/common/reference/SQLState.java
Fri Jun 27 08:44:18 2008
@@ -497,6 +497,7 @@
 	String DATA_MULTIPLE_JBMS_FORCE_LOCK                        = "XSDB8.D";
 	String DATA_CORRUPT_STREAM_CONTAINER                        = "XSDB9.D";
 	String DATA_OBJECT_ALLOCATION_FAILED                        = "XSDBA.D";
+	String DATA_UNKNOWN_PAGE_FORMAT_2                           = "XSDBB.D";
 
 	/*
 	** RawStore - Data.Filesystem statement exceptions

Modified: db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java?rev=672306&r1=672305&r2=672306&view=diff
==============================================================================
--- db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java
(original)
+++ db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java
Fri Jun 27 08:44:18 2008
@@ -203,6 +203,7 @@
         		{"XSDB8","WARNING: Derby (instance {0}) is attempting to boot the database {1}
even though Derby (instance {2}) may still be active.  Only one instance of Derby should boot
a database at a time. Severe and non-recoverable corruption can result if 2 instances of Derby
boot on the same database at the same time.  The db2j.database.forceDatabaseLock=true property
has been set, so the database will not boot until the db.lck is no longer present.  Normally
this file is removed when the first instance of Derby to boot on the database exits, but it
may be left behind in some shutdowns.  It will be necessary to remove the file by hand in
that case.  It is important to verify that no other VM is accessing the database before deleting
the db.lck file by hand.","45000"},
         		{"XSDB9","Stream container {0} is corrupt.","45000"},
         		{"XSDBA","Attempt to allocate object {0} failed.","45000"},
+        		{"XSDBB", "Unknown page format at page {0}, page dump follows: {1} ", "45000"},
         		{"XSDG0","Page {0} could not be read from disk.","45000"},
         		{"XSDG1","Page {0} could not be written to disk, please check if disk is full.","45000"},
         		{"XSDG2","Invalid checksum on Page {0}, expected={1}, on-disk version={2}, page
dump follows: {3}","45000"},



Mime
View raw message