You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by fu...@apache.org on 2006/02/16 19:50:59 UTC

svn commit: r378337 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests: master/j9_22/ tests/jdbcapi/ tests/lang/ tests/store/

Author: fuzzylogic
Date: Thu Feb 16 10:50:58 2006
New Revision: 378337

URL: http://svn.apache.org/viewcvs?rev=378337&view=rev
Log:
DERBY-903: Remove use of String(byte[]) constructors in tests. Also, fix casing
of previously committed errorCode master

Committed for Myrna Van Lunteren <m....@gmail.com>

Added:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_22/errorCode.out
Removed:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_22/errorcode.out
Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/blobclob4BLOB.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/resultset.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/coalesceTests.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/streamingColumn.java

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_22/errorCode.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_22/errorCode.out?rev=378337&view=auto
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_22/errorCode.out (added)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_22/errorCode.out Thu Feb 16 10:50:58 2006
@@ -0,0 +1,395 @@
+ij> --
+-- this test shows the error code functionality
+--
+-- specify an invalid driver
+driver 'java.lang.Integer';
+IJ ERROR: Could not locate class java.lang.Integer
+ij> -- now a valid driver
+driver 'org.apache.derby.jdbc.EmbeddedDriver';
+ij> -- specify an invalid database
+connect 'asdfasdf';
+ERROR 08001: Driver not found: asdfasdf (errorCode = 0)
+ij> -- now a valid database, but no create
+connect 'jdbc:derby:wombat';
+ERROR XJ004: Database 'wombat' not found. (errorCode = 40000)
+ij> -- now a valid database
+connect 'jdbc:derby:wombat;create=true';
+ij> -- create the table
+create table t(i int, s smallint);
+0 rows inserted/updated/deleted
+ij> -- populate the table
+insert into t values (1,2);
+1 row inserted/updated/deleted
+ij> insert into t values (null,2);
+1 row inserted/updated/deleted
+ij> -- parser error
+-- bug 5701
+create table t(i nt, s smallint);
+ERROR 42X01: Syntax error: Encountered "" at line 3, column 18. (errorCode = 30000)
+ij> -- non-boolean where clause
+select * from t where i;
+ERROR 42X19: The WHERE or HAVING clause or CHECK CONSTRAINT definition is a 'INTEGER' expression.  It must be a BOOLEAN expression. (errorCode = 30000)
+ij> -- invalid correlation name for "*"
+select asdf.* from t;
+ERROR 42X10: 'ASDF' is not an exposed table name in the scope in which it appears. (errorCode = 30000)
+ij> -- execution time error
+select i/0 from t;
+1          
+-----------
+ERROR 22012: Attempt to divide by zero. (errorCode = 30000)
+ij> -- test ErrorMessages VTI
+select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = '07000';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+07000|At least one parameter to the current statement is uninitialized.                                                               |20000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = '22012';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+22012|Attempt to divide by zero.                                                                                                      |20000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = '42X74';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+42X74|Invalid CALL statement syntax.                                                                                                  |20000      
+ij> -- test ErrorMessages VTI for severe errors
+-- session_severity
+select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = '04501';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+04501|Database connection refused.                                                                                                    |40000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = '28502';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+28502|The user name '{0}' is not valid.                                                                                               |40000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XJ004';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XJ004|Database '{0}' not found.                                                                                                       |40000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XJ028';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XJ028|The URL '{0}' is not properly formed.                                                                                           |40000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XJ040';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XJ040|Failed to start database '{0}', see the next exception for details.                                                             |40000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XJ041';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XJ041|Failed to create database '{0}', see the next exception for details.                                                            |40000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XJ049';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XJ049|Conflicting create attributes specified.                                                                                        |40000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XJ081';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XJ081|Invalid value '{0}' passed as parameter '{1}' to method '{2}'                                                                   |20000      
+XJ081|Conflicting create/restore/recovery attributes specified.                                                                       |40000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XJ05B';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XJ05B|JDBC attribute '{0}' has an invalid value '{1}', valid values are '{2}'.                                                        |40000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XXXXX';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XXXXX|Normal database session close.                                                                                                  |40000      
+ij> -- database_severity
+select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XBM01';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XBM01|Startup failed due to an exception. See next exception for details.                                                             |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XBM02';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XBM02|Startup failed due to missing functionality for {0}. Please ensure your classpath includes the correct Derby software.          |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XBM05';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XBM05|Startup failed due to missing product version information for {0}.                                                              |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XBM06';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XBM06|Startup failed. An encrypted database cannot be accessed without the correct boot password.                                     |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XBM07';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XBM07|Startup failed. Boot password must be at least 8 bytes long.                                                                    |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XBM08';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XBM08|Could not instantiage {0} StorageFactory class {1}.                                                                             |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XBM0G';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XBM0G|Failed to start encryption engine. Please make sure you are running Java 2 and have downloaded an encryption provider such as j&|45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XBM0H';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XBM0H|Directory {0} cannot be created.                                                                                                |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XBM0I';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XBM0I|Directory {0} cannot be removed.                                                                                                |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XBM0J';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XBM0J|Directory {0} already exists.                                                                                                   |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XBM0K';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XBM0K|Unknown sub-protocol for database name {0}.                                                                                     |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XBM0L';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XBM0L|Specified authentication scheme class {0} does implement the authentication interface {1}.                                      |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XBM0M';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XBM0M|Error creating instance of authentication scheme class {0}.                                                                     |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XBM0N';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XBM0N|JDBC Driver registration with java.sql.DriverManager failed. See next exception for details.                                    |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XBM0P';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XBM0P|Service provider is read-only. Operation not permitted.                                                                         |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XBM0Q';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XBM0Q|File {0} not found. Please make sure that backup copy is the correct one and it is not corrupted.                               |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XBM0R';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XBM0R|Unable to remove File {0}.                                                                                                      |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XBM0S';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XBM0S|Unable to rename file '{0}' to '{1}'                                                                                            |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XBM0T';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XBM0T|Ambiguous sub-protocol for database name {0}.                                                                                   |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XBM0X';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XBM0X|Supplied territory description '{0}' is invalid, expecting ln[_CO[_variant]]
+ln=lower-case two-letter ISO-639 language code, CO&|45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XBM0Y';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XBM0Y|Backup database directory {0} not found. Please make sure that the specified backup path is right.                              |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XBM0Z';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XBM0Z|Unable to copy file '{0}' to '{1}'. Please make sure that there is enough space and permissions are correct.                    |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XCW00';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XCW00|Unsupported upgrade from '{0}' to '{1}'.                                                                                        |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLA0';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSLA0|Cannot flush the log file to disk {0}.                                                                                          |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLA1';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSLA1|Log Record has been sent to the stream, but it cannot be applied to the store (Object {0}).  This may cause recovery problems a&|45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLA2';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSLA2|System will shutdown, got I/O Exception while accessing log file.                                                               |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLA3';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSLA3|Log Corrupted, has invalid data in the log stream.                                                                              |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLA4';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSLA4|Cannot write to the log, most likely the log is full.  Please delete unnecessary files.  It is also possible that the file syst&|45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLA5';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSLA5|Cannot read log stream for some reason to rollback transaction {0}.                                                             |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLA6';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSLA6|Cannot recover the database.                                                                                                    |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLA7';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSLA7|Cannot redo operation {0} in the log.                                                                                           |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLA8';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSLA8|Cannot rollback transaction {0}, trying to compensate {1} operation with {2}                                                    |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLAA';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSLAA|The store has been marked for shutdown by an earlier exception.                                                                 |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLAB';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSLAB|Cannot find log file {0}, please make sure your logDevice property is properly set with the correct path separator for your pla&|45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLAC';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSLAC|Database at {0} have incompatible format with the current version of software, it may have been created by or upgraded by a lat&|45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLAD';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSLAD|log Record at instant {2} in log file {3} corrupted. Expected log record length {0}, real length {1}.                           |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLAE';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSLAE|Control file at {0} cannot be written or updated.                                                                               |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLAF';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSLAF|A Read Only database was created with dirty data buffers.                                                                       |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLAH';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSLAH|A Read Only database is being updated.                                                                                          |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLAI';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSLAI|Cannot log the checkpoint log record                                                                                            |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLAJ';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSLAJ|The logging system has been marked to shut down due to an earlier problem and will not allow any more operations until the syst&|45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLAK';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSLAK|Database has exceeded largest log file number {0}.                                                                              |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLAL';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSLAL|log record size {2} exceeded the maximum allowable log file size {3}. Error encounted in log file {0}, position {1}             |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLAM';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSLAM|Cannot verify database format at {1} due to IOException.                                                                        |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLAN';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSLAN|Database at {0} has an incompatible format with the current version of the software.  The database was created by or upgraded b&|45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLAO';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSLAO|Recovery failed unexpected problem {0}.                                                                                         |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLAP';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSLAP|Database at {0} is at version {1}. Beta databases cannot be upgraded,                                                           |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLAQ';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSLAQ|cannot create log file at directory {0}.                                                                                        |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLAR';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSLAR|Unable to copy log file '{0}' to '{1}' during restore. Please make sure that there is enough space and permissions are correct. |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLAS';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSLAS|Log directory {0} not found in backup during restore. Please make sure that backup copy is the correct one and it is not corrup&|45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLAT';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSLAT|Log directory {0} exists. Please make sure specified logDevice location is correct.                                             |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSDB0';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSDB1';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSDB2';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSDB3';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSDB4';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSDB5';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSDB6';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSDB7';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSDB8';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSDB9';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSDBA';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSDG0';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSDG0|Page {0} could not be read from disk.                                                                                           |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSDG1';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSDG1|Page {0} could not be written to disk, please check if disk is full.                                                            |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSDG2';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSDG2|Invalid checksum on Page {0}, expected={1}, on-disk version={2}, page dump follows: {3}                                         |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSDG3';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSDG3|Meta-data for Container {0} could not be accessed                                                                               |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSDG5';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSDG5|Database is not in create mode when createFinished is called.                                                                   |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSDG6';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSDG6|Data segment directory not found in {0} backup during restore. Please make sure that backup copy is the right one and it is not&|45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSDG7';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSDG7|Directory {0} could not be removed during restore. Please make sure that permissions are correct.                               |45000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSDG8';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSDG8|Unable to copy directory '{0}' to '{1}' during restore. Please make sure that there is enough space and permissions are correct&|45000      
+ij> -- system_severity
+select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSTB0';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSTB0|An exception was thrown during transaction abort.                                                                               |50000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSTB2';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSTB2|Cannot log transaction changes, maybe trying to write to a read only database.                                                  |50000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSTB3';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSTB3|Cannot abort transaction because the log manager is null, probably due to an earlier error.                                     |50000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSTB5';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSTB5|Creating database with logging disabled encountered unexpected problem.                                                         |50000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSTB6';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XSTB6|Cannot substitue a transaction table with another while one is already in use.                                                  |50000      
+ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XJ015';
+SQL_&|MESSAGE                                                                                                                         |SEVERITY   
+--------------------------------------------------------------------------------------------------------------------------------------------------
+XJ015|Derby system shutdown.                                                                                                          |50000      
+ij> -- cleanup
+drop table t;
+0 rows inserted/updated/deleted
+ij> 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/blobclob4BLOB.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/blobclob4BLOB.java?rev=378337&r1=378336&r2=378337&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/blobclob4BLOB.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/blobclob4BLOB.java Thu Feb 16 10:50:58 2006
@@ -40,6 +40,7 @@
 import java.sql.ResultSet;
 import java.sql.ResultSetMetaData;
 import java.sql.SQLException;
