db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r630161 [1/2] - in /db/derby/code/trunk/java: engine/org/apache/derby/impl/jdbc/ engine/org/apache/derby/impl/services/replication/ testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ testing/org/apache/derbyTesting/functionTests/t...
Date Fri, 22 Feb 2008 11:27:15 GMT
Author: kahatlen
Date: Fri Feb 22 03:27:13 2008
New Revision: 630161

URL: http://svn.apache.org/viewvc?rev=630161&view=rev
Log:
Fixing svn:eol-style on *.java files.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java   (props changed)
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/ReplicationLogger.java   (contents, props changed)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/LargeDataLocksTest.java   (contents, props changed)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/NullSQLTextTest.java   (contents, props changed)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/FullCollationTests.java   (contents, props changed)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/col_rec1.java   (contents, props changed)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/col_rec2.java   (contents, props changed)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/BigDecimalHandler.java   (contents, props changed)

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/ReplicationLogger.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/ReplicationLogger.java?rev=630161&r1=630160&r2=630161&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/ReplicationLogger.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/ReplicationLogger.java Fri Feb 22 03:27:13 2008
@@ -1,71 +1,71 @@
-/*
- 
-   Derby - Class
-   org.apache.derby.impl.services.replication.ReplicationLogger
- 
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to you under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
- 
-      http://www.apache.org/licenses/LICENSE-2.0
- 
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
- 
- */
-
-package org.apache.derby.impl.services.replication;
-
-import org.apache.derby.iapi.reference.MessageId;
-import org.apache.derby.iapi.services.context.ErrorStringBuilder;
-import org.apache.derby.iapi.services.monitor.Monitor;
-
-public class ReplicationLogger {
-
-    /** Whether or not to print log messages to derby.log. Defaults to
-     * true, but can be set to false with derby property
-     * "derby.replication.logerrormessages=true"
-     */
-    // TODO: make this configurable through the aforementioned
-    // property
-    private static final boolean LOG_REPLICATION_MESSAGES = true;
-
-
-    /**
-     * Print error message and the stack trace of the throwable to the
-     * log (usually derby.log) provided that LOG_REPLICATION_MESSAGES
-     * is true. If LOG_REPLICATION_MESSAGES is false, nothing is
-     * logged.
-     *
-     * @param msgId The error message id
-     * @param t Error trace starts from this error
-     * @param dbname The name of the replicated database
-     */
-    public static void logError(String msgId, Throwable t, String dbname) {
-
-        if (LOG_REPLICATION_MESSAGES) {
-
-            Monitor.logTextMessage(MessageId.REPLICATION_ERROR_BEGIN);
-
-            if (msgId != null) {
-                Monitor.logTextMessage(msgId, dbname);
-            }
-
-            if (t != null) {
-                ErrorStringBuilder esb =
-                    new ErrorStringBuilder(Monitor.getStream().getHeader());
-                esb.stackTrace(t);
-                Monitor.logMessage(esb.get().toString());
-                esb.reset();
-            }
-            Monitor.logTextMessage(MessageId.REPLICATION_ERROR_END);
-        }
-    }
-
-}
+/*
+ 
+   Derby - Class
+   org.apache.derby.impl.services.replication.ReplicationLogger
+ 
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to you under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+ 
+      http://www.apache.org/licenses/LICENSE-2.0
+ 
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+ 
+ */
+
+package org.apache.derby.impl.services.replication;
+
+import org.apache.derby.iapi.reference.MessageId;
+import org.apache.derby.iapi.services.context.ErrorStringBuilder;
+import org.apache.derby.iapi.services.monitor.Monitor;
+
+public class ReplicationLogger {
+
+    /** Whether or not to print log messages to derby.log. Defaults to
+     * true, but can be set to false with derby property
+     * "derby.replication.logerrormessages=true"
+     */
+    // TODO: make this configurable through the aforementioned
+    // property
+    private static final boolean LOG_REPLICATION_MESSAGES = true;
+
+
+    /**
+     * Print error message and the stack trace of the throwable to the
+     * log (usually derby.log) provided that LOG_REPLICATION_MESSAGES
+     * is true. If LOG_REPLICATION_MESSAGES is false, nothing is
+     * logged.
+     *
+     * @param msgId The error message id
+     * @param t Error trace starts from this error
+     * @param dbname The name of the replicated database
+     */
+    public static void logError(String msgId, Throwable t, String dbname) {
+
+        if (LOG_REPLICATION_MESSAGES) {
+
+            Monitor.logTextMessage(MessageId.REPLICATION_ERROR_BEGIN);
+
+            if (msgId != null) {
+                Monitor.logTextMessage(msgId, dbname);
+            }
+
+            if (t != null) {
+                ErrorStringBuilder esb =
+                    new ErrorStringBuilder(Monitor.getStream().getHeader());
+                esb.stackTrace(t);
+                Monitor.logMessage(esb.get().toString());
+                esb.reset();
+            }
+            Monitor.logTextMessage(MessageId.REPLICATION_ERROR_END);
+        }
+    }
+
+}

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/ReplicationLogger.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/LargeDataLocksTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/LargeDataLocksTest.java?rev=630161&r1=630160&r2=630161&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/LargeDataLocksTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/LargeDataLocksTest.java Fri Feb 22 03:27:13 2008
@@ -1,205 +1,205 @@
-/**
- *  Derby - Class org.apache.derbyTesting.functionTests.tests.jdbcapi.LargeDataLocksTest
- *  
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.derbyTesting.functionTests.tests.jdbcapi;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.apache.derbyTesting.junit.BaseJDBCTestCase;
-import org.apache.derbyTesting.junit.CleanDatabaseTestSetup;
-import org.apache.derbyTesting.junit.TestConfiguration;
-import org.apache.derbyTesting.junit.Utilities;
-
-public class LargeDataLocksTest extends BaseJDBCTestCase {
-
-    public LargeDataLocksTest(String name) {
-        super(name);
-    }
-
-    /**
-     * Test that ResultSet.getCharacterStream does not hold locks after the
-     * ResultSet is closed
-     * 
-     * @throws SQLException
-     * @throws IOException
-     */
-    public void testGetCharacterStream() throws SQLException, IOException {
-        // getCharacterStream() no locks expected after retrieval
-        int numChars = 0;
-        Statement stmt = createStatement();
-        String sql = "SELECT bc from t1";
-        // First with getCharacterStream
-        ResultSet rs = stmt.executeQuery(sql);
-        rs.next();
-        java.io.Reader characterStream = rs.getCharacterStream(1);
-        // Extract all the characters
-        int read = characterStream.read();
-        while (read != -1) {
-            read = characterStream.read();
-            numChars++;
-        }
-        assertEquals(38000, numChars);
-        rs.close();
-        assertEquals(0, countLocks());
-        commit();
-    }
-
-    /**
-     * Verify that getBytes does not hold locks after ResultSet is closed.
-     * 
-     * @throws SQLException
-     */
-    public void testGetBytes() throws SQLException {
-        // getBytes() no locks expected after retrieval
-        Statement stmt = createStatement();
-        String sql = "SELECT bincol from t1";
-        ResultSet rs = stmt.executeQuery(sql);
-        rs.next();
-        byte[] value = rs.getBytes(1);
-        assertEquals(38000, value.length);
-        rs.close();
-        assertEquals(0, countLocks());
-        commit();
-
-    }
-
-    /**
-     * Verify that getBinaryStream() does not hold locks after retrieval
-     * 
-     * @throws SQLException
-     * @throws IOException
-     */
-    public void testGetBinaryStream() throws SQLException, IOException {
-        int numBytes = 0;
-        getConnection().setAutoCommit(false);
-        Statement stmt = createStatement();
-        String sql = "SELECT bincol from t1";
-        ResultSet rs = stmt.executeQuery(sql);
-        rs.next();
-        InputStream stream = rs.getBinaryStream(1);
-        int read = stream.read();
-        while (read != -1) {
-            read = stream.read();
-            numBytes++;
-        }
-        assertEquals(38000, numBytes);
-        rs.close();
-        assertEquals(0, countLocks());
-        commit();
-    }
-
-    /**
-     * Test that ResultSet.getString() does not hold locks after the ResultSet
-     * is closed
-     * 
-     * @throws SQLException
-     * @throws IOException
-     */
-    public void testGetString() throws SQLException, IOException {
-        // getString() no locks expected after retrieval
-        Statement stmt = createStatement();
-        String sql = "SELECT bc from t1";
-        ResultSet rs = stmt.executeQuery(sql);
-        rs.next();
-        String value = rs.getString(1);
-        assertEquals(38000, value.length());
-        rs.close();
-        assertEquals(0, countLocks());
-        commit();
-    }
-
-    /**
-     * Create a new connection and count the number of locks held.
-     * 
-     * @return number of locks held
-     * 
-     * @throws SQLException
-     */
-    public int countLocks() throws SQLException {
-        Connection conn = openDefaultConnection();
-        String sql;
-        Statement stmt = conn.createStatement();
-
-        sql = "Select count(*) from new org.apache.derby.diag.LockTable() as LT";
-        ResultSet lockrs = stmt.executeQuery(sql);
-        lockrs.next();
-        int count = lockrs.getInt(1);
-        lockrs.close();
-        stmt.close();
-        conn.close();
-        return count;
-    }
-
-    public static Test baseSuite(String name) {
-
-        TestSuite suite = new TestSuite(name);
-        suite.addTestSuite(LargeDataLocksTest.class);
-
-        return new CleanDatabaseTestSetup(suite) {
-
-            /**
-             * Create and populate table
-             * 
-             * @see org.apache.derbyTesting.junit.CleanDatabaseTestSetup#decorateSQL(java.sql.Statement)
-             */
-            protected void decorateSQL(Statement s) throws SQLException {
-                Connection conn = getConnection();
-                conn.setAutoCommit(false);
-                PreparedStatement ps = null;
-                String sql;
-
-                sql = "CREATE TABLE t1 (bc CLOB(1M), bincol BLOB(1M), datalen int)";
-                s.executeUpdate(sql);
-
-                // Insert big and little values
-                sql = "INSERT into t1 values(?,?,?)";
-                ps = conn.prepareStatement(sql);
-
-                ps.setCharacterStream(1, new java.io.StringReader(Utilities
-                        .repeatChar("a", 38000)), 38000);
-                ps.setBytes(2, Utilities.repeatChar("a", 38000).getBytes());
-                ps.setInt(3, 38000);
-                ps.executeUpdate();
-                ps.close();
-                conn.commit();
-            }
-        };
-    }
-
-    public static Test suite() {
-        TestSuite suite = new TestSuite("LargeDataLocksTest");
-        suite.addTest(baseSuite("LargeDataLocksTest:embedded"));
-        // Disable for client until DERBY-2892 is fixed
-        //suite.addTest(TestConfiguration.clientServerDecorator(baseSuite("LargeDataLocksTest:client")));
-        return suite;
-
-    }
-
-}
+/**
+ *  Derby - Class org.apache.derbyTesting.functionTests.tests.jdbcapi.LargeDataLocksTest
+ *  
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.derbyTesting.functionTests.tests.jdbcapi;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.apache.derbyTesting.junit.BaseJDBCTestCase;
+import org.apache.derbyTesting.junit.CleanDatabaseTestSetup;
+import org.apache.derbyTesting.junit.TestConfiguration;
+import org.apache.derbyTesting.junit.Utilities;
+
+public class LargeDataLocksTest extends BaseJDBCTestCase {
+
+    public LargeDataLocksTest(String name) {
+        super(name);
+    }
+
+    /**
+     * Test that ResultSet.getCharacterStream does not hold locks after the
+     * ResultSet is closed
+     * 
+     * @throws SQLException
+     * @throws IOException
+     */
+    public void testGetCharacterStream() throws SQLException, IOException {
+        // getCharacterStream() no locks expected after retrieval
+        int numChars = 0;
+        Statement stmt = createStatement();
+        String sql = "SELECT bc from t1";
+        // First with getCharacterStream
+        ResultSet rs = stmt.executeQuery(sql);
+        rs.next();
+        java.io.Reader characterStream = rs.getCharacterStream(1);
+        // Extract all the characters
+        int read = characterStream.read();
+        while (read != -1) {
+            read = characterStream.read();
+            numChars++;
+        }
+        assertEquals(38000, numChars);
+        rs.close();
+        assertEquals(0, countLocks());
+        commit();
+    }
+
+    /**
+     * Verify that getBytes does not hold locks after ResultSet is closed.
+     * 
+     * @throws SQLException
+     */
+    public void testGetBytes() throws SQLException {
+        // getBytes() no locks expected after retrieval
+        Statement stmt = createStatement();
+        String sql = "SELECT bincol from t1";
+        ResultSet rs = stmt.executeQuery(sql);
+        rs.next();
+        byte[] value = rs.getBytes(1);
+        assertEquals(38000, value.length);
+        rs.close();
+        assertEquals(0, countLocks());
+        commit();
+
+    }
+
+    /**
+     * Verify that getBinaryStream() does not hold locks after retrieval
+     * 
+     * @throws SQLException
+     * @throws IOException
+     */
+    public void testGetBinaryStream() throws SQLException, IOException {
+        int numBytes = 0;
+        getConnection().setAutoCommit(false);
+        Statement stmt = createStatement();
+        String sql = "SELECT bincol from t1";
+        ResultSet rs = stmt.executeQuery(sql);
+        rs.next();
+        InputStream stream = rs.getBinaryStream(1);
+        int read = stream.read();
+        while (read != -1) {
+            read = stream.read();
+            numBytes++;
+        }
+        assertEquals(38000, numBytes);
+        rs.close();
+        assertEquals(0, countLocks());
+        commit();
+    }
+
+    /**
+     * Test that ResultSet.getString() does not hold locks after the ResultSet
+     * is closed
+     * 
+     * @throws SQLException
+     * @throws IOException
+     */
+    public void testGetString() throws SQLException, IOException {
+        // getString() no locks expected after retrieval
+        Statement stmt = createStatement();
+        String sql = "SELECT bc from t1";
+        ResultSet rs = stmt.executeQuery(sql);
+        rs.next();
+        String value = rs.getString(1);
+        assertEquals(38000, value.length());
+        rs.close();
+        assertEquals(0, countLocks());
+        commit();
+    }
+
+    /**
+     * Create a new connection and count the number of locks held.
+     * 
+     * @return number of locks held
+     * 
+     * @throws SQLException
+     */
+    public int countLocks() throws SQLException {
+        Connection conn = openDefaultConnection();
+        String sql;
+        Statement stmt = conn.createStatement();
+
+        sql = "Select count(*) from new org.apache.derby.diag.LockTable() as LT";
+        ResultSet lockrs = stmt.executeQuery(sql);
+        lockrs.next();
+        int count = lockrs.getInt(1);
+        lockrs.close();
+        stmt.close();
+        conn.close();
+        return count;
+    }
+
+    public static Test baseSuite(String name) {
+
+        TestSuite suite = new TestSuite(name);
+        suite.addTestSuite(LargeDataLocksTest.class);
+
+        return new CleanDatabaseTestSetup(suite) {
+
+            /**
+             * Create and populate table
+             * 
+             * @see org.apache.derbyTesting.junit.CleanDatabaseTestSetup#decorateSQL(java.sql.Statement)
+             */
+            protected void decorateSQL(Statement s) throws SQLException {
+                Connection conn = getConnection();
+                conn.setAutoCommit(false);
+                PreparedStatement ps = null;
+                String sql;
+
+                sql = "CREATE TABLE t1 (bc CLOB(1M), bincol BLOB(1M), datalen int)";
+                s.executeUpdate(sql);
+
+                // Insert big and little values
+                sql = "INSERT into t1 values(?,?,?)";
+                ps = conn.prepareStatement(sql);
+
+                ps.setCharacterStream(1, new java.io.StringReader(Utilities
+                        .repeatChar("a", 38000)), 38000);
+                ps.setBytes(2, Utilities.repeatChar("a", 38000).getBytes());
+                ps.setInt(3, 38000);
+                ps.executeUpdate();
+                ps.close();
+                conn.commit();
+            }
+        };
+    }
+
+    public static Test suite() {
+        TestSuite suite = new TestSuite("LargeDataLocksTest");
+        suite.addTest(baseSuite("LargeDataLocksTest:embedded"));
+        // Disable for client until DERBY-2892 is fixed
+        //suite.addTest(TestConfiguration.clientServerDecorator(baseSuite("LargeDataLocksTest:client")));
+        return suite;
+
+    }
+
+}

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/LargeDataLocksTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/NullSQLTextTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/NullSQLTextTest.java?rev=630161&r1=630160&r2=630161&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/NullSQLTextTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/NullSQLTextTest.java Fri Feb 22 03:27:13 2008
@@ -1,322 +1,322 @@
-/*
- 
-Derby - Class org.apache.derbyTesting.functionTests.tests.jdbcapi.NullSQLTextTest
- 
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
- 
-   http://www.apache.org/licenses/LICENSE-2.0
- 
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
- 
- */
-
-package org.apache.derbyTesting.functionTests.tests.jdbcapi;
-
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.ResultSetMetaData;
-import java.sql.Statement;
-import java.sql.SQLException;
-
-import org.apache.derbyTesting.junit.BaseJDBCTestCase;
-import org.apache.derbyTesting.junit.CleanDatabaseTestSetup;
-import org.apache.derbyTesting.junit.JDBC;
-import org.apache.derbyTesting.junit.TestConfiguration;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-/**
- * This test converts the old jdbcapi/nullSQLText.java
- * test to JUnit.
- */
-
-public class NullSQLTextTest extends BaseJDBCTestCase {
-    
-    /**
-     * Create a test with the given name.
-     *
-     * @param name name of the test.
-     */
-    
-    public NullSQLTextTest(String name) {
-        super(name);
-    }
-    
-    /**
-     * Create suite containing client and embedded tests and to run
-     * all tests in this class
-     */
-    public static Test suite() {
-        TestSuite suite = new TestSuite("NullSQLTextTest");
-        
-        suite.addTest(baseSuite("NullSQLTextTest:embedded"));
-        
-        suite.addTest(
-                TestConfiguration.clientServerDecorator(
-                baseSuite("NullSQLTextTest:client")));
-        
-        return suite;
-    }
-    
-    private static Test baseSuite(String name) {
-        TestSuite suite = new TestSuite(name);
-        
-        suite.addTestSuite(NullSQLTextTest.class);
-        
-        return new CleanDatabaseTestSetup(suite) {
-            /**
-             * Creates the tables and the stored procedures used in the test
-             * cases.
-             *
-             * @exception SQLException if a database error occurs
-             */
-            protected void decorateSQL(Statement stmt) throws SQLException {
-                
-                Connection conn = getConnection();
-                
-                /**
-                 * Creates the table used in the test cases.
-                 *
-                 */
-                stmt.execute("create table t1 (i int)");
-                stmt.execute("insert into t1 values 1, 2, 3, 4, 5, 6, 7");
-                stmt.execute("create procedure za() language java external name " +
-                             "'org.apache.derbyTesting.functionTests.tests.jdbcapi.NullSQLTextTest.zeroArg'" +
-                             " parameter style java");
-            }
-        };
-    }
-    
-    /**
-     * Testing null string in prepared statement.
-     *
-     * @exception SQLException if database access errors or other errors occur
-     */
-    public void testNullStringPreparedStatement() throws SQLException {
-        String nullString = null;
-        try {
-            // test null String in prepared statement
-            PreparedStatement ps = prepareStatement(nullString);
-            fail("preparedStatement(nullString) should have failed.");
-        } catch (SQLException e) {
-            assertSQLState("XJ067", e);
-        }
-    }
-    /**
-     * Testing null string in execute statement.
-     *
-     * @exception SQLException if database access errors or other errors occur
-     */
-    public void testNullStringExecuteStatement() throws SQLException {
-        String nullString = null;
-        try {
-            // test null String in execute statement
-            Statement stmt = createStatement();
-            stmt.execute(nullString);
-            fail("execute(nullString) should have failed.");
-        } catch (SQLException e) {
-            assertSQLState("XJ067", e);
-        }
-    }
-    /**
-     * Testing null string in executeQuery statement.
-     *
-     * @exception SQLException if database access errors or other errors occur
-     */
-    public void testNullStringExecuteQueryStatement() throws SQLException {
-        String nullString = null;
-        try {
-            // test null String in execute query statement
-            Statement stmt = createStatement();
-            stmt.executeQuery(nullString);
-            fail("executeQuery(nullString) should have failed.");
-        } catch (SQLException e) {
-            assertSQLState("XJ067", e);
-        }
-    }
-    /**
-     * Testing null string in executeUpdate statement.
-     *
-     * @exception SQLException if database access errors or other errors occur
-     */
-    public void testNullStringExecuteUpdateStatement() throws SQLException {
-        String nullString = null;
-        try {
-            // test null String in execute update statement
-            Statement stmt = createStatement();
-            stmt.executeUpdate(nullString);
-            fail("executeUpdate(nullString) should have failed.");
-        } catch (SQLException e) {
-            assertSQLState("XJ067", e);
-        }
-    }
-    /**
-     * Testing embedded comments in execute statement.
-     *
-     * @exception SQLException if database access errors or other errors occur
-     */
-    public void testDerby522() throws SQLException {
-        Statement stmt = createStatement();
-        
-        // These we expect to fail with syntax errors, as in embedded mode.
-        testCommentStmt(stmt, " --", true);
-        testCommentStmt(stmt, " -- ", true);
-        testCommentStmt(stmt, " -- This is a comment \n --", true);
-        testCommentStmt(stmt,
-                " -- This is a comment\n --And another\n -- Andonemore", true);
-        
-        /*
-        /* These we expect to return valid results for embedded and
-        /* Derby Client (as of DERBY-522 fix)
-         */
-        testCommentStmt(stmt, " --\nvalues 2, 4, 8", false);
-        ResultSet rs = stmt.getResultSet();
-        String[][] expectedRows = new String[][] { { "2" }, 
-                                                   { "4" }, 
-                                                   { "8" } };
-        JDBC.assertFullResultSet(rs, expectedRows);
-        
-        testCommentStmt(
-                stmt,
-                " -- This is \n -- \n --3 comments\nvalues 8", 
-  		false);
-                
-        rs = stmt.getResultSet();
-        expectedRows = new String[][] { { "8" } };
-        JDBC.assertFullResultSet(rs, expectedRows);
-        
-        testCommentStmt(stmt,
-                " -- This is a comment\n --And another\n -- Andonemore\nvalues (2,3)",
-                false);
-        rs = stmt.getResultSet();
-        ResultSetMetaData rsmd = rs.getMetaData();
-        expectedRows = new String[][] { { "2", "3" } };
-        JDBC.assertFullResultSet(rs, expectedRows);
-                
-        testCommentStmt(stmt,
-                " -- This is a comment\n select i from t1",
-                false);
-        rs = stmt.getResultSet();
-        expectedRows = new String[][] { { "1" }, 
-                                        { "2" }, 
-                                        { "3" }, 
-                                        { "4" }, 
-                                        { "5" }, 
-                                        { "6" }, 
-                                        { "7" } };
-        JDBC.assertFullResultSet(rs, expectedRows);
-        
-        testCommentStmt(stmt,
-                " --singleword\n insert into t1 values (8)",
-                false);
-        rs = stmt.getResultSet();
-        assertNull("Unexpected Not Null ResultSet", rs);
-        
-        testCommentStmt(stmt,
-                " --singleword\ncall za()",
-                false);
-        assertNull("Unexpected Not Null ResultSet", rs);
-        
-        testCommentStmt(stmt,
-                " -- leading comment\n(\nvalues 4, 8)",
-                false);
-        rs = stmt.getResultSet();
-        expectedRows = new String[][] { { "4" }, 
-        { "8" }  };
-        JDBC.assertFullResultSet(rs, expectedRows);
-        
-        testCommentStmt(stmt,
-                " -- leading comment\n\n(\n\n\rvalues 4, 8)",
-                false);
-        rs = stmt.getResultSet();
-        expectedRows = new String[][] { { "4" }, 
-                                        { "8" }  };
-        JDBC.assertFullResultSet(rs, expectedRows);
-        
-        /*
-        /* While we're at it, test comments in the middle and end of the
-        /* statement.  Prior to the patch for DERBY-522, statements
-        /* ending with a comment threw syntax errors; that problem
-        /* was fixed with DERBY-522, as well, so all of these should now
-        /* succeed in all modes (embedded and Derby Client).
-         */
-        testCommentStmt(stmt, "select i from t1 -- This is a comment", false);
-        rs = stmt.getResultSet();
-        expectedRows = new String[][] { { "1" }, 
-                                        { "2" }, 
-                                        { "3" }, 
-                                        { "4" }, 
-                                        { "5" }, 
-                                        { "6" }, 
-                                        { "7" }, 
-                                        { "8" } };
-        JDBC.assertFullResultSet(rs, expectedRows);
-        
-        testCommentStmt(stmt, "select i from t1\n -- This is a comment", false);
-        rs = stmt.getResultSet();
-        expectedRows = new String[][] { { "1" }, 
-                                        { "2" }, 
-                                        { "3" }, 
-                                        { "4" }, 
-                                        { "5" }, 
-                                        { "6" }, 
-                                        { "7" }, 
-                                        { "8" } };
-        JDBC.assertFullResultSet(rs, expectedRows);
-      
-        testCommentStmt(stmt, "values 8, 4, 2\n --", false);
-        rs = stmt.getResultSet();
-        expectedRows = new String[][] { { "8" }, 
-                                        { "4" }, 
-                                        { "2" } };
-        JDBC.assertFullResultSet(rs, expectedRows);
-    
-        testCommentStmt(stmt, "values 8, 4,\n -- middle comment\n2\n -- end", false);
-        rs = stmt.getResultSet();
-        expectedRows = new String[][] { { "8" }, 
-                                        { "4" }, 
-                                        { "2" } };
-        JDBC.assertFullResultSet(rs, expectedRows);
-       
-        testCommentStmt(stmt, "values 8, 4,\n -- middle comment\n2\n -- end\n", false);
-        rs = stmt.getResultSet();
-        expectedRows = new String[][] { { "8" }, 
-                                        { "4" }, 
-                                        { "2" } };
-        JDBC.assertFullResultSet(rs, expectedRows);
-    }
-    /**
-     * Helper method for testDerby522().
-     * executes strings containing embedded comments.
-     *
-     * @param sql sql statement
-     * @exception SQLException if database access errors or other errors occur
-     */
-    private static void testCommentStmt(Statement st, String sql,
-            boolean expectFailure) throws SQLException {
-        try {
-            st.execute(sql);
-	    if (expectFailure)
-		fail("Unexpected Failure -- execute() should have failed.");	
-        } catch (SQLException se) {
-                assertSQLState("42X01", se);
-        }
-    }
-    /**
-     * Java method for procedure za()
-     *
-     */
-    public static void zeroArg () {
-    }
-}
+/*
+ 
+Derby - Class org.apache.derbyTesting.functionTests.tests.jdbcapi.NullSQLTextTest
+ 
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+ 
+   http://www.apache.org/licenses/LICENSE-2.0
+ 
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+ 
+ */
+
+package org.apache.derbyTesting.functionTests.tests.jdbcapi;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.Statement;
+import java.sql.SQLException;
+
+import org.apache.derbyTesting.junit.BaseJDBCTestCase;
+import org.apache.derbyTesting.junit.CleanDatabaseTestSetup;
+import org.apache.derbyTesting.junit.JDBC;
+import org.apache.derbyTesting.junit.TestConfiguration;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * This test converts the old jdbcapi/nullSQLText.java
+ * test to JUnit.
+ */
+
+public class NullSQLTextTest extends BaseJDBCTestCase {
+    
+    /**
+     * Create a test with the given name.
+     *
+     * @param name name of the test.
+     */
+    
+    public NullSQLTextTest(String name) {
+        super(name);
+    }
+    
+    /**
+     * Create suite containing client and embedded tests and to run
+     * all tests in this class
+     */
+    public static Test suite() {
+        TestSuite suite = new TestSuite("NullSQLTextTest");
+        
+        suite.addTest(baseSuite("NullSQLTextTest:embedded"));
+        
+        suite.addTest(
+                TestConfiguration.clientServerDecorator(
+                baseSuite("NullSQLTextTest:client")));
+        
+        return suite;
+    }
+    
+    private static Test baseSuite(String name) {
+        TestSuite suite = new TestSuite(name);
+        
+        suite.addTestSuite(NullSQLTextTest.class);
+        
+        return new CleanDatabaseTestSetup(suite) {
+            /**
+             * Creates the tables and the stored procedures used in the test
+             * cases.
+             *
+             * @exception SQLException if a database error occurs
+             */
+            protected void decorateSQL(Statement stmt) throws SQLException {
+                
+                Connection conn = getConnection();
+                
+                /**
+                 * Creates the table used in the test cases.
+                 *
+                 */
+                stmt.execute("create table t1 (i int)");
+                stmt.execute("insert into t1 values 1, 2, 3, 4, 5, 6, 7");
+                stmt.execute("create procedure za() language java external name " +
+                             "'org.apache.derbyTesting.functionTests.tests.jdbcapi.NullSQLTextTest.zeroArg'" +
+                             " parameter style java");
+            }
+        };
+    }
+    
+    /**
+     * Testing null string in prepared statement.
+     *
+     * @exception SQLException if database access errors or other errors occur
+     */
+    public void testNullStringPreparedStatement() throws SQLException {
+        String nullString = null;
+        try {
+            // test null String in prepared statement
+            PreparedStatement ps = prepareStatement(nullString);
+            fail("preparedStatement(nullString) should have failed.");
+        } catch (SQLException e) {
+            assertSQLState("XJ067", e);
+        }
+    }
+    /**
+     * Testing null string in execute statement.
+     *
+     * @exception SQLException if database access errors or other errors occur
+     */
+    public void testNullStringExecuteStatement() throws SQLException {
+        String nullString = null;
+        try {
+            // test null String in execute statement
+            Statement stmt = createStatement();
+            stmt.execute(nullString);
+            fail("execute(nullString) should have failed.");
+        } catch (SQLException e) {
+            assertSQLState("XJ067", e);
+        }
+    }
+    /**
+     * Testing null string in executeQuery statement.
+     *
+     * @exception SQLException if database access errors or other errors occur
+     */
+    public void testNullStringExecuteQueryStatement() throws SQLException {
+        String nullString = null;
+        try {
+            // test null String in execute query statement
+            Statement stmt = createStatement();
+            stmt.executeQuery(nullString);
+            fail("executeQuery(nullString) should have failed.");
+        } catch (SQLException e) {
+            assertSQLState("XJ067", e);
+        }
+    }
+    /**
+     * Testing null string in executeUpdate statement.
+     *
+     * @exception SQLException if database access errors or other errors occur
+     */
+    public void testNullStringExecuteUpdateStatement() throws SQLException {
+        String nullString = null;
+        try {
+            // test null String in execute update statement
+            Statement stmt = createStatement();
+            stmt.executeUpdate(nullString);
+            fail("executeUpdate(nullString) should have failed.");
+        } catch (SQLException e) {
+            assertSQLState("XJ067", e);
+        }
+    }
+    /**
+     * Testing embedded comments in execute statement.
+     *
+     * @exception SQLException if database access errors or other errors occur
+     */
+    public void testDerby522() throws SQLException {
+        Statement stmt = createStatement();
+        
+        // These we expect to fail with syntax errors, as in embedded mode.
+        testCommentStmt(stmt, " --", true);
+        testCommentStmt(stmt, " -- ", true);
+        testCommentStmt(stmt, " -- This is a comment \n --", true);
+        testCommentStmt(stmt,
+                " -- This is a comment\n --And another\n -- Andonemore", true);
+        
+        /*
+        /* These we expect to return valid results for embedded and
+        /* Derby Client (as of DERBY-522 fix)
+         */
+        testCommentStmt(stmt, " --\nvalues 2, 4, 8", false);
+        ResultSet rs = stmt.getResultSet();
+        String[][] expectedRows = new String[][] { { "2" }, 
+                                                   { "4" }, 
+                                                   { "8" } };
+        JDBC.assertFullResultSet(rs, expectedRows);
+        
+        testCommentStmt(
+                stmt,
+                " -- This is \n -- \n --3 comments\nvalues 8", 
+  		false);
+                
+        rs = stmt.getResultSet();
+        expectedRows = new String[][] { { "8" } };
+        JDBC.assertFullResultSet(rs, expectedRows);
+        
+        testCommentStmt(stmt,
+                " -- This is a comment\n --And another\n -- Andonemore\nvalues (2,3)",
+                false);
+        rs = stmt.getResultSet();
+        ResultSetMetaData rsmd = rs.getMetaData();
+        expectedRows = new String[][] { { "2", "3" } };
+        JDBC.assertFullResultSet(rs, expectedRows);
+                
+        testCommentStmt(stmt,
+                " -- This is a comment\n select i from t1",
+                false);
+        rs = stmt.getResultSet();
+        expectedRows = new String[][] { { "1" }, 
+                                        { "2" }, 
+                                        { "3" }, 
+                                        { "4" }, 
+                                        { "5" }, 
+                                        { "6" }, 
+                                        { "7" } };
+        JDBC.assertFullResultSet(rs, expectedRows);
+        
+        testCommentStmt(stmt,
+                " --singleword\n insert into t1 values (8)",
+                false);
+        rs = stmt.getResultSet();
+        assertNull("Unexpected Not Null ResultSet", rs);
+        
+        testCommentStmt(stmt,
+                " --singleword\ncall za()",
+                false);
+        assertNull("Unexpected Not Null ResultSet", rs);
+        
+        testCommentStmt(stmt,
+                " -- leading comment\n(\nvalues 4, 8)",
+                false);
+        rs = stmt.getResultSet();
+        expectedRows = new String[][] { { "4" }, 
+        { "8" }  };
+        JDBC.assertFullResultSet(rs, expectedRows);
+        
+        testCommentStmt(stmt,
+                " -- leading comment\n\n(\n\n\rvalues 4, 8)",
+                false);
+        rs = stmt.getResultSet();
+        expectedRows = new String[][] { { "4" }, 
+                                        { "8" }  };
+        JDBC.assertFullResultSet(rs, expectedRows);
+        
+        /*
+        /* While we're at it, test comments in the middle and end of the
+        /* statement.  Prior to the patch for DERBY-522, statements
+        /* ending with a comment threw syntax errors; that problem
+        /* was fixed with DERBY-522, as well, so all of these should now
+        /* succeed in all modes (embedded and Derby Client).
+         */
+        testCommentStmt(stmt, "select i from t1 -- This is a comment", false);
+        rs = stmt.getResultSet();
+        expectedRows = new String[][] { { "1" }, 
+                                        { "2" }, 
+                                        { "3" }, 
+                                        { "4" }, 
+                                        { "5" }, 
+                                        { "6" }, 
+                                        { "7" }, 
+                                        { "8" } };
+        JDBC.assertFullResultSet(rs, expectedRows);
+        
+        testCommentStmt(stmt, "select i from t1\n -- This is a comment", false);
+        rs = stmt.getResultSet();
+        expectedRows = new String[][] { { "1" }, 
+                                        { "2" }, 
+                                        { "3" }, 
+                                        { "4" }, 
+                                        { "5" }, 
+                                        { "6" }, 
+                                        { "7" }, 
+                                        { "8" } };
+        JDBC.assertFullResultSet(rs, expectedRows);
+      
+        testCommentStmt(stmt, "values 8, 4, 2\n --", false);
+        rs = stmt.getResultSet();
+        expectedRows = new String[][] { { "8" }, 
+                                        { "4" }, 
+                                        { "2" } };
+        JDBC.assertFullResultSet(rs, expectedRows);
+    
+        testCommentStmt(stmt, "values 8, 4,\n -- middle comment\n2\n -- end", false);
+        rs = stmt.getResultSet();
+        expectedRows = new String[][] { { "8" }, 
+                                        { "4" }, 
+                                        { "2" } };
+        JDBC.assertFullResultSet(rs, expectedRows);
+       
+        testCommentStmt(stmt, "values 8, 4,\n -- middle comment\n2\n -- end\n", false);
+        rs = stmt.getResultSet();
+        expectedRows = new String[][] { { "8" }, 
+                                        { "4" }, 
+                                        { "2" } };
+        JDBC.assertFullResultSet(rs, expectedRows);
+    }
+    /**
+     * Helper method for testDerby522().
+     * executes strings containing embedded comments.
+     *
+     * @param sql sql statement
+     * @exception SQLException if database access errors or other errors occur
+     */
+    private static void testCommentStmt(Statement st, String sql,
+            boolean expectFailure) throws SQLException {
+        try {
+            st.execute(sql);
+	    if (expectFailure)
+		fail("Unexpected Failure -- execute() should have failed.");	
+        } catch (SQLException se) {
+                assertSQLState("42X01", se);
+        }
+    }
+    /**
+     * Java method for procedure za()
+     *
+     */
+    public static void zeroArg () {
+    }
+}

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/NullSQLTextTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/FullCollationTests.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/FullCollationTests.java?rev=630161&r1=630160&r2=630161&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/FullCollationTests.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/FullCollationTests.java Fri Feb 22 03:27:13 2008
@@ -1,53 +1,53 @@
-/**
- *  Derby - Class org.apache.derbyTesting.functionTests.tests.lang.CollationTest
- *  
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.derbyTesting.functionTests.tests.lang;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.apache.derbyTesting.junit.Decorator;
-
-
-public class FullCollationTests extends CollationTest {
-    
-    public FullCollationTests(String name) {
-        super(name);
-       
-    }
-
-    
-    /**
-     * Return a suite that uses a single use database with
-     * a primary fixture from this test plus all tests
-     */
-    public static Test suite() 
-    {
-        TestSuite suite = new TestSuite("FullCollationTests:territory=" +"no_NO");
-        suite.addTest(new CollationTest("testNorwayCollation"));
-        suite.addTest(org.apache.derbyTesting.functionTests.tests.lang._Suite.suite());
-        suite.addTest(org.apache.derbyTesting.functionTests.tests.jdbcapi._Suite.suite());
-        suite.addTest(org.apache.derbyTesting.functionTests.tests.store._Suite.suite());
-        
-        return Decorator.territoryCollatedDatabase(suite, "no_NO");
-    }
-
-}
+/**
+ *  Derby - Class org.apache.derbyTesting.functionTests.tests.lang.CollationTest
+ *  
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.derbyTesting.functionTests.tests.lang;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.apache.derbyTesting.junit.Decorator;
+
+
+public class FullCollationTests extends CollationTest {
+    
+    public FullCollationTests(String name) {
+        super(name);
+       
+    }
+
+    
+    /**
+     * Return a suite that uses a single use database with
+     * a primary fixture from this test plus all tests
+     */
+    public static Test suite() 
+    {
+        TestSuite suite = new TestSuite("FullCollationTests:territory=" +"no_NO");
+        suite.addTest(new CollationTest("testNorwayCollation"));
+        suite.addTest(org.apache.derbyTesting.functionTests.tests.lang._Suite.suite());
+        suite.addTest(org.apache.derbyTesting.functionTests.tests.jdbcapi._Suite.suite());
+        suite.addTest(org.apache.derbyTesting.functionTests.tests.store._Suite.suite());
+        
+        return Decorator.territoryCollatedDatabase(suite, "no_NO");
+    }
+
+}

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/FullCollationTests.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/col_rec1.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/col_rec1.java?rev=630161&r1=630160&r2=630161&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/col_rec1.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/col_rec1.java Fri Feb 22 03:27:13 2008
@@ -1,115 +1,115 @@
-/*
-
-   Derby - Class org.apache.derbyTesting.functionTests.tests.store.col_rec1
-
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
- */
-
-package org.apache.derbyTesting.functionTests.tests.store;
-
-import org.apache.derby.iapi.services.sanity.SanityManager;
-
-import java.sql.CallableStatement;
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-
-import org.apache.derby.tools.ij;
-
-/**
- * The purpose of this test and col_rec2 test is to create a territory based 
- * database and create some objects with collation sensitive character types. 
- * Then, make the database crash so that during the recovery, store engine has 
- * to do collation related operations. Those collation related operations are 
- * going to require that we use correct Collator object. DERBY-3302 
- * demonstrated a npe during this operation because Derby was relying on
- * database context to get the correct Collator object. But database context
- * is not available at this point in the recovery. With the fix for DERBY-3302, 
- * the Collator object will now be obtained from collation sensitive datatypes 
- * itself rather than looking at database context which is not available at 
- * this point in recovery. 
- * 
- * This particular class will do the steps of create a territory based database
- * and create some objects with collation sensitive character types. Then, make 
- * the database crash. col_rec2.java will do the part of rebooting the crashed
- * db which will require store to go through recovery.
- */
-
-public class col_rec1 extends BaseTest
-{
-
-    public col_rec1()
-    {
-    }
-
-    /**
-     * setup for restart recovery test which will require the use of correct
-     * Collator object during recovery of territory based database that will 
-     * be created and crashed in this test and later will be recovered in
-     * col_rec2.
-     **/
-    private void test1(
-    Connection  conn,
-    String      test_name,
-    String      table_name)
-        throws SQLException
-    {
-        beginTest(conn, test_name);
-        Statement s = conn.createStatement();
-        s.execute(
-                "create table t(x varchar(100) primary key)");
-        conn.commit();
-        conn.setAutoCommit(false);
-        s.execute("insert into t values 'xxxx'");
-		Connection connSecond = DriverManager.getConnection
-		("jdbc:derby:collationDB");
-        connSecond.setAutoCommit(false);
-        Statement sSecond = connSecond.createStatement();
-        sSecond.execute("insert into t values 'abab'");
-        endTest(conn, test_name);
-    }
-
-    public void testList(Connection conn)
-        throws SQLException
-    {
-        test1(conn, "test1", "T");
-    }
-
-    public static void main(String[] argv) 
-        throws Throwable
-    {
-    	col_rec1 test = new col_rec1();
-
-   		ij.getPropertyArg(argv); 
-        Connection conn = ij.startJBMS();
-        conn.setAutoCommit(false);
-
-        try
-        {
-            test.testList(conn);
-        }
-        catch (SQLException sqle)
-        {
-			org.apache.derby.tools.JDBCDisplayUtil.ShowSQLException(
-                System.out, sqle);
-			sqle.printStackTrace(System.out);
-		}
-    }
-}
+/*
+
+   Derby - Class org.apache.derbyTesting.functionTests.tests.store.col_rec1
+
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+ */
+
+package org.apache.derbyTesting.functionTests.tests.store;
+
+import org.apache.derby.iapi.services.sanity.SanityManager;
+
+import java.sql.CallableStatement;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+
+import org.apache.derby.tools.ij;
+
+/**
+ * The purpose of this test and col_rec2 test is to create a territory based 
+ * database and create some objects with collation sensitive character types. 
+ * Then, make the database crash so that during the recovery, store engine has 
+ * to do collation related operations. Those collation related operations are 
+ * going to require that we use correct Collator object. DERBY-3302 
+ * demonstrated a npe during this operation because Derby was relying on
+ * database context to get the correct Collator object. But database context
+ * is not available at this point in the recovery. With the fix for DERBY-3302, 
+ * the Collator object will now be obtained from collation sensitive datatypes 
+ * itself rather than looking at database context which is not available at 
+ * this point in recovery. 
+ * 
+ * This particular class will do the steps of create a territory based database
+ * and create some objects with collation sensitive character types. Then, make 
+ * the database crash. col_rec2.java will do the part of rebooting the crashed
+ * db which will require store to go through recovery.
+ */
+
+public class col_rec1 extends BaseTest
+{
+
+    public col_rec1()
+    {
+    }
+
+    /**
+     * setup for restart recovery test which will require the use of correct
+     * Collator object during recovery of territory based database that will 
+     * be created and crashed in this test and later will be recovered in
+     * col_rec2.
+     **/
+    private void test1(
+    Connection  conn,
+    String      test_name,
+    String      table_name)
+        throws SQLException
+    {
+        beginTest(conn, test_name);
+        Statement s = conn.createStatement();
+        s.execute(
+                "create table t(x varchar(100) primary key)");
+        conn.commit();
+        conn.setAutoCommit(false);
+        s.execute("insert into t values 'xxxx'");
+		Connection connSecond = DriverManager.getConnection
+		("jdbc:derby:collationDB");
+        connSecond.setAutoCommit(false);
+        Statement sSecond = connSecond.createStatement();
+        sSecond.execute("insert into t values 'abab'");
+        endTest(conn, test_name);
+    }
+
+    public void testList(Connection conn)
+        throws SQLException
+    {
+        test1(conn, "test1", "T");
+    }
+
+    public static void main(String[] argv) 
+        throws Throwable
+    {
+    	col_rec1 test = new col_rec1();
+
+   		ij.getPropertyArg(argv); 
+        Connection conn = ij.startJBMS();
+        conn.setAutoCommit(false);
+
+        try
+        {
+            test.testList(conn);
+        }
+        catch (SQLException sqle)
+        {
+			org.apache.derby.tools.JDBCDisplayUtil.ShowSQLException(
+                System.out, sqle);
+			sqle.printStackTrace(System.out);
+		}
+    }
+}

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/col_rec1.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/col_rec2.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/col_rec2.java?rev=630161&r1=630160&r2=630161&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/col_rec2.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/col_rec2.java Fri Feb 22 03:27:13 2008
@@ -1,119 +1,119 @@
-/*
-
-  Derby - Class org.apache.derbyTesting.functionTests.tests.store.col_rec2
-
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
- */
-
-package org.apache.derbyTesting.functionTests.tests.store;
-
-import org.apache.derby.iapi.services.sanity.SanityManager;
-
-import java.sql.CallableStatement;
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-
-import org.apache.derby.tools.ij;
-
-/**
- * The purpose of this test and col_rec1 test is to create a territory based 
- * database and create some objects with collation sensitive character types. 
- * Then, make the database crash so that during the recovery, store engine has 
- * to do collation related operations. Those collation related operations are 
- * going to require that we use correct Collator object. DERBY-3302 
- * demonstrated a npe during this operation because Derby was relying on
- * database context to get the correct Collator object. But database context
- * is not available at this point in the recovery. With the fix for DERBY-3302, 
- * the Collator object will now be obtained from collation sensitive datatypes 
- * itself rather than looking at database context which is not available at 
- * this point in recovery. 
- * 
- * col_rec1 class will do the steps of create a territory based database
- * and create some objects with collation sensitive character types. Then, make 
- * the database crash. This test will do the part of rebooting the crashed
- * db which will require store to go through recovery.
- */
-
-public class col_rec2 extends BaseTest
-{
-
-    public col_rec2()
-    {
-    }
-
-    /**
-     * setup for restart recovery test which will require the use of correct
-     * Collator object during recovery of territory based database that was 
-     * created and crashed in this col_rec1
-     **/
-    private void test1(
-    Connection  conn,
-    String      test_name,
-    String      table_name)
-        throws SQLException
-    {
-        beginTest(conn, test_name);
-        Statement s = conn.createStatement();
-        ResultSet rs = s.executeQuery("VALUES SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY" + 
-                    "('derby.database.collation')");
-        rs.next();
-        String collation = rs.getString(1);
-        if (!collation.equals("TERRITORY_BASED"))
-            logError("Collation should have been territory based but it is "
-            		+ collation);
-
-        rs = s.executeQuery("select count(*) from t");
-        rs.next();
-        int numberOfRows = rs.getInt(1);
-        if (numberOfRows > 1)
-        	 logError("Expected 1 row in T but found " + numberOfRows +
-        			 " rows");
-        rs.close();
-        s.close();
-        endTest(conn, test_name);
-    }
-
-    public void testList(Connection conn)
-        throws SQLException
-    {
-        test1(conn, "test1", "T");
-    }
-
-    public static void main(String[] argv) 
-        throws Throwable
-    {
-    	col_rec2 test = new col_rec2();
-
-   		ij.getPropertyArg(argv); 
-        Connection conn = ij.startJBMS();
-        conn.setAutoCommit(false);
-
-        try
-        {
-            test.testList(conn);
-        }
-        catch (SQLException sqle)
-        {
-			org.apache.derby.tools.JDBCDisplayUtil.ShowSQLException(
-                System.out, sqle);
-			sqle.printStackTrace(System.out);
-		}
-    }
-}
+/*
+
+  Derby - Class org.apache.derbyTesting.functionTests.tests.store.col_rec2
+
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+ */
+
+package org.apache.derbyTesting.functionTests.tests.store;
+
+import org.apache.derby.iapi.services.sanity.SanityManager;
+
+import java.sql.CallableStatement;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+
+import org.apache.derby.tools.ij;
+
+/**
+ * The purpose of this test and col_rec1 test is to create a territory based 
+ * database and create some objects with collation sensitive character types. 
+ * Then, make the database crash so that during the recovery, store engine has 
+ * to do collation related operations. Those collation related operations are 
+ * going to require that we use correct Collator object. DERBY-3302 
+ * demonstrated a npe during this operation because Derby was relying on
+ * database context to get the correct Collator object. But database context
+ * is not available at this point in the recovery. With the fix for DERBY-3302, 
+ * the Collator object will now be obtained from collation sensitive datatypes 
+ * itself rather than looking at database context which is not available at 
+ * this point in recovery. 
+ * 
+ * col_rec1 class will do the steps of create a territory based database
+ * and create some objects with collation sensitive character types. Then, make 
+ * the database crash. This test will do the part of rebooting the crashed
+ * db which will require store to go through recovery.
+ */
+
+public class col_rec2 extends BaseTest
+{
+
+    public col_rec2()
+    {
+    }
+
+    /**
+     * setup for restart recovery test which will require the use of correct
+     * Collator object during recovery of territory based database that was 
+     * created and crashed in this col_rec1
+     **/
+    private void test1(
+    Connection  conn,
+    String      test_name,
+    String      table_name)
+        throws SQLException
+    {
+        beginTest(conn, test_name);
+        Statement s = conn.createStatement();
+        ResultSet rs = s.executeQuery("VALUES SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY" + 
+                    "('derby.database.collation')");
+        rs.next();
+        String collation = rs.getString(1);
+        if (!collation.equals("TERRITORY_BASED"))
+            logError("Collation should have been territory based but it is "
+            		+ collation);
+
+        rs = s.executeQuery("select count(*) from t");
+        rs.next();
+        int numberOfRows = rs.getInt(1);
+        if (numberOfRows > 1)
+        	 logError("Expected 1 row in T but found " + numberOfRows +
+        			 " rows");
+        rs.close();
+        s.close();
+        endTest(conn, test_name);
+    }
+
+    public void testList(Connection conn)
+        throws SQLException
+    {
+        test1(conn, "test1", "T");
+    }
+
+    public static void main(String[] argv) 
+        throws Throwable
+    {
+    	col_rec2 test = new col_rec2();
+
+   		ij.getPropertyArg(argv); 
+        Connection conn = ij.startJBMS();
+        conn.setAutoCommit(false);
+
+        try
+        {
+            test.testList(conn);
+        }
+        catch (SQLException sqle)
+        {
+			org.apache.derby.tools.JDBCDisplayUtil.ShowSQLException(
+                System.out, sqle);
+			sqle.printStackTrace(System.out);
+		}
+    }
+}

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/col_rec2.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message