db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r1339281 - in /db/derby/code/trunk/java: engine/org/apache/derby/impl/sql/compile/ testing/org/apache/derbyTesting/functionTests/master/ testing/org/apache/derbyTesting/functionTests/tests/lang/ testing/org/apache/derbyTesting/functionTests...
Date Wed, 16 May 2012 17:45:36 GMT
Author: dag
Date: Wed May 16 17:45:35 2012
New Revision: 1339281

URL: http://svn.apache.org/viewvc?rev=1339281&view=rev
Log:
DERBY-5749 Implicit cast of variable length values, e.g. as arguments to stored methods and
generated columns values, silently truncate if too long

Patches derby-5749b (stored procedures and functions) and
derby-5749-2b (generated columns).

Quote from releaseNote.html attached to the issue:

Summary of Change

SQL now does correct checking of the length of variable strings in
these two cases:

    Arguments to stored procedures and functions
    Values assigned to generated columns

Previously, if the actual value was longer than the datatype of the
argument or column to which it was assigned, Derby would silently
truncate the value and ignore the truncation. The SQL standard
requires a truncation exception be thrown.

Derby now throws an SQLException with SQL state 22001 in these cases.


Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/StaticMethodCallNode.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/iepnegativetests_ES.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/importExportIJ.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest2.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DatabaseClassLoadingTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/GeneratedColumnsHelper.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/GeneratedColumnsTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/RoutineTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ImportExportProcedureTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/iepnegativetests.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/importExportIJ.sql

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java?rev=1339281&r1=1339280&r2=1339281&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java Wed May
16 17:45:35 2012
@@ -92,6 +92,16 @@ public class CastNode extends ValueNode
 	** whether the case is possible or not.
 	*/
 