+import java.io.UnsupportedEncodingException;
 import java.sql.Statement;
 import java.sql.Types;
 
@@ -2710,10 +2711,10 @@
                 "insert into testBlob (a, b) values(?,?)");
 
             // insert small strings
-			insertRow(ps,"".getBytes());
-            insertRow(ps,"you can lead a horse to water but you can't form it into beverage".getBytes());
-            insertRow(ps,"a stitch in time says ouch".getBytes());
-            insertRow(ps,"here is a string with a return \n character".getBytes());
+			insertRow(ps,"".getBytes("US-ASCII"));
+            insertRow(ps,"you can lead a horse to water but you can't form it into beverage".getBytes("US-ASCII"));
+            insertRow(ps,"a stitch in time says ouch".getBytes("US-ASCII"));
+            insertRow(ps,"here is a string with a return \n character".getBytes("US-ASCII"));
 
             // insert larger strings using setAsciiStream
             for (int i = 0; i < numFiles; i++)
@@ -2779,10 +2780,10 @@
                 "insert into testBinary values(?,?)");
 
             // insert small strings
-			insertRow(ps,"".getBytes());
-            insertRow(ps,"you can lead a horse to water but you can't form it into beverage".getBytes());
-            insertRow(ps,"a stitch in time says ouch".getBytes());
-            insertRow(ps,"here is a string with a return \n character".getBytes());
+			insertRow(ps,"".getBytes("US-ASCII"));
+            insertRow(ps,"you can lead a horse to water but you can't form it into beverage".getBytes("US-ASCII"));
+            insertRow(ps,"a stitch in time says ouch".getBytes("US-ASCII"));
+            insertRow(ps,"here is a string with a return \n character".getBytes("US-ASCII"));
 
             // insert a null
             // ps.setNull(1, Types.BINARY);
