db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davi...@apache.org
Subject svn commit: r372923 - in /db/derby/code/trunk/java: client/org/apache/derby/client/am/ client/org/apache/derby/loc/ shared/org/apache/derby/shared/common/reference/ testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/ testing/org/apache...
Date Fri, 27 Jan 2006 17:22:21 GMT
Author: davidvc
Date: Fri Jan 27 09:21:51 2006
New Revision: 372923

URL: http://svn.apache.org/viewcvs?rev=372923&view=rev
Log:
DERBY-860: Internationalized SqlWarning and its messages.  I also fixed
the way SqlException.setNextException(), it was incorrect.  

Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlException.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlWarning.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Sqlca.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java
    db/derby/code/trunk/java/client/org/apache/derby/loc/clientmessages_en.properties
    db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/updatableResultSet.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/scrollCursors2.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/updatableResultSet.out

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java?rev=372923&r1=372922&r2=372923&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java Fri Jan 27
09:21:51 2006
@@ -21,6 +21,7 @@
 package org.apache.derby.client.am;
 
 import org.apache.derby.jdbc.ClientDataSource;
+import org.apache.derby.shared.common.reference.SQLState;
 
 import java.sql.SQLException;
 
@@ -939,7 +940,7 @@
         if (agent_.loggingEnabled()) {
             agent_.logWriter_.traceExit(this, "getWarnings", warnings_);
         }
