db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bpendle...@apache.org
Subject svn commit: r911955 - in /db/derby/code/trunk/java: client/org/apache/derby/client/net/NetConnectionReply.java engine/org/apache/derby/loc/messages.xml testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java
Date Fri, 19 Feb 2010 19:55:32 GMT
Author: bpendleton
Date: Fri Feb 19 19:55:32 2010
New Revision: 911955

URL: http://svn.apache.org/viewvc?rev=911955&view=rev
Log:
DERBY-3729: Improve client-side messages when file or disk fills up.

This change is intended to improve the error messages which are returned
by the Derby client JDBC calls when error message XSDG1 occurs. This
particular error message may arise when the disk fills up, or it may
arise due to a quote or filesystem limit. For example, on FAT32 file
systems, an individual file is limited to 4GB and when that limit is
reached, error XSDG1 occurs.

Delivering error information back to the client in this case is tricky,
because the XSDG1 error is a database-severity message, meaning that the
database is closed, the connection is closed, and the session is ended,
so the information must be send to the client as part of the Command
Check Response Message itself.

This change: adds additional text to the XSDG1 and J123 messages, and
enhances the client's handling of the CMDCHKRM to look for possible
error information in the SQLCARD.


Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java
    db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java?rev=911955&r1=911954&r2=911955&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java Fri
Feb 19 19:55:32 2010
@@ -876,9 +876,12 @@
         checkRequiredObjects(svrcodReceived);
 
         netAgent_.setSvrcod(svrcod);
+        NetSqlca netSqlca = parseSQLCARD(null); 
+        netAgent_.netConnection_.completeSqlca(netSqlca); 
         agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_,
             new ClientMessageId(SQLState.DRDA_CONNECTION_TERMINATED),
-            msgutil_.getTextMessage(MessageId.CONN_DRDA_CMDCHKRM)));
+            msgutil_.getTextMessage(MessageId.CONN_DRDA_CMDCHKRM),
+            new Exception(netSqlca.getSqlErrmc()))); 
     }
 
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml?rev=911955&r1=911954&r2=911955&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml Fri Feb 19 19:55:32
2010
@@ -5681,7 +5681,7 @@
 
             <msg>
                 <name>XSDG1.D</name>
-                <text>Page {0} could not be written to disk, please check if disk is
full.</text>
+                <text>Page {0} could not be written to disk, please check if the disk
is full, or if a file system limit, such as a quota or a maximum file size, has been reached.</text>
                 <arg>page</arg>
             </msg>
 
@@ -7791,7 +7791,7 @@
 
             <msg>
                 <name>J123</name>
-                <text>the requested command encountered an unarchitected and implementation-specific
condition for which there was no architected message</text>
+                <text>the requested command encountered an unarchitected and implementation-specific
condition for which there was no architected message (additional information may be available
in the derby.log file on the server)</text>
             </msg>
 
             <msg>

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java?rev=911955&r1=911954&r2=911955&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java
Fri Feb 19 19:55:32 2010
@@ -207,7 +207,7 @@
         		{"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"},
+        		{"XSDG1","Page {0} could not be written to disk, please check if the disk is full,
or if a file system limit, such as a quota or a maximum file size, has been reached.","45000"},
         		{"XSDG2","Invalid checksum on Page {0}, expected={1}, on-disk version={2}, page
dump follows: {3}","45000"},
         		{"XSDG3","Meta-data for Container {0} could not be accessed","45000"},
         		{"XSDG5","Database is not in create mode when createFinished is called.","45000"},



Mime
View raw message