@@ -2821,14 +2822,14 @@
 			stmt.execute("alter table searchBlob add column a blob(300k)");
             PreparedStatement ps = conn.prepareStatement(
                 "insert into searchBlob (a, b) values(?,?)");
-            insertRow(ps,"horse".getBytes());
-            insertRow(ps,"ouch".getBytes());
-            insertRow(ps,"\n".getBytes());
-            insertRow(ps,"".getBytes());
-            insertRow(ps,"Beginning".getBytes());
-            insertRow(ps,"position-69".getBytes());
-            insertRow(ps,"I-am-hiding-here-at-position-5910".getBytes());
-            insertRow(ps,"Position-9907".getBytes());
+            insertRow(ps,"horse".getBytes("US-ASCII"));
+            insertRow(ps,"ouch".getBytes("US-ASCII"));
+            insertRow(ps,"\n".getBytes("US-ASCII"));
+            insertRow(ps,"".getBytes("US-ASCII"));
+            insertRow(ps,"Beginning".getBytes("US-ASCII"));
+            insertRow(ps,"position-69".getBytes("US-ASCII"));
+            insertRow(ps,"I-am-hiding-here-at-position-5910".getBytes("US-ASCII"));
+            insertRow(ps,"Position-9907".getBytes("US-ASCII"));
 
             // insert larger blobs using setBinaryStream
             for (int i = 0; i < numFiles; i++)