+    /**
+     * Method calls:
+     * Argument type has the same semantics as assignment:
+     * Section 9.2 (Store assignment). There, General Rule
+     * 2.b.v.2 says that the database should raise an exception
+     * if truncation occurs when stuffing a string value into a
+     * VARCHAR, so make sure CAST doesn't issue warning only.
+     */
+    private boolean assignmentSemantics = false;
+
 	/**
 	 * Initializer for a CastNode
 	 *
@@ -981,7 +991,9 @@ public class CastNode extends ValueNode
 			
 			mb.push(isNumber ? getTypeServices().getPrecision() : getTypeServices().getMaximumWidth());
 			mb.push(getTypeServices().getScale());
-			mb.push(!sourceCTI.variableLength() || isNumber);
+            mb.push(!sourceCTI.variableLength() ||
+                    isNumber ||
+                    assignmentSemantics);
 			mb.callMethod(VMOpcode.INVOKEINTERFACE, ClassName.VariableSizeDataValue,
 					"setWidth", "void", 3);
 
@@ -1028,6 +1040,16 @@ public class CastNode extends ValueNode
 		forDataTypeFunction = b;
 	}
 
+    /**
+     * Set assignmentSemantics to true. Used by method calls for casting actual
+     * arguments
+     */
+    void setAssignmentSemantics()
+    {
+        assignmentSemantics = true;
+    }
+
+    
 	/**
 	 * {@inheritDoc}
 	 * @throws StandardException 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java?rev=1339281&r1=1339280&r2=1339281&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java
Wed May 16 17:45:35 2012
@@ -457,7 +457,14 @@ abstract class DMLModStatementNode exten
                      dtd,
                      getContextManager()
                      );
-
+                
+                // Assignment semantics of implicit cast here:
+                // Section 9.2 (Store assignment). There, General Rule 
+                // 2.b.v.2 says that the database should raise an exception
+                // if truncation occurs when stuffing a string value into a
+                // VARCHAR, so make sure CAST doesn't issue warning only.
+                ((CastNode)generationClause).setAssignmentSemantics();
+                
                 //
                 // Unqualified function references should resolve to the
                 // current schema at the time that the table was

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/StaticMethodCallNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/StaticMethodCallNode.java?rev=1339281&r1=1339280&r2=1339281&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/StaticMethodCallNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/StaticMethodCallNode.java
Wed May 16 17:45:35 2012
@@ -26,7 +26,6 @@ import org.apache.derby.iapi.services.co
 import org.apache.derby.iapi.services.sanity.SanityManager;
 
 import org.apache.derby.iapi.sql.compile.CompilerContext;
-import org.apache.derby.iapi.sql.compile.TypeCompiler;
 import org.apache.derby.iapi.sql.compile.C_NodeTypes;
 import org.apache.derby.iapi.types.JSQLType;
 import org.apache.derby.iapi.types.DataTypeDescriptor;
@@ -34,7 +33,6 @@ import org.apache.derby.iapi.types.Strin
 import org.apache.derby.iapi.types.TypeId;
 
 import org.apache.derby.iapi.sql.dictionary.AliasDescriptor;
-import org.apache.derby.iapi.sql.dictionary.DataDictionary;
 import org.apache.derby.iapi.sql.dictionary.SchemaDescriptor;
 
 import org.apache.derby.iapi.reference.ClassName;
@@ -42,8 +40,6 @@ import org.apache.derby.iapi.reference.S
 import org.apache.derby.iapi.reference.JDBC30Translation;
 import org.apache.derby.iapi.error.StandardException;
 
-import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;
-import org.apache.derby.iapi.services.loader.ClassInspector;
 import org.apache.derby.iapi.services.compiler.LocalField;
 
 import org.apache.derby.iapi.util.JBitSet;
@@ -54,9 +50,6 @@ import org.apache.derby.iapi.sql.conn.Au
 import org.apache.derby.catalog.AliasInfo;
 import org.apache.derby.catalog.TypeDescriptor;
 import org.apache.derby.catalog.types.RoutineAliasInfo;
-import org.apache.derby.impl.sql.compile.ActivationClassBuilder;
-
-import org.apache.derby.catalog.UUID;
 
 import java.util.Vector;
 import java.lang.reflect.Modifier;
@@ -618,6 +611,12 @@ public class StaticMethodCallNode extend
 						paramdtd,
 						getContextManager());
 
+                    // Argument type has the same semantics as assignment:
+                    // Section 9.2 (Store assignment). There, General Rule 
+                    // 2.b.v.2 says that the database should raise an exception
+                    // if truncation occurs when stuffing a string value into a
+                    // VARCHAR, so make sure CAST doesn't issue warning only.
+                    ((CastNode)castNode).setAssignmentSemantics();
 
 					methodParms[p] = (JavaValueNode) getNodeFactory().getNode(
 							C_NodeTypes.SQL_TO_JAVA_VALUE_NODE,

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/iepnegativetests_ES.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/iepnegativetests_ES.out?rev=1339281&r1=1339280&r2=1339281&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/iepnegativetests_ES.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/iepnegativetests_ES.out
Wed May 16 17:45:35 2012
@@ -109,11 +109,10 @@ ERROR XIE0J: Un delimitador no es v EnC:
 ij> call SYSCS_UTIL.SYSCS_EXPORT_TABLE ('IEP', 'T1' , 'extinout/t2.dat' , 
                                  null, '', null) ;
 ERROR XIE0J: Un delimitador no es v EnC:>225< lido o se ha utilizado m EnC:>225<
s de una vez.
-ij> --more than one character passed to the delimiters get truncated to one
---following one should give error because eventually '\' delimiter 
+ij> --following one should give error because eventually '\' delimiter 
 --is used a both for char and col
 call SYSCS_UTIL.SYSCS_EXPORT_TABLE ('IEP', 'T1' , 'extinout/t2.dat' , 
-                                 '\a', '\', null) ;
+                                 '\', '\', null) ;
 ERROR XIE0J: Un delimitador no es v EnC:>225< lido o se ha utilizado m EnC:>225<
s de una vez.
 ij> --DO A VALID EXPORT AND  IMPORT 
 set schema iep;

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/importExportIJ.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/importExportIJ.out?rev=1339281&r1=1339280&r2=1339281&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/importExportIJ.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/importExportIJ.out
Wed May 16 17:45:35 2012
@@ -839,7 +839,7 @@ ij> --
 --
 
 CALL SYSCS_UTIL.SYSCS_EXPORT_QUERY_LOBS_TO_EXTFILE
-('SELECT * FROM DERBY_2925_LOB','extout/derby-2925_data.dat', '\t' ,'|','UTF-16','extout/derby-2925_lobs.dat');
+('SELECT * FROM DERBY_2925_LOB','extout/derby-2925_data.dat', '\' ,'|','UTF-16','extout/derby-2925_lobs.dat');
 0 rows inserted/updated/deleted
 ij> --
 -- Errors should should happen in the second
@@ -847,7 +847,7 @@ ij> --
 -- since extout/derby-2925_data.dat already exists.
 --
 CALL SYSCS_UTIL.SYSCS_EXPORT_QUERY_LOBS_TO_EXTFILE
-('SELECT * FROM DERBY_2925_LOB','extout/derby-2925_data.dat', '\t' ,'|','UTF-16','extout/derby-2925_lobs.dat');
+('SELECT * FROM DERBY_2925_LOB','extout/derby-2925_data.dat', '\' ,'|','UTF-16','extout/derby-2925_lobs.dat');
 ERROR XIE0S: The export operation was not performed, because the specified output file (extout/derby-2925_data.dat)
already exists. Export processing will not overwrite an existing file, even if the process
has permissions to write to that file, due to security concerns, and to avoid accidental file
damage. Please either change the output file name in the export procedure arguments to specify
a file which does not exist, or delete the existing file, then retry the export operation.
 ij> --
 -- Testing SYSCS_UTIL.SYSCS_EXPORT_QUERY_LOBS_TO_EXTFILE
@@ -859,7 +859,7 @@ ij> --
 --
 
 CALL SYSCS_UTIL.SYSCS_EXPORT_QUERY_LOBS_TO_EXTFILE
-('SELECT * FROM DERBY_2925_LOB','extout/derby-2925_data1.dat', '\t' ,'|','UTF-16','extout/derby-2925_lobs.dat');
+('SELECT * FROM DERBY_2925_LOB','extout/derby-2925_data1.dat', '\' ,'|','UTF-16','extout/derby-2925_lobs.dat');
 ERROR XIE0T: The export operation was not performed, because the specified large object auxiliary
file (extout/derby-2925_lobs.dat) already exists. Export processing will not overwrite an
existing file, even if the process has permissions to write to that file, due to security
concerns, and to avoid accidental file damage. Please either change the large object auxiliary
file name in the export procedure arguments to specify a file which does not exist, or delete
the existing file, then retry the export operation.
 ij> --
 -- end test case for derby-2925:

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest2.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest2.java?rev=1339281&r1=1339280&r2=1339281&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest2.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest2.java
Wed May 16 17:45:35 2012
@@ -1534,7 +1534,7 @@ public class CollationTest2 extends Base
         // bulk insert with replace to empty table/one index from an empty file 
         // import empty_file.dat into EMPTY_TABLE 
         doImportTable(
-                "APP", "EMPTY_TABLE", emptyFileName, "|", "``", null, 1);
+                "APP", "EMPTY_TABLE", emptyFileName, "|", "`", null, 1);
 
         commit();
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DatabaseClassLoadingTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DatabaseClassLoadingTest.java?rev=1339281&r1=1339280&r2=1339281&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DatabaseClassLoadingTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DatabaseClassLoadingTest.java
Wed May 16 17:45:35 2012
@@ -161,7 +161,7 @@ public class DatabaseClassLoadingTest ex
                   "language java parameter style java");
 
                 s.executeUpdate(
-                  "create function EMC.GETARTICLE(path VARCHAR(40)) " +
+                  "create function EMC.GETARTICLE(path VARCHAR(60)) " +
                   "RETURNS VARCHAR(256) " +
                   "NO SQL " +
                   "external name 'org.apache.derbyTesting.databaseclassloader.emc.getArticle'
" +

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/GeneratedColumnsHelper.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/GeneratedColumnsHelper.java?rev=1339281&r1=1339280&r2=1339281&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/GeneratedColumnsHelper.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/GeneratedColumnsHelper.java
Wed May 16 17:45:35 2012
@@ -109,6 +109,7 @@ public class GeneratedColumnsHelper exte
     protected static  final   String  FORBIDDEN_DROP_TRIGGER = "X0Y24";
     protected static  final   String  LOCK_TIMEOUT = "40XL1";
     protected static  final   String  TOO_MUCH_CONTENTION = "X0Y84";
+    protected static  final   String  STRING_TRUNCATION = "22001";
 
     ///////////////////////////////////////////////////////////////////////////////////
     //

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/GeneratedColumnsTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/GeneratedColumnsTest.java?rev=1339281&r1=1339280&r2=1339281&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/GeneratedColumnsTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/GeneratedColumnsTest.java
Wed May 16 17:45:35 2012
@@ -2406,10 +2406,10 @@ public class GeneratedColumnsTest extend
              "create table t_cc_char\n" +
              "(\n" +
              "    a char( 10 ),\n" +
-             "    b char( 5 ) generated always as( upper( a ) ),\n" +
+             "    b char( 5 ) generated always as( cast(upper( a ) as char(5))),\n" +
              "    c char( 10 ) generated always as( upper( a ) ),\n" +
              "    d char( 15 ) generated always as( upper( a ) ),\n" +
-             "    e varchar( 5 ) generated always as( upper( a ) ),\n" +
+             "    e varchar( 5 ) generated always as( cast(upper( a ) as varchar(5))),\n"
+
              "    f varchar( 10 ) generated always as( upper( a ) ),\n" +
              "    g varchar( 15 ) generated always as( upper( a ) )\n" +
              ")\n"
@@ -2420,10 +2420,10 @@ public class GeneratedColumnsTest extend
              "create table t_cc_varchar\n" +
              "(\n" +
              "    a varchar( 10 ),\n" +
-             "    b char( 5 ) generated always as( upper( a ) ),\n" +
+             "    b char( 5 ) generated always as( cast(upper( a ) as char(5))),\n" +
              "    c char( 10 ) generated always as( upper( a ) ),\n" +
              "    d char( 15 ) generated always as( upper( a ) ),\n" +
-             "    e varchar( 5 ) generated always as( upper( a ) ),\n" +
+             "    e varchar( 5 ) generated always as( cast(upper( a ) as varchar(5))),\n"
+
              "    f varchar( 10 ) generated always as( upper( a ) ),\n" +
              "    g varchar( 15 ) generated always as( upper( a ) )\n" +
              ")\n"
@@ -2526,12 +2526,12 @@ public class GeneratedColumnsTest extend
         goodStatement
             (
              conn,
-             "create table t_atac_3( a varchar( 5 ), b varchar( 5 ) generated always as (
upper( a )  ) )"
+             "create table t_atac_3( a varchar( 5 ), b varchar( 5 ) generated always as (
cast(upper( a ) as varchar(5)) ) )"
              );
         goodStatement
             (
              conn,
-             "create table t_atac_4( a varchar( 5 ) for bit data,  b varchar( 5 ) for bit
data generated always as ( a )  )"
+             "create table t_atac_4( a varchar( 5 ) for bit data,  b varchar( 5 ) for bit
data generated always as ( cast(a as varchar( 5 ) for bit data))  )"
              );
 
         //
@@ -5536,6 +5536,44 @@ public class GeneratedColumnsTest extend
         );
     }
 
+
+    // Derby 5749
+    public void test_derby_5749()
+        throws Exception
+    {
+        Connection conn = getConnection();
+
+        goodStatement
+        (
+            conn,
+            "create table t_5749\n" +
+            "(c varchar(5) generated always as ('--' || b), b varchar(5))\n"
+        );
+
+        // fails on truncation
+        expectExecutionError
+        (
+            conn,
+            STRING_TRUNCATION,
+            "insert into t_5749 values (default, '12345')"
+        );
+
+        // Try an update case:
+        goodStatement
+        (
+            conn,
+            "insert into t_5749 values (default, '123')"
+        );
+
+        expectExecutionError
+        (
+            conn,
+            STRING_TRUNCATION,
+            "update t_5749 set b='12345'"
+        );
+
+    }
+
     ///////////////////////////////////////////////////////////////////////////////////
     //
     // MINIONS

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/RoutineTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/RoutineTest.java?rev=1339281&r1=1339280&r2=1339281&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/RoutineTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/RoutineTest.java
Wed May 16 17:45:35 2012
@@ -22,6 +22,7 @@
 package org.apache.derbyTesting.functionTests.tests.lang;
 
 import java.io.UnsupportedEncodingException;
+import java.sql.CallableStatement;
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
@@ -640,7 +641,53 @@ public class RoutineTest extends BaseJDB
         assertStatementError( CANNOT_STUFF_NULL_INTO_PRIMITIVE, s, "values( negateInt( cast(
null as int) ) )" );
         assertStatementError( CANNOT_STUFF_NULL_INTO_PRIMITIVE, s, "values( negateInt( getNullInt()
) )" );
     }
-    
+
+    /**
+     * DERBY-5749: Too long (non-blank) argument for VARCHAR parameter does not
+     * throw as expected.
+     */
+    public void test_5749() throws SQLException
+    {
+        Statement s = createStatement();
+        s.executeUpdate("create table t5749(v varchar(5))");
+        s.executeUpdate(
+            "create procedure p5749 (a varchar(5)) modifies sql data " +
+            "external name '" + RoutineTest.class.getName() + ".p5749' " +
+            "language java parameter style java");
+        CallableStatement cs = prepareCall("call p5749(?)");
+        cs.setString(1, "123456");
+
+        // This silently truncates before fix of DERBY-5749
+        try {
+            cs.execute();
+            fail();
+        } catch (SQLException e) {
+            assertSQLState("22001", e);
+        }
+
+        // This silently truncates also
+        try {
+            s.executeUpdate("call p5749('123456')");
+            fail();
+        } catch (SQLException e) {
+            assertSQLState("22001", e);
+        }
+
+
+        PreparedStatement ps = prepareStatement("insert into t5749 values(?)");
+        ps.setString(1, "123456");
+        // This does not truncate
+        try {
+            ps.execute();
+            fail();
+        } catch (SQLException e) {
+            assertSQLState("22001", e);
+        }
+    }
+
+
+
+
     /*
     ** Routine implementations called from the tests but do
     *  not use DriverManager so that this test can be used on
@@ -688,6 +735,8 @@ public class RoutineTest extends BaseJDB
 
     public static int negateInt( int arg ) { return -arg; }
     public static Integer getNullInt() { return null; }
-    
+
+    public static void p5749 (String s) {
+    }
 }
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ImportExportProcedureTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ImportExportProcedureTest.java?rev=1339281&r1=1339280&r2=1339281&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ImportExportProcedureTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ImportExportProcedureTest.java
Wed May 16 17:45:35 2012
@@ -2044,7 +2044,7 @@ public final class ImportExportProcedure
         
         cSt = prepareCall(
             "call SYSCS_UTIL.SYSCS_EXPORT_TABLE ('IEP', 'T1' , "
-            + "'extinout/t1.dat' , '\\a', '\\', null) ");
+            + "'extinout/t1.dat' , '\\', '\\', null) ");
         assertStatementError("XIE0J", cSt);
                 
         //DO A VALID EXPORT AND  IMPORT

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/iepnegativetests.sql
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/iepnegativetests.sql?rev=1339281&r1=1339280&r2=1339281&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/iepnegativetests.sql
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/iepnegativetests.sql
Wed May 16 17:45:35 2012
@@ -70,11 +70,10 @@ call SYSCS_UTIL.SYSCS_EXPORT_TABLE ('IEP
                                  null, '', null) ;
 
 
---more than one character passed to the delimiters get truncated to one
 --following one should give error because eventually '\' delimiter 
 --is used a both for char and col
 call SYSCS_UTIL.SYSCS_EXPORT_TABLE ('IEP', 'T1' , 'extinout/t2.dat' , 
-                                 '\a', '\', null) ;
+                                 '\', '\', null) ;
 
 
 --DO A VALID EXPORT AND  IMPORT 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/importExportIJ.sql
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/importExportIJ.sql?rev=1339281&r1=1339280&r2=1339281&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/importExportIJ.sql
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/importExportIJ.sql
Wed May 16 17:45:35 2012
@@ -535,14 +535,14 @@ create table derby_2925_lob
 --
 
 CALL SYSCS_UTIL.SYSCS_EXPORT_QUERY_LOBS_TO_EXTFILE
-('SELECT * FROM DERBY_2925_LOB','extout/derby-2925_data.dat', '\t' ,'|','UTF-16','extout/derby-2925_lobs.dat');
+('SELECT * FROM DERBY_2925_LOB','extout/derby-2925_data.dat', '\' ,'|','UTF-16','extout/derby-2925_lobs.dat');
 --
 -- Errors should should happen in the second
 -- call to SYSCS_UTIL.SYSCS_EXPORT_QUERY_LOBS_TO_EXTFILE
 -- since extout/derby-2925_data.dat already exists.
 --
 CALL SYSCS_UTIL.SYSCS_EXPORT_QUERY_LOBS_TO_EXTFILE
-('SELECT * FROM DERBY_2925_LOB','extout/derby-2925_data.dat', '\t' ,'|','UTF-16','extout/derby-2925_lobs.dat');
+('SELECT * FROM DERBY_2925_LOB','extout/derby-2925_data.dat', '\' ,'|','UTF-16','extout/derby-2925_lobs.dat');
 
 --
 -- Testing SYSCS_UTIL.SYSCS_EXPORT_QUERY_LOBS_TO_EXTFILE
@@ -554,7 +554,7 @@ CALL SYSCS_UTIL.SYSCS_EXPORT_QUERY_LOBS_
 --
 
 CALL SYSCS_UTIL.SYSCS_EXPORT_QUERY_LOBS_TO_EXTFILE
-('SELECT * FROM DERBY_2925_LOB','extout/derby-2925_data1.dat', '\t' ,'|','UTF-16','extout/derby-2925_lobs.dat');
+('SELECT * FROM DERBY_2925_LOB','extout/derby-2925_data1.dat', '\' ,'|','UTF-16','extout/derby-2925_lobs.dat');
 
 --
 -- end test case for derby-2925:



Mime
View raw message