-        return warnings_;
+        return warnings_ == null ? null : warnings_.getSQLWarning();
     }
 
     synchronized public void clearWarnings() throws SQLException {
@@ -1120,7 +1121,8 @@
     // issue a warning rather than to throw an exception.
     private int downgradeResultSetType(int resultSetType) {
         if (resultSetType == java.sql.ResultSet.TYPE_SCROLL_SENSITIVE) {
-            accumulateWarning(new SqlWarning(agent_.logWriter_, "Scroll sensitive result
sets are not supported by server; remapping to forward-only cursor"));
+            accumulateWarning(new SqlWarning(agent_.logWriter_, 
+                new MessageId(SQLState.SCROLL_SENSITIVE_NOT_SUPPORTED)));
             return java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE;
         }
         return resultSetType;
@@ -1131,7 +1133,8 @@
     private int downgradeResultSetConcurrency(int resultSetConcurrency, int resultSetType)
{
         if (resultSetConcurrency == java.sql.ResultSet.CONCUR_UPDATABLE &&
                 resultSetType == java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE) {
-            accumulateWarning(new SqlWarning(agent_.logWriter_, "Insensitive updatable result
sets are not supported by server; remapping to insensitive read-only cursor"));
+            accumulateWarning(new SqlWarning(agent_.logWriter_, 
+                new MessageId(SQLState.INSENSITIVE_UPDATABLE_NOT_SUPPORTED)));
             return java.sql.ResultSet.CONCUR_READ_ONLY;
         }
         return resultSetConcurrency;

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java?rev=372923&r1=372922&r2=372923&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java Fri Jan 27 09:21:51
2006
@@ -22,6 +22,7 @@
 
 import java.io.IOException;
 import java.sql.SQLException;
+import org.apache.derby.shared.common.reference.SQLState;
 
 public abstract class ResultSet implements java.sql.ResultSet,
         ResultSetCallbackInterface,
@@ -221,10 +222,12 @@
         // TYPE_SCROLL_INSENSITIVE = 1004
         // TYPE_SCROLL_SENSITIVE = 1005
         if (resultSetType_ < statement_.resultSetType_) {
-            statement_.accumulateWarning
-                    (new SqlWarning(agent_.logWriter_, "Unable to open resultSet type " +
-                    statement_.resultSetType_ + "." +
-                    " ResultSet type " + resultSetType_ + " opened."));
+            statement_.accumulateWarning(
+                new SqlWarning(
+                    agent_.logWriter_, 
+                    new MessageId(SQLState.INVALID_RESULTSET_TYPE),
+                        new Integer(statement_.resultSetType_),
+                        new Integer(resultSetType_)));
         }
 
         // Only set the warning if actual resultSetConcurrency returned by the server is
@@ -232,10 +235,13 @@
         // CONCUR_READ_ONLY = 1007
         // CONCUR_UPDATABLE = 1008
         if (resultSetConcurrency_ < statement_.resultSetConcurrency_) {
-            statement_.accumulateWarning
-                    (new SqlWarning(agent_.logWriter_, "Unable to open ResultSet with concurrency
 " +
-                    statement_.resultSetConcurrency_ + "." +
-                    " ResultSet concurrency " + resultSetConcurrency_ + " is used."));
+            statement_.accumulateWarning(
+                new SqlWarning(
+                    agent_.logWriter_,
+                    new MessageId(SQLState.INVALID_RESULTSET_CONCURRENCY),
+                        new Integer(resultSetConcurrency_),
+                        new Integer(statement_.resultSetConcurrency_)));
+                
         }
 
         listenToUnitOfWork();
@@ -1773,7 +1779,7 @@
         if (agent_.loggingEnabled()) {
             agent_.logWriter_.traceExit(this, "getWarnings", warnings_);
         }
-        return warnings_;
+        return warnings_ == null ? null : warnings_.getSQLWarning();
     }
 
     public final void clearWarnings() throws SQLException {
@@ -2234,7 +2240,9 @@
             }
         }
         if (row > Integer.MAX_VALUE) {
-            this.accumulateWarning(new SqlWarning(agent_.logWriter_, "Value too large to
fit in an int."));
+            this.accumulateWarning(new SqlWarning(agent_.logWriter_, 
+                new MessageId(SQLState.NUMBER_OF_ROWS_TOO_LARGE_FOR_INT),
+                new Long(row)));
         }
         return (int) row;
     }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlException.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlException.java?rev=372923&r1=372922&r2=372923&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlException.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlException.java Fri Jan 27
09:21:51 2006
@@ -21,6 +21,7 @@
 package org.apache.derby.client.am;
 
 import java.sql.SQLException;
+import java.util.TreeMap;
 
 import org.apache.derby.client.resources.ResourceKeys;
 import org.apache.derby.shared.common.info.JVMInfo;
@@ -273,7 +274,7 @@
         {
             return wrappedException_;
         }
-                
+                        
         // When we have support for JDBC 4 SQLException subclasses, this is
         // where we decide which exception to create
         SQLException sqle = new SQLException(getMessage(), getSQLState(), 
@@ -387,14 +388,19 @@
     }
     
     public void setNextException(SQLException nextException)
-    {
+    {	
         if ( wrappedException_ != null )
         {
             wrappedException_.setNextException(nextException);
         }
         else
         {
-            nextException_ = new SqlException(nextException);
+            // Add this exception to the end of the chain
+            SqlException theEnd = this;
+            while (theEnd.nextException_ != null) {
+                theEnd = theEnd.nextException_;
+            }
+            theEnd.nextException_ = new SqlException(nextException);
         }
     }
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlWarning.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlWarning.java?rev=372923&r1=372922&r2=372923&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlWarning.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlWarning.java Fri Jan 27
09:21:51 2006
@@ -2,7 +2,8 @@
 
    Derby - Class org.apache.derby.client.am.SqlWarning
 
-   Copyright (c) 2001, 2005 The Apache Software Foundation or its licensors, where applicable.
+   Copyright (c) 2006 The Apache Software Foundation or its licensors, 
+   where applicable.
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
@@ -20,144 +21,106 @@
 
 package org.apache.derby.client.am;
 
-import org.apache.derby.client.resources.ResourceKeys;
+import java.sql.SQLWarning;
+import org.apache.derby.shared.common.info.JVMInfo;
 
-// Not yet done:
-//   Assign an ErrorKey, ResourceKey, and Resource for each throw statement.
-//   Save for future pass to avoid maintenance during development.
-
-// Until the "Error Cycle" pass is complete.
-// Use the temporary constructors at the bottom.
-
-public class SqlWarning extends java.sql.SQLWarning implements Diagnosable {
-    private java.lang.Throwable throwable_ = null;
-    protected Sqlca sqlca_ = null; // for engine generated errors only
-
-    //-----------------constructors-----------------------------------------------
-
-    public SqlWarning(LogWriter logWriter, ErrorKey errorKey) {
-        super(ResourceUtilities.getResource(ResourceKeys.driverOriginationIndicator) +
-                ResourceUtilities.getResource(errorKey.getResourceKey()),
-                errorKey.getSQLState(),
-                errorKey.getErrorCode());
-        if (logWriter != null) {
-            logWriter.traceDiagnosable(this);
-        }
-    }
-
-    public SqlWarning(LogWriter logWriter, ErrorKey errorKey, Object[] args) {
-        super(ResourceUtilities.getResource(ResourceKeys.driverOriginationIndicator) +
-                ResourceUtilities.getResource(errorKey.getResourceKey(), args),
-                errorKey.getSQLState(),
-                errorKey.getErrorCode());
-        if (logWriter != null) {
-            logWriter.traceDiagnosable(this);
-        }
-    }
-
-    public SqlWarning(LogWriter logWriter, ErrorKey errorKey, Object arg) {
-        this(logWriter, errorKey, new Object[]{arg});
-    }
-
-    public SqlWarning(LogWriter logWriter, Sqlca sqlca) {
-        super();
-        sqlca_ = sqlca;
-        if (logWriter != null) {
-            logWriter.traceDiagnosable(this);
-        }
-    }
-
-    // Temporary constructor until all error keys are defined.
-    public SqlWarning(LogWriter logWriter) {
-        super();
-        if (logWriter != null) {
-            logWriter.traceDiagnosable(this);
-        }
-    }
-
-    // Temporary constructor until all error keys are defined.
-    public SqlWarning(LogWriter logWriter, String text) {
-        super(text);
-        if (logWriter != null) {
-            logWriter.traceDiagnosable(this);
-        }
-    }
-
-    // Temporary constructor until all error keys are defined.
-    public SqlWarning(LogWriter logWriter, java.lang.Throwable throwable, String text) {
-        super(text);
-        throwable_ = throwable;
-        if (logWriter != null) {
-            logWriter.traceDiagnosable(this);
-        }
-    }
-
-    // Temporary constructor until all error keys are defined.
-    public SqlWarning(LogWriter logWriter, String text, SqlState sqlState) {
-        super(text, sqlState.getState());
-        if (logWriter != null) {
-            logWriter.traceDiagnosable(this);
-        }
-    }
-
-    // Temporary constructor until all error keys are defined, for subsystem use only
-    public SqlWarning(LogWriter logWriter, String text, String sqlState) {
-        super(text, sqlState);
-        if (logWriter != null) {
-            logWriter.traceDiagnosable(this);
-        }
-    }
-
-    // Temporary constructor until all error keys are defined.
-    public SqlWarning(LogWriter logWriter, String text, SqlState sqlState, SqlCode errorCode)
{
-        super(text, sqlState.getState(), errorCode.getCode());
-        if (logWriter != null) {
-            logWriter.traceDiagnosable(this);
-        }
-    }
-
-    // Temporary constructor until all error keys are defined, for subsystem use only.
-    public SqlWarning(LogWriter logWriter, String text, String sqlState, int errorCode) {
-        super(text, sqlState, errorCode);
-        if (logWriter != null) {
-            logWriter.traceDiagnosable(this);
-        }
-    }
-
-    public java.lang.Throwable getThrowable() {
-        return throwable_;
-    }
-
-    public Sqlca getSqlca() {
-        return sqlca_;
-    }
-
-    public String getMessage() {
-        if (sqlca_ == null) {
-            return super.getMessage();
-        } else {
-            return ((Sqlca) sqlca_).getJDBCMessage();
-        }
-    }
-
-    public String getSQLState() {
-        if (sqlca_ == null) {
-            return super.getSQLState();
-        } else {
-            return sqlca_.getSqlState();
-        }
-    }
-
-    public int getErrorCode() {
-        if (sqlca_ == null) {
-            return super.getErrorCode();
-        } else {
-            return sqlca_.getSqlCode();
-        }
-    }
-
-    public void printTrace(java.io.PrintWriter printWriter, String header) {
-        ExceptionFormatter.printTrace(this, printWriter, header);
+/**
+ * This represents a warning versus a full exception.  As with
+ * SqlException, this is an internal representation of java.sql.SQLWarning.
+ *
+ * Public JDBC methods need to convert an internal SqlWarning to a SQLWarning
+ * using <code>getSQLWarning()</code>
+ */
+public class SqlWarning extends SqlException implements Diagnosable {
+
+    protected SqlWarning nextWarning_;
+    
+    public SqlWarning(LogWriter logwriter, 
+        MessageId msgid, Object[] args, Throwable cause)
+    {
+        super(logwriter, msgid, args, cause);
+    }
+    
+    public SqlWarning(LogWriter logwriter, MessageId msgid, Object[] args)
+    {
+        this(logwriter, msgid, args, null);
+    }
+    
+    public SqlWarning (LogWriter logwriter, MessageId msgid)
+    {
+        super(logwriter, msgid);
+    }
+    
+    public SqlWarning(LogWriter logwriter, MessageId msgid, Object arg1)
+    {
+        super(logwriter, msgid, arg1);
+    }
+    
+    public SqlWarning(LogWriter logwriter,
+        MessageId msgid, Object arg1, Object arg2)
+    {
+        super(logwriter, msgid, arg1, arg2);
+    }
+    
+    public SqlWarning(LogWriter logwriter,
+        MessageId msgid, Object arg1, Object arg2, Object arg3)
+    {
+        super(logwriter, msgid, arg1, arg2, arg3);
+    }
+    
+    public SqlWarning(LogWriter logWriter, Sqlca sqlca)
+    {
+        super(logWriter, sqlca);
+    }
+    
+    public void setNextWarning(SqlWarning warning)
+    {
+        // Add this warning to the end of the chain
+        SqlWarning theEnd = this;
+        while (theEnd.nextWarning_ != null) {
+            theEnd = theEnd.nextWarning_;
+        }
+        theEnd.nextWarning_ = warning;
+    }
+    
+    public SqlWarning getNextWarning()
+    {
+        return nextWarning_;
+    }
+    
+    /**
+     * Get the java.sql.SQLWarning for this SqlWarning
+     */
+    public SQLWarning getSQLWarning()
+    {
+        SQLWarning sqlw = new SQLWarning(getMessage(), getSQLState(), 
+            getErrorCode());
+
+        // If we're in a runtime that supports chained exceptions, set the cause 
+        // of the SQLException.
+         if (JVMInfo.JDK_ID >= JVMInfo.J2SE_14 )
+        {
+            sqlw.initCause(getCause());
+        }
+
+        // Set up the nextException chain
+        if ( nextWarning_ != null )
+        {
+            // The exception chain gets constructed automatically through 
+            // the beautiful power of recursion
+            //
+            // We have to use the right method to convert the next exception
+            // depending upon its type.  Luckily with all the other subclasses
+            // of SQLException we don't have to make our own matching 
+            // subclasses because 
+            sqlw.setNextException(
+                nextException_ instanceof SqlWarning ?
+                    ((SqlWarning)nextException_).getSQLWarning() :
+                    nextException_.getSQLException());
+        }
+        
+        return sqlw;
+        
     }
 }
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Sqlca.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/client/am/Sqlca.java?rev=372923&r1=372922&r2=372923&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Sqlca.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Sqlca.java Fri Jan 27 09:21:51
2006
@@ -20,6 +20,8 @@
 
 package org.apache.derby.client.am;
 
+import org.apache.derby.shared.common.reference.SQLState;
+
 public abstract class Sqlca {
     transient protected Connection connection_;
     java.sql.SQLException exceptionThrownOnStoredProcInvocation_;
@@ -280,18 +282,12 @@
             current = current.copyAsUnchainedSQLException(agent_.logWriter_);
             if (current.getErrorCode() == -440) {
                 SqlWarning warningForStoredProcFailure = new SqlWarning(agent_.logWriter_,
-                        " Unable to obtain message text from server." +
-                        " See chained exception." +
-                        " The stored procedure SYSIBM.SQLCAMESSAGE is not installed on server."
+
-                        " Contact your DBA.");
+                    new MessageId(SQLState.UNABLE_TO_OBTAIN_MESSAGE_TEXT_FROM_SERVER));
                 warningForStoredProcFailure.setNextException(current.getSQLException());
                 connection_.accumulate440WarningForMessageProcFailure(warningForStoredProcFailure);
             } else if (current.getErrorCode() == -444) {
                 SqlWarning warningForStoredProcFailure = new SqlWarning(agent_.logWriter_,
-                        " Unable to obtain message text from server." +
-                        " See chained exception." +
-                        " The stored procedure SYSIBM.SQLCAMESSAGE cannot be accessed on
the server." +
-                        " Contact your DBA.");
+                    new MessageId(SQLState.UNABLE_TO_OBTAIN_MESSAGE_TEXT_FROM_SERVER));
                 warningForStoredProcFailure.setNextException(current.getSQLException());
                 connection_.accumulate444WarningForMessageProcFailure(warningForStoredProcFailure);
             } else {

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java?rev=372923&r1=372922&r2=372923&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java Fri Jan 27 09:21:51
2006
@@ -644,7 +644,7 @@
         if (agent_.loggingEnabled()) {
             agent_.logWriter_.traceExit(this, "getWarnings", warnings_);
         }
-        return warnings_;
+        return warnings_ == null ? null : warnings_.getSQLWarning();
     }
 
     public void clearWarnings() throws SQLException {
@@ -2032,7 +2032,7 @@
         if (warnings_ == null) {
             warnings_ = e;
         } else {
-            warnings_.setNextException(e);
+            warnings_.setNextWarning(e);
         }
     }
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/loc/clientmessages_en.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/loc/clientmessages_en.properties?rev=372923&r1=372922&r2=372923&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/loc/clientmessages_en.properties (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/loc/clientmessages_en.properties Fri
Jan 27 09:21:51 2006
@@ -35,6 +35,15 @@
 # will be used.
 #
 
+# 01 - Warnings 
+01X00=Unable to open resultSet type {0}. ResultSet type {1} opened.
+01X01=Unable to open ResultSet with concurrency {0}. ResultSet concurrency {1} is used.
+01X02=Scroll sensitive result sets are not supported by server; remapping to forward-only
cursor
+01X03=Insensitive updatable result sets are not supported by server; remapping to insensitive
read-only cursor
+01X04=Unable to obtain message text from server. See the next exception. The stored procedure
SYSIBM.SQLCAMESSAGE is not installed on the server. Please contact your database administrator.
+01X05=Number of rows returned ({0}) is too large to fit in an integer; the value returned
will be truncated.
+
+
 # 08 - Connection exceptions
 08003.C.1=getConnection() is not valid on a closed PooledConnection.
 
@@ -42,15 +51,13 @@
 0AX01.S=JDBC method is not yet implemented.
 
 # XN - Network-client driver-specific SQL states
-XN003.S=Blob offset ''{0}'' is either less than zero or is too large for the\
- current blob.
+XN003.S=Blob offset ''{0}'' is either less than zero or is too large for the current blob.
 XN004.S=Invalid operation: wasNull() called with no data retrieved.
-XN005.S=Invalid method call: parameter 1 is an integer OUT parameter returned\
- by the stored procedure, use getInt call.
+XN005.S=Invalid method call: parameter 1 is an integer OUT parameter returned by the stored
procedure, use getInt call.
 XN006.S=Invalid parameter: calendar is null.
 XN009.S=Invalid argument: parameter index {0} is not an OUT or INOUT parameter.
-XN010.S=Parameter 1 is the return clause of the stored procedure call. It can\
- only be registered as an integer type.
+XN010.S=Parameter 1 is the return clause of the stored procedure call. It can only be registered
as an integer type.
+
 
 
 

Modified: db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java?rev=372923&r1=372922&r2=372923&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
Fri Jan 27 09:21:51 2006
@@ -648,6 +648,14 @@
 	// 0100C is not returned for procedures written in Java, from the SQL2003 spec.
 	String LANG_DYNAMIC_RESULTS_RETURNED							   = "0100C";
 	String LANG_TOO_MANY_DYNAMIC_RESULTS_RETURNED					   = "0100E";
+    
+    // Warnings from the network client
+    String INVALID_RESULTSET_TYPE                                      = "01X00";
+    String INVALID_RESULTSET_CONCURRENCY                               = "01X01";
+    String SCROLL_SENSITIVE_NOT_SUPPORTED                              = "01X02";
+    String INSENSITIVE_UPDATABLE_NOT_SUPPORTED                         = "01X03";
+    String UNABLE_TO_OBTAIN_MESSAGE_TEXT_FROM_SERVER                   = "01X04";
+    String NUMBER_OF_ROWS_TOO_LARGE_FOR_INT                            = "01X05";
 
 
 	// TRANSACTION severity language errors. These are in the range:
@@ -1497,12 +1505,12 @@
      * to keep track of the numbers to ensure we don't duplicate the 
      * SQL State
      */
-    String INVALID_BLOB_OFFSET = "XN003.S";
-    String WASNULL_INVALID = "XN004.S";
-    String INVALID_PARAM_USE_GETINT = "XN005.S";
-    String CALENDAR_IS_NULL = "XN006.S";
-    String PARAM_NOT_OUT_OR_INOUT = "XN009.S";
-    String RETURN_PARAM_MUST_BE_INT = "XN010.S";
+    String INVALID_BLOB_OFFSET                                      = "XN003.S";
+    String WASNULL_INVALID                                          = "XN004.S";
+    String INVALID_PARAM_USE_GETINT                                 = "XN005.S";
+    String CALENDAR_IS_NULL                                         = "XN006.S";
+    String PARAM_NOT_OUT_OR_INOUT                                   = "XN009.S";
+    String RETURN_PARAM_MUST_BE_INT                                 = "XN010.S";
     
 	/*
 	** org.apache.derby.database.UserUtility

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/updatableResultSet.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/updatableResultSet.out?rev=372923&r1=372922&r2=372923&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/updatableResultSet.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/jdk14/updatableResultSet.out
Fri Jan 27 09:21:51 2006
@@ -1,6 +1,6 @@
 Start testing delete and update using JDBC2.0 updateable resultset apis
 Negative Testl - request for scroll insensitive updatable resultset will give a read only
scroll insensitive resultset
-WARNING (no SQLState): Insensitive updatable result sets are not supported by server; remapping
to insensitive read-only cursor
+WARNING 01X03: Insensitive updatable result sets are not supported by server; remapping to
insensitive read-only cursor
 requested TYPE_SCROLL_INSENSITIVE, CONCUR_UPDATABLE but that is not supported
 Make sure that we got TYPE_SCROLL_INSENSITIVE? true
 Make sure that we got CONCUR_READ_ONLY? true
@@ -13,8 +13,7 @@
 SQL State : null
 Got expected exception This method cannot be invoked while the cursor is on the insert row
or if the concurrency of this ResultSet object is CONCUR_READ_ONLY.
 Negative Test2 - request for scroll sensitive updatable resultset will give a read only scroll
insensitive resultset
-WARNING (no SQLState): Scroll sensitive result sets are not supported by server; remapping
to forward-only cursor
-WARNING (no SQLState): Insensitive updatable result sets are not supported by server; remapping
to insensitive read-only cursor
+WARNING 01X02: Scroll sensitive result sets are not supported by server; remapping to forward-only
cursor
 requested TYPE_SCROLL_SENSITIVE, CONCUR_UPDATABLE but that is not supported
 Jira issue Derby-154 : When client connects to Network Server using JCC, it incorrectly shows
support for scroll sensitive updatable resultsets
 Make sure that we got TYPE_SCROLL_INSENSITIVE? true

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/scrollCursors2.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/scrollCursors2.out?rev=372923&r1=372922&r2=372923&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/scrollCursors2.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/scrollCursors2.out
Fri Jan 27 09:21:51 2006
@@ -1,25 +1,23 @@
-Test scrollCurors2 starting
-Invalid maxRows value: -1
-This method should only be called on ResultSet objects that are scrollable(type TYPE_SCROLL_SENSITIVE
or TYPE_SCROLL_INSENSITIVE)
-This method should only be called on ResultSet objects that are scrollable(type TYPE_SCROLL_SENSITIVE
or TYPE_SCROLL_INSENSITIVE)
-This method should only be called on ResultSet objects that are scrollable(type TYPE_SCROLL_SENSITIVE
or TYPE_SCROLL_INSENSITIVE)
-This method should only be called on ResultSet objects that are scrollable(type TYPE_SCROLL_SENSITIVE
or TYPE_SCROLL_INSENSITIVE)
-This method should only be called on ResultSet objects that are scrollable(type TYPE_SCROLL_SENSITIVE
or TYPE_SCROLL_INSENSITIVE)
-This method should only be called on ResultSet objects that are scrollable(type TYPE_SCROLL_SENSITIVE
or TYPE_SCROLL_INSENSITIVE)
-This method should only be called on ResultSet objects that are scrollable(type TYPE_SCROLL_SENSITIVE
or TYPE_SCROLL_INSENSITIVE)
-This method should only be called on ResultSet objects that are scrollable(type TYPE_SCROLL_SENSITIVE
or TYPE_SCROLL_INSENSITIVE)
-This method should only be called on ResultSet objects that are scrollable(type TYPE_SCROLL_SENSITIVE
or TYPE_SCROLL_INSENSITIVE)
-This method should only be called on ResultSet objects that are scrollable(type TYPE_SCROLL_SENSITIVE
or TYPE_SCROLL_INSENSITIVE)
-warning = org.apache.derby.client.am.SqlWarning: Scroll sensitive result sets are not supported
by server; remapping to forward-only cursor
-warning = org.apache.derby.client.am.SqlWarning: Scroll sensitive result sets are not supported
by server; remapping to forward-only cursor
-warning = org.apache.derby.client.am.SqlWarning: Insensitive updatable result sets are not
supported by server; remapping to insensitive read-only cursor
-warning = org.apache.derby.client.am.SqlWarning: Insensitive updatable result sets are not
supported by server; remapping to insensitive read-only cursor
-warning = org.apache.derby.client.am.SqlWarning: Insensitive updatable result sets are not
supported by server; remapping to insensitive read-only cursor
-Invalid maxRows value: -1
-Invalid fetch size -5
-warning = org.apache.derby.client.am.SqlWarning: Scroll sensitive result sets are not supported
by server; remapping to forward-only cursor
-warning = org.apache.derby.client.am.SqlWarning: Scroll sensitive result sets are not supported
by server; remapping to forward-only cursor
-warning = org.apache.derby.client.am.SqlWarning: Insensitive updatable result sets are not
supported by server; remapping to insensitive read-only cursor
-warning = org.apache.derby.client.am.SqlWarning: Insensitive updatable result sets are not
supported by server; remapping to insensitive read-only cursor
-PASS
-Test scrollCursors2 finished
+Test scrollCurors2 starting
+Invalid maxRows value: -1
+This method should only be called on ResultSet objects that are scrollable(type TYPE_SCROLL_SENSITIVE
or TYPE_SCROLL_INSENSITIVE)
+This method should only be called on ResultSet objects that are scrollable(type TYPE_SCROLL_SENSITIVE
or TYPE_SCROLL_INSENSITIVE)
+This method should only be called on ResultSet objects that are scrollable(type TYPE_SCROLL_SENSITIVE
or TYPE_SCROLL_INSENSITIVE)
+This method should only be called on ResultSet objects that are scrollable(type TYPE_SCROLL_SENSITIVE
or TYPE_SCROLL_INSENSITIVE)
+This method should only be called on ResultSet objects that are scrollable(type TYPE_SCROLL_SENSITIVE
or TYPE_SCROLL_INSENSITIVE)
+This method should only be called on ResultSet objects that are scrollable(type TYPE_SCROLL_SENSITIVE
or TYPE_SCROLL_INSENSITIVE)
+This method should only be called on ResultSet objects that are scrollable(type TYPE_SCROLL_SENSITIVE
or TYPE_SCROLL_INSENSITIVE)
+This method should only be called on ResultSet objects that are scrollable(type TYPE_SCROLL_SENSITIVE
or TYPE_SCROLL_INSENSITIVE)
+This method should only be called on ResultSet objects that are scrollable(type TYPE_SCROLL_SENSITIVE
or TYPE_SCROLL_INSENSITIVE)
+This method should only be called on ResultSet objects that are scrollable(type TYPE_SCROLL_SENSITIVE
or TYPE_SCROLL_INSENSITIVE)
+warning = java.sql.SQLWarning: Scroll sensitive result sets are not supported by server;
remapping to forward-only cursor
+warning = java.sql.SQLWarning: Scroll sensitive result sets are not supported by server;
remapping to forward-only cursor
+warning = java.sql.SQLWarning: Insensitive updatable result sets are not supported by server;
remapping to insensitive read-only cursor
+warning = java.sql.SQLWarning: Insensitive updatable result sets are not supported by server;
remapping to insensitive read-only cursor
+Invalid maxRows value: -1
+Invalid fetch size -5
+warning = java.sql.SQLWarning: Scroll sensitive result sets are not supported by server;
remapping to forward-only cursor
+warning = java.sql.SQLWarning: Scroll sensitive result sets are not supported by server;
remapping to forward-only cursor
+warningCount expected to be 2, not 1
+warning = java.sql.SQLWarning: Insensitive updatable result sets are not supported by server;
remapping to insensitive read-only cursor
+Test scrollCursors2 finished

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/updatableResultSet.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/updatableResultSet.out?rev=372923&r1=372922&r2=372923&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/updatableResultSet.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/updatableResultSet.out
Fri Jan 27 09:21:51 2006
@@ -1,6 +1,6 @@
 Start testing delete and update using JDBC2.0 updateable resultset apis
 Negative Testl - request for scroll insensitive updatable resultset will give a read only
scroll insensitive resultset
-WARNING (no SQLState): Insensitive updatable result sets are not supported by server; remapping
to insensitive read-only cursor
+WARNING 01X03: Insensitive updatable result sets are not supported by server; remapping to
insensitive read-only cursor
 requested TYPE_SCROLL_INSENSITIVE, CONCUR_UPDATABLE but that is not supported
 Make sure that we got TYPE_SCROLL_INSENSITIVE? true
 Make sure that we got CONCUR_READ_ONLY? true
@@ -13,8 +13,7 @@
 SQL State : null
 Got expected exception This method cannot be invoked while the cursor is on the insert row
or if the concurrency of this ResultSet object is CONCUR_READ_ONLY.
 Negative Test2 - request for scroll sensitive updatable resultset will give a read only scroll
insensitive resultset
-WARNING (no SQLState): Scroll sensitive result sets are not supported by server; remapping
to forward-only cursor
-WARNING (no SQLState): Insensitive updatable result sets are not supported by server; remapping
to insensitive read-only cursor
+WARNING 01X02: Scroll sensitive result sets are not supported by server; remapping to forward-only
cursor
 requested TYPE_SCROLL_SENSITIVE, CONCUR_UPDATABLE but that is not supported
 Jira issue Derby-154 : When client connects to Network Server using JCC, it incorrectly shows
support for scroll sensitive updatable resultsets
 Make sure that we got TYPE_SCROLL_INSENSITIVE? true
@@ -645,9 +644,9 @@
     Using column name as first parameter to updateDouble
   Testing updateString on SQL type SMALLINT
     Using column position as first parameter to updateString
-      Got expected exception : Invalid data conversion: Parameter instance 1992         
                                               is invalid for requested conversion.
+      Got expected exception : Invalid data conversion: Parameter instance 1992         
                                               is invalid for requested conversion. Caused
by exception class java.lang.NumberFormatException: 1992                                 
                      
     Using column name as first parameter to updateString
-      Got expected exception : Invalid data conversion: Parameter instance 1992         
                                               is invalid for requested conversion.
+      Got expected exception : Invalid data conversion: Parameter instance 1992         
                                               is invalid for requested conversion. Caused
by exception class java.lang.NumberFormatException: 1992                                 
                      
   Testing updateAsciiStream on SQL type SMALLINT
     Using column position as first parameter to updateAsciiStream
       Got expected exception : Illegal Conversion
@@ -725,9 +724,9 @@
     Using column name as first parameter to updateDouble
   Testing updateString on SQL type INTEGER
     Using column position as first parameter to updateString
-      Got expected exception : Invalid data conversion: Parameter instance 1992         
                                               is invalid for requested conversion.
+      Got expected exception : Invalid data conversion: Parameter instance 1992         
                                               is invalid for requested conversion. Caused
by exception class java.lang.NumberFormatException: 1992                                 
                      
     Using column name as first parameter to updateString
-      Got expected exception : Invalid data conversion: Parameter instance 1992         
                                               is invalid for requested conversion.
+      Got expected exception : Invalid data conversion: Parameter instance 1992         
                                               is invalid for requested conversion. Caused
by exception class java.lang.NumberFormatException: 1992                                 
                      
   Testing updateAsciiStream on SQL type INTEGER
     Using column position as first parameter to updateAsciiStream
       Got expected exception : Illegal Conversion
@@ -805,9 +804,9 @@
     Using column name as first parameter to updateDouble
   Testing updateString on SQL type BIGINT
     Using column position as first parameter to updateString
-      Got expected exception : Invalid data conversion: Parameter instance 1992         
                                               is invalid for requested conversion.
+      Got expected exception : Invalid data conversion: Parameter instance 1992         
                                               is invalid for requested conversion. Caused
by exception class java.lang.NumberFormatException: 1992                                 
                      
     Using column name as first parameter to updateString
-      Got expected exception : Invalid data conversion: Parameter instance 1992         
                                               is invalid for requested conversion.
+      Got expected exception : Invalid data conversion: Parameter instance 1992         
                                               is invalid for requested conversion. Caused
by exception class java.lang.NumberFormatException: 1992                                 
                      
   Testing updateAsciiStream on SQL type BIGINT
     Using column position as first parameter to updateAsciiStream
       Got expected exception : Illegal Conversion
@@ -885,9 +884,9 @@
     Using column name as first parameter to updateDouble
   Testing updateString on SQL type DECIMAL(10,5)
     Using column position as first parameter to updateString
-      Got expected exception : Invalid data conversion: Parameter instance 1992         
                                               is invalid for requested conversion.
+      Got expected exception : Invalid data conversion: Parameter instance 1992         
                                               is invalid for requested conversion. Caused
by exception class java.lang.NumberFormatException: 1992  
     Using column name as first parameter to updateString
-      Got expected exception : Invalid data conversion: Parameter instance 1992         
                                               is invalid for requested conversion.
+      Got expected exception : Invalid data conversion: Parameter instance 1992         
                                               is invalid for requested conversion. Caused
by exception class java.lang.NumberFormatException: 1992  
   Testing updateAsciiStream on SQL type DECIMAL(10,5)
     Using column position as first parameter to updateAsciiStream
       Got expected exception : Illegal Conversion
@@ -2053,9 +2052,9 @@
   updateObject with column position & Double object as parameters
   updateObject with column name & Double object as parameters
   updateObject with column position & String object as parameters
-    Got expected exception : Invalid data conversion: Parameter instance 1992           
                                             is invalid for requested conversion.
+    Got expected exception : Invalid data conversion: Parameter instance 1992           
                                             is invalid for requested conversion. Caused by
exception class java.lang.NumberFormatException: 1992                                    
                   
   updateObject with column name & String object as parameters
-    Got expected exception : Invalid data conversion: Parameter instance 1992           
                                             is invalid for requested conversion.
+    Got expected exception : Invalid data conversion: Parameter instance 1992           
                                             is invalid for requested conversion. Caused by
exception class java.lang.NumberFormatException: 1992                                    
                   
   updateObject with column position & bytes[] array as parameters
     Got expected exception : Illegal Conversion
   updateObject with column name & bytes[] array as parameters
@@ -2092,9 +2091,9 @@
   updateObject with column position & Double object as parameters
   updateObject with column name & Double object as parameters
   updateObject with column position & String object as parameters
-    Got expected exception : Invalid data conversion: Parameter instance 1992           
                                             is invalid for requested conversion.
+    Got expected exception : Invalid data conversion: Parameter instance 1992           
                                             is invalid for requested conversion. Caused by
exception class java.lang.NumberFormatException: 1992                                    
                   
   updateObject with column name & String object as parameters
-    Got expected exception : Invalid data conversion: Parameter instance 1992           
                                             is invalid for requested conversion.
+    Got expected exception : Invalid data conversion: Parameter instance 1992           
                                             is invalid for requested conversion. Caused by
exception class java.lang.NumberFormatException: 1992                                    
                   
   updateObject with column position & bytes[] array as parameters
     Got expected exception : Illegal Conversion
   updateObject with column name & bytes[] array as parameters
@@ -2131,9 +2130,9 @@
   updateObject with column position & Double object as parameters
   updateObject with column name & Double object as parameters
   updateObject with column position & String object as parameters
-    Got expected exception : Invalid data conversion: Parameter instance 1992           
                                             is invalid for requested conversion.
+    Got expected exception : Invalid data conversion: Parameter instance 1992           
                                             is invalid for requested conversion. Caused by
exception class java.lang.NumberFormatException: 1992                                    
                   
   updateObject with column name & String object as parameters
-    Got expected exception : Invalid data conversion: Parameter instance 1992           
                                             is invalid for requested conversion.
+    Got expected exception : Invalid data conversion: Parameter instance 1992           
                                             is invalid for requested conversion. Caused by
exception class java.lang.NumberFormatException: 1992                                    
                   
   updateObject with column position & bytes[] array as parameters
     Got expected exception : Illegal Conversion
   updateObject with column name & bytes[] array as parameters
@@ -2170,9 +2169,9 @@
   updateObject with column position & Double object as parameters
   updateObject with column name & Double object as parameters
   updateObject with column position & String object as parameters
-    Got expected exception : Invalid data conversion: Parameter instance 1992           
                                             is invalid for requested conversion.
+    Got expected exception : Invalid data conversion: Parameter instance 1992           
                                             is invalid for requested conversion. Caused by
exception class java.lang.NumberFormatException: 1992  
   updateObject with column name & String object as parameters
-    Got expected exception : Invalid data conversion: Parameter instance 1992           
                                             is invalid for requested conversion.
+    Got expected exception : Invalid data conversion: Parameter instance 1992           
                                             is invalid for requested conversion. Caused by
exception class java.lang.NumberFormatException: 1992  
   updateObject with column position & bytes[] array as parameters
     Got expected exception : Illegal Conversion
   updateObject with column name & bytes[] array as parameters



Mime
View raw message