@@ -2948,13 +2949,13 @@
                 blobclob4BLOB.printInterval(blob, 1, 50, 5, i, blobLength);
                 blobclob4BLOB.printInterval(blob, 1, 1, 6, i, blobLength);
                 /*
-                System.out.println(i + "(0) " + new String(blob.getBytes(9905,50)));
-                System.out.println(i + "(1) " + new String(blob.getBytes(5910,150)));
-                System.out.println(i + "(2) " + new String(blob.getBytes(5910,50)));
-                System.out.println(i + "(3) " + new String(blob.getBytes(204,50)));
-                System.out.println(i + "(4) " + new String(blob.getBytes(68,50)));
-                System.out.println(i + "(5) " + new String(blob.getBytes(1,50)));
-                System.out.println(i + "(6) " + new String(blob.getBytes(1,1)));
+                System.out.println(i + "(0) " + new String(blob.getBytes(9905,50), "US-ASCII"));
+                System.out.println(i + "(1) " + new String(blob.getBytes(5910,150), "US-ASCII"));
+                System.out.println(i + "(2) " + new String(blob.getBytes(5910,50), "US-ASCII"));
+                System.out.println(i + "(3) " + new String(blob.getBytes(204,50), "US-ASCII"));
+                System.out.println(i + "(4) " + new String(blob.getBytes(68,50), "US-ASCII"));
+                System.out.println(i + "(5) " + new String(blob.getBytes(1,50), "US-ASCII"));
+                System.out.println(i + "(6) " + new String(blob.getBytes(1,1), "US-ASCII"));
                 */
                 if (blobLength > 100)
                 {
@@ -2964,7 +2965,7 @@
                         System.out.println("FAIL : length of bytes is " +
                             res.length + " should be 100");
                     else
-                        System.out.println(new String(res));
+                        System.out.println(new String(res, "US-ASCII")); // ensure fixed string
                 }
             }
             System.out.println("blobTest2 finished");
@@ -3075,7 +3076,8 @@
                         continue;
                     }
                     if (blobLength2 < 150)
-                        searchStr = new String(rs2.getBytes(1));
+                        // get string for printing from bytes in fixed format
+                        searchStr = new String(rs2.getBytes(1),"US-ASCII");
                     else
                         searchStr = null;
 
@@ -3145,7 +3147,7 @@
             for (int i = 0; i < 10; i++)
             {
                 // insert a string
-                ps.setBytes(1, val.getBytes());
+                ps.setBytes(1, val.getBytes("US-ASCII"));
                 ps.executeUpdate();
                 val = val.trim() + "x";
             }
@@ -3712,7 +3714,7 @@
 	    	}
             try
             {
-                blob.position("foo".getBytes(),2);
+                blob.position("foo".getBytes("US-ASCII"),2);
             }
             catch (SQLException e)
             {
@@ -3803,7 +3805,7 @@
 	    	}
             try
             {
-                blob.position("foo".getBytes(),2);
+                blob.position("foo".getBytes("US-ASCII"),2);
             }
             catch (SQLException e)
             {
@@ -3981,13 +3983,15 @@
         conn.setAutoCommit(false);
         PreparedStatement ps = conn.prepareStatement("insert into \"MAPS\" values(?,?,?,?,?,?)");
         for (int i = 0; i < 3; i++) {
-            FileReader fr = new FileReader(fileName[4]);
+            File file = new File(fileName[4]);
+            InputStream fileIS = new FileInputStream(file);
+            Reader fr = new InputStreamReader(fileIS, "US-ASCII");
             ps.setInt(1, i);
             ps.setString(2, "x" + i);
             ps.setString(3, "abc");
             ps.setString(4, "abc");
             ps.setString(5, "abc");
-            ps.setCharacterStream(6, new java.io.BufferedReader(fr),300000);
+            ps.setCharacterStream(6, fr, 300000);
             ps.executeUpdate();
             fr.close();
         }
@@ -4092,8 +4096,10 @@
 			System.out.println("testing Blob.getBytes() with pos " + pos + " > " + blobLength);
         try
         {
+            // generate a new string out of the blob for comparison, 
+            // ensure it's using fixed format.
             System.out.println(iteration + "(" + testNum + ") " +
-                new String(blob.getBytes(pos,length)));
+                new String(blob.getBytes(pos,length), "US-ASCII"));
 
 			long l1 = blob.length();
 			if (l1 != blobLength) {
@@ -4168,11 +4174,11 @@
         int rowNum,
         String searchStr,
         long position,
-        Blob blob, int blobLength)
+        Blob blob, int blobLength) throws UnsupportedEncodingException
     {
         try
         {
-            long result = blob.position(searchStr.getBytes(),position);
+            long result = blob.position(searchStr.getBytes("US-ASCII"),position);
             if ((searchStr == "") && (result == 1))
                 return;
             if (result != -1)

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/resultset.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/resultset.java?rev=378337&r1=378336&r2=378337&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/resultset.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/resultset.java Thu Feb 16 10:50:58 2006
@@ -834,7 +834,8 @@
 				} catch(SQLException ex){
 					if (ex.getSQLState().equals("22005")) {
 						if (s.getBytes(i) != null)
-                row.append(new String(s.getBytes(i)));
+							row.append(s.getBytes(i).toString());
+                //row.append(new String(s.getBytes(i)));
 						else
                 row.append(s.getBytes(i));
 					} else throw ex;

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/coalesceTests.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/coalesceTests.java?rev=378337&r1=378336&r2=378337&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/coalesceTests.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/coalesceTests.java Thu Feb 16 10:50:58 2006
@@ -1142,18 +1142,18 @@
     } catch(Exception ex) {}
 			s.executeUpdate("create table tC (cbd1 char(254) for bit data, cbd2 char(40) for bit data, vcbd1 varchar(253) for bit data, vcbd2 varchar(2000) for bit data, lvcbd1 long varchar for bit data, lvcbd2 long varchar for bit data, blob1 BLOB(200), blob2 BLOB(33K))");
 			ps = conn.prepareStatement("insert into tC values (?,?,?,?,?,?,?,?)");
-			ps.setBytes(1, "cbd1 not null".getBytes());
-			ps.setBytes(2, "cbd2 not null".getBytes());
-			ps.setBytes(3, "vcbd1 not null".getBytes());
-			ps.setBytes(4, "vcbd2 not null".getBytes());
-			ps.setBytes(5, "lvcbd1 not null".getBytes());
-			ps.setBytes(6, "lvcbd2 not null".getBytes());
-			ps.setBytes(7, "blob1 not null".getBytes());
-			ps.setBytes(8, "blob2 not null".getBytes());
+			ps.setBytes(1, "cbd1 not null".getBytes("US-ASCII"));
+			ps.setBytes(2, "cbd2 not null".getBytes("US-ASCII"));
+			ps.setBytes(3, "vcbd1 not null".getBytes("US-ASCII"));
+			ps.setBytes(4, "vcbd2 not null".getBytes("US-ASCII"));
+			ps.setBytes(5, "lvcbd1 not null".getBytes("US-ASCII"));
+			ps.setBytes(6, "lvcbd2 not null".getBytes("US-ASCII"));
+			ps.setBytes(7, "blob1 not null".getBytes("US-ASCII"));
+			ps.setBytes(8, "blob2 not null".getBytes("US-ASCII"));
 			ps.executeUpdate();
-			ps.setBytes(1, "cbd1 not null but cbd2 is".getBytes());
+			ps.setBytes(1, "cbd1 not null but cbd2 is".getBytes("US-ASCII"));
 			ps.setBytes(2, null);
-			ps.setBytes(3, "vcbd1 not null but vcbd2 is".getBytes());
+			ps.setBytes(3, "vcbd1 not null but vcbd2 is".getBytes("US-ASCII"));
 			ps.setBytes(4, null);
 			ps.setBytes(5, null);
 			ps.setBytes(6, null);
@@ -1161,13 +1161,13 @@
 			ps.setBytes(8, null);
 			ps.executeUpdate();
 			ps.setBytes(1, null);
-			ps.setBytes(2, "cbd2 not null but cbd1 is".getBytes());
+			ps.setBytes(2, "cbd2 not null but cbd1 is".getBytes("US-ASCII"));
 			ps.setBytes(3, null);
-			ps.setBytes(4, "vcbd2 not null but vcbd1 is".getBytes());
-			ps.setBytes(5, "lvcbd1 not null again".getBytes());
-			ps.setBytes(6, "lvcbd2 not null again".getBytes());
-			ps.setBytes(7, "blob1 not null again".getBytes());
-			ps.setBytes(8, "blob2 not null again".getBytes());
+			ps.setBytes(4, "vcbd2 not null but vcbd1 is".getBytes("US-ASCII"));
+			ps.setBytes(5, "lvcbd1 not null again".getBytes("US-ASCII"));
+			ps.setBytes(6, "lvcbd2 not null again".getBytes("US-ASCII"));
+			ps.setBytes(7, "blob1 not null again".getBytes("US-ASCII"));
+			ps.setBytes(8, "blob2 not null again".getBytes("US-ASCII"));
 			ps.executeUpdate();
 			ps.setBytes(1, null);
 			ps.setBytes(2, null);
@@ -1403,7 +1403,7 @@
 	}
 
 	// lifted from the metadata test
-	public static void dumpRS(ResultSet s) throws SQLException
+	public static void dumpRS(ResultSet s) throws SQLException, UnsupportedEncodingException
 	{
 		if (s == null)
 		{
@@ -1463,8 +1463,8 @@
 				row.append(s.getString(i));
 				} catch(SQLException ex){
 					if (ex.getSQLState().equals("22005")) {
-						if (s.getBytes(i) != null)
-                row.append(new String(s.getBytes(i)));
+					    if (s.getBytes(i) != null)
+					        row.append(s.getBytes(i).toString());
 						else
                 row.append(s.getBytes(i));
 					} else throw ex;

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/streamingColumn.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/streamingColumn.java?rev=378337&r1=378336&r2=378337&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/streamingColumn.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/streamingColumn.java Thu Feb 16 10:50:58 2006
@@ -588,7 +588,7 @@
 			"this is a relatively long string, hopefully the row will be split or otherwise become long ???  I don't think it will become long but maybe if it rolls back it will become strange";
 		for (int i = 0; i < 100; i++)
 		{
-			ByteArrayInputStream string1 = new ByteArrayInputStream(longString.getBytes());
+			ByteArrayInputStream string1 = new ByteArrayInputStream(longString.getBytes("US-ASCII"));
 			ps.setAsciiStream(1, string1, longString.length());
 			ps.setInt(2, i);
 			ps.executeUpdate();
@@ -708,8 +708,9 @@
 				// get the second column as a string
 				String resultString = rs.getString(2);
 
-                // compare result with expected
-                String canon = new String(stream1_byte_array[a]);
+                // compare result with expected, using fixed length string from 
+				// the streamed byte array 
+                String canon = new String(stream1_byte_array[a], "US-ASCII");
 
                 if (canon.compareTo(resultString) != 0)
                 {
@@ -722,8 +723,9 @@
 				// get the second column as a string
 				resultString = rs.getString(3);
 
-                // compare result with expected
-                canon = new String(stream2_byte_array[a]);
+                // compare result with expected, using fixed length string from
+				// the second streamed byte array.
+                canon = new String(stream2_byte_array[a], "US-ASCII");
 
                 if (canon.compareTo(resultString) != 0)
                 {
@@ -1022,7 +1024,7 @@
 					dumpSQLExceptions(e);
 			}
 
-			Reader filer = new InputStreamReader(fileIn);
+			Reader filer = new InputStreamReader(fileIn,"US-ASCII");
 			try {
 				System.out.println("===> testing using setCharacterStream with -1 as length");
 				ps.setCharacterStream(2, filer, -1);
@@ -1784,7 +1786,7 @@
 	throws Exception{
 	 	File file = new File(fileName);
 	 	InputStream fileIn = new FileInputStream(file);
-	 	Reader filer = new InputStreamReader(fileIn);
+	 	Reader filer = new InputStreamReader(fileIn, "US-ASCII");
 	 	System.out.println("===> testing(using setCharacterStream) " + fileName + " length = " + file.length());
 	 	ps.setInt(1, intValue);
 	 	// insert a streaming column
@@ -1878,7 +1880,7 @@
 			"update foo set a = ?, b = ? where a = " + oldkey);
 
 		String updateString = pad("", newkey);
-		ByteArrayInputStream bais = new ByteArrayInputStream(updateString.getBytes());
+		ByteArrayInputStream bais = new ByteArrayInputStream(updateString.getBytes("US-ASCII"));
 		ps.setInt(1, newkey);
 		ps.setAsciiStream(2, bais, updateString.length());
 		int nRows = ps.executeUpdate();
@@ -1909,7 +1911,7 @@
 
 	public static int streamInLongCol(PreparedStatement ps, Object data) throws Exception {
 		String s = (String)data;
-		ByteArrayInputStream bais = new ByteArrayInputStream(s.getBytes());
+		ByteArrayInputStream bais = new ByteArrayInputStream(s.getBytes("US-ASCII"));
 		ps.setAsciiStream(1, bais, s.length());
 		int nRows = ps.executeUpdate();
 		bais.close();