db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r570285 - in /db/derby/code/trunk/java: engine/org/apache/derby/iapi/sql/dictionary/ testing/org/apache/derbyTesting/functionTests/master/ testing/org/apache/derbyTesting/functionTests/tests/lang/
Date Tue, 28 Aug 2007 00:54:34 GMT
Author: dag
Date: Mon Aug 27 17:54:32 2007
New Revision: 570285

URL: http://svn.apache.org/viewvc?rev=570285&view=rev
Log:
DERBY-2989 Insert into table with constraints fails if the table name is "indicator" (or any other SQL keyword)
Patch DERBY-2989-2. Based on original patch contributed by Dmitry Gusev.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/altertable.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/autoincrement.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr002.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr003.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr004.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr005.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr006.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr007.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr027.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr030.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkConstraint.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/columnDefaults.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/db2Compatibility.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dml108.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/fk_nonSPS.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/refActions2.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/schemas.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/triggerGeneral.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/views.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/xts752.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/checkConstraint.sql

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java?rev=570285&r1=570284&r2=570285&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java Mon Aug 27 17:54:32 2007
@@ -231,31 +231,34 @@
 	 */
 	public String	getQualifiedName()
 	{
-		//quoteStringIfNecessary is for bug 3476. If the schemaName and/or tableName has
-		//double quotes in it, this method will put them in quotes and replace every
-		//double quote with 2 double quotes.
-		return quoteStringIfNecessary(getSchemaName()) + "." +
-			quoteStringIfNecessary(getName());
+		//quoteProtectName is for bug 3476. 
+		return quoteProtectName(getSchemaName()) + "." +
+			quoteProtectName(getName());
 	}
 
 	/**
 	 * If the name has double quotes in it, put two double quotes for every single
 	 * double quote.
+	 * Finally put double quotes around string to protect against
+	 * names with blanks, reserved words being used as identifiers etc.
 	 * For eg, if table name is m"n, return it as "m""n". For now, this is used
 	 * by DMLModStatementNode.parseCheckConstraint().
 	 *
+	 * Possible improvement: We could possibly analyze string to
+	 * avoid double quotes in normal cases.
+	 *
 	 * @param name	The String with or without double quotes
 	 *
 	 * @return	The quoted String
 	 */
 
-	private String quoteStringIfNecessary(String name)
+	private String quoteProtectName(String name)
 	{
 		String quotedString = name;
 		int quotePos = name.indexOf("\"");
 
 		if (quotePos == -1)
-			return name;
+			return "\"" + name + "\"";
 
 		//string does have quotes in it.
 		while(quotePos != -1) {

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/altertable.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/altertable.out?rev=570285&r1=570284&r2=570285&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/altertable.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/altertable.out Mon Aug 27 17:54:32 2007
@@ -70,17 +70,17 @@
 ERROR 42Y55: 'ALTER TABLE' cannot be performed on 'NOTEXISTS' because it does not exist.
 ij> -- add a column that already exists
 alter table t0 add column c1 int;
-ERROR X0Y32: Column 'C1' already exists in Table/View 'APP.T0'.
+ERROR X0Y32: Column 'C1' already exists in Table/View '"APP"."T0"'.
 ij> -- alter a system table
 alter table sys.systables add column c1 int;
 ERROR 42X62: 'ALTER TABLE' is not allowed in the 'SYS' schema.
 ij> -- alter table on a view
 alter table v2 add column c2 int;
-ERROR 42Y62: 'ALTER TABLE' is not allowed on 'APP.V2' because it is a view.
+ERROR 42Y62: 'ALTER TABLE' is not allowed on '"APP"."V2"' because it is a view.
 ij> -- add a primary key column to a table which already has one
 -- this will produce an error
 alter table t0 add column c2 int not null default 0 primary key;
-ERROR X0Y58: Attempt to add a primary key constraint to table 'APP.T0' failed because the table already has a constraint of that type.  A table can only have a single primary key constraint.
+ERROR X0Y58: Attempt to add a primary key constraint to table '"APP"."T0"' failed because the table already has a constraint of that type.  A table can only have a single primary key constraint.
 ij> -- add a unique column constraint to a table with > 1 row
 alter table t3 add column c2 int not null default 0 unique;
 ERROR 23505: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'xxxxGENERATED-IDxxxx' defined on 'T3'.
@@ -452,7 +452,7 @@
 ij> insert into t0_1 values (1, 1);
 1 row inserted/updated/deleted
 ij> insert into t0_1 values (1, 3);
-ERROR 23513: The check constraint 'xxxxGENERATED-IDxxxx' was violated while performing an INSERT or UPDATE on table 'APP.T0_1'.
+ERROR 23513: The check constraint 'xxxxGENERATED-IDxxxx' was violated while performing an INSERT or UPDATE on table '"APP"."T0_1"'.
 ij> insert into t0_1 values (1, 1);
 1 row inserted/updated/deleted
 ij> select * from t0_1;
@@ -477,7 +477,7 @@
 2          |2          
 ij> -- verify constraint has been added, the following should fail
 insert into t0_1 values (1, 3);
-ERROR 23513: The check constraint 'CK1' was violated while performing an INSERT or UPDATE on table 'APP.T0_1'.
+ERROR 23513: The check constraint 'CK1' was violated while performing an INSERT or UPDATE on table '"APP"."T0_1"'.
 ij> rollback;
 ij> -- add check constraint to table with rows w/ 3 failures
 alter table t0_1 add column c2 int;
@@ -501,7 +501,7 @@
 ij> insert into t0_1 values (3, 3);
 1 row inserted/updated/deleted
 ij> alter table t0_1 add constraint ck1 check(c2 = c1);
-ERROR X0Y59: Attempt to add or enable constraint(s) on table 'APP.T0_1' failed because the table contains 3 row(s) that violate the following check constraint(s): CK1.
+ERROR X0Y59: Attempt to add or enable constraint(s) on table '"APP"."T0_1"' failed because the table contains 3 row(s) that violate the following check constraint(s): CK1.
 ij> -- verify constraint has NOT been added, the following should succeed
 insert into t0_1 values (1, 3);
 1 row inserted/updated/deleted
@@ -527,11 +527,11 @@
 ij> insert into t0_1 values (1, 1);
 1 row inserted/updated/deleted
 ij> insert into t0_1 values (1, 2);
-ERROR 23513: The check constraint 'xxxxGENERATED-IDxxxx' was violated while performing an INSERT or UPDATE on table 'APP.T0_1'.
+ERROR 23513: The check constraint 'xxxxGENERATED-IDxxxx' was violated while performing an INSERT or UPDATE on table '"APP"."T0_1"'.
 ij> insert into t0_1 values (1, 1);
 ERROR 23505: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'P2' defined on 'T0_1'.
 ij> insert into t0_1 values (2, 1);
-ERROR 23513: The check constraint 'xxxxGENERATED-IDxxxx' was violated while performing an INSERT or UPDATE on table 'APP.T0_1'.
+ERROR 23513: The check constraint 'xxxxGENERATED-IDxxxx' was violated while performing an INSERT or UPDATE on table '"APP"."T0_1"'.
 ij> insert into t0_1 values (2, 2);
 1 row inserted/updated/deleted
 ij> select * from t0_1;
@@ -603,15 +603,15 @@
 -- negative tests
 -- drop non-existent constraint
 alter table t0 drop constraint notexists;
-ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.NOTEXISTS' on table 'APP.T0'. 
+ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.NOTEXISTS' on table '"APP"."T0"'. 
 ij> -- constraint/table mismatch
 alter table t1 drop constraint p1;
-ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.P1' on table 'APP.T1'. 
+ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.P1' on table '"APP"."T1"'. 
 ij> -- In DB2 compatibility mode, we cann't add a nullable primary key
 alter table t0_1 add constraint p2 primary key(c1);
 ERROR 42831: 'C1' cannot be a column of a primary key or unique key because it can contain null values.
 ij> alter table t0_1 drop constraint p2;
-ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.P2' on table 'APP.T0_1'. 
+ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.P2' on table '"APP"."T0_1"'. 
 ij> -- positive tests
 -- verify that we can add/drop/add/drop/... constraints
 alter table t0_1 add column c2 int not null constraint p2 primary key default 0;
@@ -778,7 +778,7 @@
 ERROR 42Y07: Schema 'BADSCHEMA' does not exist
 ij> -- fail
 alter table x drop constraint newschema.newcons;
-ERROR 42X86: ALTER TABLE failed. There is no constraint 'NEWSCHEMA.NEWCONS' on table 'APP.X'. 
+ERROR 42X86: ALTER TABLE failed. There is no constraint 'NEWSCHEMA.NEWCONS' on table '"APP"."X"'. 
 ij> -- ok
 alter table x drop constraint app.newcons;
 0 rows inserted/updated/deleted
@@ -804,7 +804,7 @@
 0 rows inserted/updated/deleted
 ij> -- fail, cannot find emptyschema.conn
 alter table app.x drop constraint emptyschema.con;
-ERROR 42X86: ALTER TABLE failed. There is no constraint 'EMPTYSCHEMA.CON' on table 'APP.X'. 
+ERROR 42X86: ALTER TABLE failed. There is no constraint 'EMPTYSCHEMA.CON' on table '"APP"."X"'. 
 ij> select schemaname, constraintname from sys.sysconstraints c, sys.sysschemas s where s.schemaid = c.schemaid order by 1;
 SCHEMANAME                                                                                                                      |CONSTRAINTNAME                                                                                                                  
 -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -856,9 +856,9 @@
 1          |1          
 1          |1          
 ij> alter table t1 drop primary key;
-ERROR 42X86: ALTER TABLE failed. There is no constraint 'PRIMARY KEY' on table 'APP.T1'. 
+ERROR 42X86: ALTER TABLE failed. There is no constraint 'PRIMARY KEY' on table '"APP"."T1"'. 
 ij> alter table t1 drop constraint emptyschema.C1;
-ERROR 42X86: ALTER TABLE failed. There is no constraint 'EMPTYSCHEMA.C1' on table 'APP.T1'. 
+ERROR 42X86: ALTER TABLE failed. There is no constraint 'EMPTYSCHEMA.C1' on table '"APP"."T1"'. 
 ij> alter table t1 drop constraint nosuchschema.C2;
 ERROR 42Y07: Schema 'NOSUCHSCHEMA' does not exist
 ij> alter table t1 add constraint emptyschema.C1_PLUS_C2 check ((c1 + c2) < 100);
@@ -869,7 +869,7 @@
 ij> alter table APP.t1 drop constraint APP.C1_PLUS_C2;
 0 rows inserted/updated/deleted
 ij> execute alplus;
-ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.C1_PLUS_C2' on table 'APP.T1'. 
+ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.C1_PLUS_C2' on table '"APP"."T1"'. 
 ij> remove alplus;
 ij> drop table t1;
 0 rows inserted/updated/deleted
@@ -920,7 +920,7 @@
 1          |NULL       
 ij> -- Now that B has a null value, trying to modify it to NOT NULL should fail
 alter table atmcn_1 alter column b not null;
-ERROR X0Y80: ALTER table 'APP.ATMCN_1' failed. Null data found in column 'B'.
+ERROR X0Y80: ALTER table '"APP"."ATMCN_1"' failed. Null data found in column 'B'.
 ij> -- show that a column which is part of the PRIMARY KEY cannot be modified NULL
 create table atmcn_2 (a integer not null primary key, b integer not null);
 0 rows inserted/updated/deleted
@@ -1002,7 +1002,7 @@
 create view renc_vw_1 (v1, v2) as select b, d from renc_1;
 0 rows inserted/updated/deleted
 ij> rename column renc_vw_1.v2 to v3;
-ERROR 42Y62: 'RENAME COLUMN' is not allowed on 'APP.RENC_VW_1' because it is a view.
+ERROR 42Y62: 'RENAME COLUMN' is not allowed on '"APP"."RENC_VW_1"' because it is a view.
 ij> describe renc_vw_1;
 COLUMN_NAME         |TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL&
 ------------------------------------------------------------------------------
@@ -1423,7 +1423,7 @@
 0 rows inserted/updated/deleted
 ij> -- This fails because a is the only column in the table.
 alter table atdc_3 drop column a restrict;
-ERROR X0Y25: Operation 'DROP COLUMN' cannot be performed on object 'THE *LAST* COLUMN A' because TABLE 'RENC_SCHEMA_1.ATDC_3' is dependent on that object.
+ERROR X0Y25: Operation 'DROP COLUMN' cannot be performed on object 'THE *LAST* COLUMN A' because TABLE '"RENC_SCHEMA_1"."ATDC_3"' is dependent on that object.
 ij> drop index atdc_3_idx_1;
 0 rows inserted/updated/deleted
 ij> -- cascade/restrict processing doesn't currently consider indexes.

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/autoincrement.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/autoincrement.out?rev=570285&r1=570284&r2=570285&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/autoincrement.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/autoincrement.out Mon Aug 27 17:54:32 2007
@@ -1775,7 +1775,7 @@
 C11                                                                                                                             |4                   |2                   |2                   
 ij(CONN2)> -- try RESTART WITH on a non-autoincrement column. It should fail
 alter table t1 alter column c12 RESTART WITH 2;
-ERROR 42837: ALTER TABLE 'APP.T1' specified attributes for column 'C12' that are not compatible with the existing column.
+ERROR 42837: ALTER TABLE '"APP"."T1"' specified attributes for column 'C12' that are not compatible with the existing column.
 ij(CONN2)> -- try RESTART WITH with a non-integer column
 alter table t1 alter column c11 RESTART WITH 2.20;
 ERROR 42X49: Value '2.20' is not a valid integer literal.

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr002.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr002.out?rev=570285&r1=570284&r2=570285&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr002.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr002.out Mon Aug 27 17:54:32 2007
@@ -41,7 +41,7 @@
 WARNING 02000: No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table.
 ij> INSERT INTO SUN.STAFF5
         VALUES('E1','Alice',0,'Deale');
-ERROR 23513: The check constraint 'STAFF5_GRADE' was violated while performing an INSERT or UPDATE on table 'SUN.STAFF5'.
+ERROR 23513: The check constraint 'STAFF5_GRADE' was violated while performing an INSERT or UPDATE on table '"SUN"."STAFF5"'.
 ij> -- PASS:0302 If ERROR, check constraint, 0 rows inserted?
 
   INSERT INTO SUN.STAFF5
@@ -49,7 +49,7 @@
 1 row inserted/updated/deleted
 ij> INSERT INTO SUN.STAFF5
         VALUES('E2','Tom',22,'Newyork');
-ERROR 23513: The check constraint 'STAFF5_GRADE' was violated while performing an INSERT or UPDATE on table 'SUN.STAFF5'.
+ERROR 23513: The check constraint 'STAFF5_GRADE' was violated while performing an INSERT or UPDATE on table '"SUN"."STAFF5"'.
 ij> -- PASS:0302 If ERROR, check constraint, 0 rows inserted?
 
   SELECT COUNT(*) FROM SUN.STAFF5;
@@ -73,12 +73,12 @@
 WARNING 02000: No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table.
 ij> INSERT INTO SUN.STAFF6
         VALUES('E1','Alice',0,'Deale');
-ERROR 23513: The check constraint 'STAFF6_GRADE' was violated while performing an INSERT or UPDATE on table 'SUN.STAFF6'.
+ERROR 23513: The check constraint 'STAFF6_GRADE' was violated while performing an INSERT or UPDATE on table '"SUN"."STAFF6"'.
 ij> -- PASS:0303 If ERROR, check constraint, 0 rows inserted?
 
   INSERT INTO SUN.STAFF6
         VALUES('E2','Tom',22,'Newyork');
-ERROR 23513: The check constraint 'STAFF6_GRADE' was violated while performing an INSERT or UPDATE on table 'SUN.STAFF6'.
+ERROR 23513: The check constraint 'STAFF6_GRADE' was violated while performing an INSERT or UPDATE on table '"SUN"."STAFF6"'.
 ij> -- PASS:0303 If ERROR, check constraint, 0 rows inserted?
 
   INSERT INTO SUN.STAFF6
@@ -106,12 +106,12 @@
 WARNING 02000: No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table.
 ij> INSERT INTO SUN.STAFF7
         VALUES('E1','Alice',0,'Deale');
-ERROR 23513: The check constraint 'STAFF7_GRADE' was violated while performing an INSERT or UPDATE on table 'SUN.STAFF7'.
+ERROR 23513: The check constraint 'STAFF7_GRADE' was violated while performing an INSERT or UPDATE on table '"SUN"."STAFF7"'.
 ij> -- PASS:0304 If ERROR, check constraint, 0 rows inserted?
 
   INSERT INTO SUN.STAFF7
         VALUES('E2','Tom',22,'Newyork');
-ERROR 23513: The check constraint 'STAFF7_GRADE' was violated while performing an INSERT or UPDATE on table 'SUN.STAFF7'.
+ERROR 23513: The check constraint 'STAFF7_GRADE' was violated while performing an INSERT or UPDATE on table '"SUN"."STAFF7"'.
 ij> -- PASS:0304 If ERROR, check constraint, 0 rows inserted?
 
   INSERT INTO SUN.STAFF7
@@ -148,7 +148,7 @@
 
   INSERT INTO SUN.STAFF8
         VALUES('E2',NULL,34,'Newyork');
-ERROR 23513: The check constraint 'STAFF8_EMPNAME' was violated while performing an INSERT or UPDATE on table 'SUN.STAFF8'.
+ERROR 23513: The check constraint 'STAFF8_EMPNAME' was violated while performing an INSERT or UPDATE on table '"SUN"."STAFF8"'.
 ij> -- PASS:0305 If ERROR, check constraint, 0 rows inserted?
 
   SELECT COUNT(*) FROM SUN.STAFF8;

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr003.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr003.out?rev=570285&r1=570284&r2=570285&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr003.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr003.out Mon Aug 27 17:54:32 2007
@@ -50,7 +50,7 @@
 
   INSERT INTO STAFF13
         VALUES('E2',NULL,36,'Newyork');
-ERROR 23513: The check constraint 'STAFF13_EMPNAME' was violated while performing an INSERT or UPDATE on table 'SUN.STAFF13'.
+ERROR 23513: The check constraint 'STAFF13_EMPNAME' was violated while performing an INSERT or UPDATE on table '"SUN"."STAFF13"'.
 ij> -- PASS:0306 If ERROR, check constraint, 0 rows inserted?
 
   SELECT COUNT(*) FROM STAFF13;
@@ -72,12 +72,12 @@
 WARNING 02000: No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table.
 ij> INSERT INTO STAFF9
         VALUES('E1','Thomas',0,'Deale');
-ERROR 23513: The check constraint 'STAFF9_EMPNAME' was violated while performing an INSERT or UPDATE on table 'SUN.STAFF9'.
+ERROR 23513: The check constraint 'STAFF9_EMPNAME' was violated while performing an INSERT or UPDATE on table '"SUN"."STAFF9"'.
 ij> -- PASS:0307 If ERROR, check constraint, 0 rows inserted?
 
   INSERT INTO STAFF9
         VALUES('E2','Tom',22,'Newyork');
-ERROR 23513: The check constraint 'STAFF9_EMPNAME' was violated while performing an INSERT or UPDATE on table 'SUN.STAFF9'.
+ERROR 23513: The check constraint 'STAFF9_EMPNAME' was violated while performing an INSERT or UPDATE on table '"SUN"."STAFF9"'.
 ij> -- PASS:0307 If ERROR, check constraint, 0 rows inserted?
 
   INSERT INTO STAFF9
@@ -103,12 +103,12 @@
 WARNING 02000: No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table.
 ij> INSERT INTO STAFF10
         VALUES('E1','Thomas',5,'Deale');
-ERROR 23513: The check constraint 'STAFF10_GRADE' was violated while performing an INSERT or UPDATE on table 'SUN.STAFF10'.
+ERROR 23513: The check constraint 'STAFF10_GRADE' was violated while performing an INSERT or UPDATE on table '"SUN"."STAFF10"'.
 ij> -- PASS:0308 If ERROR, check constraint, 0 rows inserted?
 
   INSERT INTO STAFF10
         VALUES('E2','Tom',22,'Newyork');
-ERROR 23513: The check constraint 'STAFF10_GRADE' was violated while performing an INSERT or UPDATE on table 'SUN.STAFF10'.
+ERROR 23513: The check constraint 'STAFF10_GRADE' was violated while performing an INSERT or UPDATE on table '"SUN"."STAFF10"'.
 ij> -- PASS:0308 If ERROR, check constraint, 0 rows inserted?
 
   INSERT INTO STAFF10
@@ -149,7 +149,7 @@
   UPDATE STAFF5
          SET GRADE = 10 * 10 / 5 + 1
          WHERE EMPNUM = 'R9';
-ERROR 23513: The check constraint 'STAFF5_GRADE' was violated while performing an INSERT or UPDATE on table 'SUN.STAFF5'.
+ERROR 23513: The check constraint 'STAFF5_GRADE' was violated while performing an INSERT or UPDATE on table '"SUN"."STAFF5"'.
 ij> -- PASS:0374 If ERROR, check constraint, 0 rows updated?
 
   SELECT COUNT(*) FROM STAFF5

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr004.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr004.out?rev=570285&r1=570284&r2=570285&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr004.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr004.out Mon Aug 27 17:54:32 2007
@@ -41,12 +41,12 @@
 WARNING 02000: No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table.
 ij> INSERT INTO STAFF11
         VALUES('E1','Thomas',0,'Deale');
-ERROR 23513: The check constraint 'STAFF11_GRADE_EMPNAME' was violated while performing an INSERT or UPDATE on table 'SUN.STAFF11'.
+ERROR 23513: The check constraint 'STAFF11_GRADE_EMPNAME' was violated while performing an INSERT or UPDATE on table '"SUN"."STAFF11"'.
 ij> -- PASS:0309 If ERROR, check constraint, 0 rows inserted?
 
   INSERT INTO STAFF11
         VALUES('E2','Tom',22,'Newyork');
-ERROR 23513: The check constraint 'STAFF11_GRADE_EMPNAME' was violated while performing an INSERT or UPDATE on table 'SUN.STAFF11'.
+ERROR 23513: The check constraint 'STAFF11_GRADE_EMPNAME' was violated while performing an INSERT or UPDATE on table '"SUN"."STAFF11"'.
 ij> -- PASS:0309 If ERROR, check constraint, 0 rows inserted?
 
   INSERT INTO STAFF11
@@ -72,12 +72,12 @@
 WARNING 02000: No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table.
 ij> INSERT INTO STAFF12
         VALUES('E1','Thomas',0,'Deale');
-ERROR 23513: The check constraint 'STAFF12_GRADE_EMPNAME' was violated while performing an INSERT or UPDATE on table 'SUN.STAFF12'.
+ERROR 23513: The check constraint 'STAFF12_GRADE_EMPNAME' was violated while performing an INSERT or UPDATE on table '"SUN"."STAFF12"'.
 ij> -- PASS:0310 If ERROR, check constraint, 0 rows inserted?
 
   INSERT INTO STAFF12
         VALUES('E2','Tom',22,'Newyork');
-ERROR 23513: The check constraint 'STAFF12_GRADE_EMPNAME' was violated while performing an INSERT or UPDATE on table 'SUN.STAFF12'.
+ERROR 23513: The check constraint 'STAFF12_GRADE_EMPNAME' was violated while performing an INSERT or UPDATE on table '"SUN"."STAFF12"'.
 ij> -- PASS:0310 If ERROR, check constraint, 0 rows inserted?
 
   INSERT INTO STAFF12

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr005.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr005.out?rev=570285&r1=570284&r2=570285&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr005.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr005.out Mon Aug 27 17:54:32 2007
@@ -44,7 +44,7 @@
 1 row inserted/updated/deleted
 ij> UPDATE STAFF5
         SET GRADE = 20;
-ERROR 23513: The check constraint 'STAFF5_GRADE' was violated while performing an INSERT or UPDATE on table 'SUN.STAFF5'.
+ERROR 23513: The check constraint 'STAFF5_GRADE' was violated while performing an INSERT or UPDATE on table '"SUN"."STAFF5"'.
 ij> -- PASS:0313 If ERROR, check constraint, 0 rows updated?
 
   SELECT COUNT(*) FROM STAFF5
@@ -71,7 +71,7 @@
 1 row inserted/updated/deleted
 ij> UPDATE STAFF6
         SET GRADE = 20;
-ERROR 23513: The check constraint 'STAFF6_GRADE' was violated while performing an INSERT or UPDATE on table 'SUN.STAFF6'.
+ERROR 23513: The check constraint 'STAFF6_GRADE' was violated while performing an INSERT or UPDATE on table '"SUN"."STAFF6"'.
 ij> -- PASS:0314 If ERROR, check constraint, 0 rows updated?
 
   SELECT COUNT(*) FROM STAFF6
@@ -97,7 +97,7 @@
 1 row inserted/updated/deleted
 ij> UPDATE STAFF7
         SET GRADE = 21;
-ERROR 23513: The check constraint 'STAFF7_GRADE' was violated while performing an INSERT or UPDATE on table 'SUN.STAFF7'.
+ERROR 23513: The check constraint 'STAFF7_GRADE' was violated while performing an INSERT or UPDATE on table '"SUN"."STAFF7"'.
 ij> -- PASS:0315 If ERROR, check constraint, 0 rows updated?
 
   SELECT COUNT(*) FROM STAFF7

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr006.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr006.out?rev=570285&r1=570284&r2=570285&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr006.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr006.out Mon Aug 27 17:54:32 2007
@@ -44,7 +44,7 @@
 ij> UPDATE STAFF8
         SET EMPNAME = NULL
         WHERE EMPNUM = 'E1';
-ERROR 23513: The check constraint 'STAFF8_EMPNAME' was violated while performing an INSERT or UPDATE on table 'SUN.STAFF8'.
+ERROR 23513: The check constraint 'STAFF8_EMPNAME' was violated while performing an INSERT or UPDATE on table '"SUN"."STAFF8"'.
 ij> -- PASS:0316 If ERROR, check constraint, 0 rows updated?
 
   SELECT COUNT(*) FROM STAFF8
@@ -71,7 +71,7 @@
 ij> UPDATE STAFF13
         SET EMPNAME = NULL
         WHERE EMPNUM = 'E1';
-ERROR 23513: The check constraint 'STAFF13_EMPNAME' was violated while performing an INSERT or UPDATE on table 'SUN.STAFF13'.
+ERROR 23513: The check constraint 'STAFF13_EMPNAME' was violated while performing an INSERT or UPDATE on table '"SUN"."STAFF13"'.
 ij> -- PASS:0317 If ERROR, check constraint, 0 rows updated?
 
   SELECT COUNT(*)
@@ -100,7 +100,7 @@
 ij> UPDATE STAFF9
         SET EMPNAME = 'Thomas'
         WHERE EMPNUM = 'E3';
-ERROR 23513: The check constraint 'STAFF9_EMPNAME' was violated while performing an INSERT or UPDATE on table 'SUN.STAFF9'.
+ERROR 23513: The check constraint 'STAFF9_EMPNAME' was violated while performing an INSERT or UPDATE on table '"SUN"."STAFF9"'.
 ij> -- PASS:0318 If ERROR, check constraint, 0 rows updated?
 
   SELECT COUNT(*)

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr007.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr007.out?rev=570285&r1=570284&r2=570285&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr007.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr007.out Mon Aug 27 17:54:32 2007
@@ -45,7 +45,7 @@
 ij> UPDATE STAFF10
         SET GRADE = 5
         WHERE EMPNUM = 'E3';
-ERROR 23513: The check constraint 'STAFF10_GRADE' was violated while performing an INSERT or UPDATE on table 'SUN.STAFF10'.
+ERROR 23513: The check constraint 'STAFF10_GRADE' was violated while performing an INSERT or UPDATE on table '"SUN"."STAFF10"'.
 ij> -- PASS:0319 If ERROR, check constraint, 0 rows updated?
 
   SELECT COUNT(*) FROM STAFF10
@@ -72,13 +72,13 @@
 ij> UPDATE STAFF11
         SET GRADE = 5
         WHERE EMPNUM = 'E3';
-ERROR 23513: The check constraint 'STAFF11_GRADE_EMPNAME' was violated while performing an INSERT or UPDATE on table 'SUN.STAFF11'.
+ERROR 23513: The check constraint 'STAFF11_GRADE_EMPNAME' was violated while performing an INSERT or UPDATE on table '"SUN"."STAFF11"'.
 ij> -- PASS:0320 If ERROR, check constraint, 0 rows updated?
 
   UPDATE STAFF11
         SET EMPNAME = 'Tom'
         WHERE EMPNUM = 'E3';
-ERROR 23513: The check constraint 'STAFF11_GRADE_EMPNAME' was violated while performing an INSERT or UPDATE on table 'SUN.STAFF11'.
+ERROR 23513: The check constraint 'STAFF11_GRADE_EMPNAME' was violated while performing an INSERT or UPDATE on table '"SUN"."STAFF11"'.
 ij> -- PASS:0320 If ERROR, check constraint, 0 rows updated?
 
   SELECT COUNT(*) FROM STAFF11
@@ -104,7 +104,7 @@
 ij> UPDATE STAFF12
         SET GRADE = 5
         WHERE EMPNUM = 'E3';
-ERROR 23513: The check constraint 'STAFF12_GRADE_EMPNAME' was violated while performing an INSERT or UPDATE on table 'SUN.STAFF12'.
+ERROR 23513: The check constraint 'STAFF12_GRADE_EMPNAME' was violated while performing an INSERT or UPDATE on table '"SUN"."STAFF12"'.
 ij> -- PASS:0321 If ERROR, check constraint, 0 rows updated?
 
   SELECT COUNT(*) FROM STAFF12

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr027.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr027.out?rev=570285&r1=570284&r2=570285&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr027.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr027.out Mon Aug 27 17:54:32 2007
@@ -168,7 +168,7 @@
 1 row inserted/updated/deleted
 ij> INSERT INTO STAFF9(EMPNUM,EMPNAME)
        VALUES('Z1','Tina');
-ERROR 23513: The check constraint 'STAFF9_EMPNAME' was violated while performing an INSERT or UPDATE on table 'SUN.STAFF9'.
+ERROR 23513: The check constraint 'STAFF9_EMPNAME' was violated while performing an INSERT or UPDATE on table '"SUN"."STAFF9"'.
 ij> -- PASS:0449 If ERROR, check constraint, 0 rows inserted?
 
    INSERT INTO STAFF9(EMPNUM,EMPNAME)

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr030.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr030.out?rev=570285&r1=570284&r2=570285&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr030.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/cdr030.out Mon Aug 27 17:54:32 2007
@@ -113,7 +113,7 @@
    UPDATE STAFF11
          SET GRADE = 5
          WHERE EMPNUM = 'E3';
-ERROR 23513: The check constraint 'STAFF11_GRADE_EMPNAME' was violated while performing an INSERT or UPDATE on table 'SUN.STAFF11'.
+ERROR 23513: The check constraint 'STAFF11_GRADE_EMPNAME' was violated while performing an INSERT or UPDATE on table '"SUN"."STAFF11"'.
 ij> -- PASS:0516 If ERROR, integrity constraint violation, 0 rows updated?
 -- PASS:0516 OR ERROR, check constraint, 0 rows updated?
 -- PASS:0516 OR SQLSTATE = 23502 OR SQLCODE < 0?
@@ -122,7 +122,7 @@
    UPDATE STAFF11
          SET EMPNAME = 'Tom'
          WHERE EMPNUM = 'E3';
-ERROR 23513: The check constraint 'STAFF11_GRADE_EMPNAME' was violated while performing an INSERT or UPDATE on table 'SUN.STAFF11'.
+ERROR 23513: The check constraint 'STAFF11_GRADE_EMPNAME' was violated while performing an INSERT or UPDATE on table '"SUN"."STAFF11"'.
 ij> -- PASS:0516 If ERROR, integrity constraint violation, 0 rows updated?
 -- PASS:0516 OR ERROR, check constraint, 0 rows updated?
 -- PASS:0516 OR SQLSTATE = 23502 OR SQLCODE < 0?

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkConstraint.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkConstraint.out?rev=570285&r1=570284&r2=570285&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkConstraint.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/checkConstraint.out Mon Aug 27 17:54:32 2007
@@ -60,13 +60,13 @@
 0 rows inserted/updated/deleted
 ij> -- verify both constraints are enforced
 insert into pos1 values 0;
-ERROR 23513: The check constraint 'xxxxGENERATED-IDxxxx' was violated while performing an INSERT or UPDATE on table 'APP.POS1'.
+ERROR 23513: The check constraint 'xxxxGENERATED-IDxxxx' was violated while performing an INSERT or UPDATE on table '"APP"."POS1"'.
 ij> insert into pos1 values 1;
 1 row inserted/updated/deleted
 ij> insert into pos1 values 9;
 1 row inserted/updated/deleted
 ij> insert into pos1 values 10;
-ERROR 23513: The check constraint 'ASDF' was violated while performing an INSERT or UPDATE on table 'APP.POS1'.
+ERROR 23513: The check constraint 'ASDF' was violated while performing an INSERT or UPDATE on table '"APP"."POS1"'.
 ij> select * from pos1;
 C1         
 -----------
@@ -74,14 +74,14 @@
 9          
 ij> -- verify constraint violation rolls back entire statement
 update pos1 set c1 = c1 + 1;
-ERROR 23513: The check constraint 'ASDF' was violated while performing an INSERT or UPDATE on table 'APP.POS1'.
+ERROR 23513: The check constraint 'ASDF' was violated while performing an INSERT or UPDATE on table '"APP"."POS1"'.
 ij> select * from pos1;
 C1         
 -----------
 1          
 9          
 ij> update pos1 set c1 = c1 - 1;
-ERROR 23513: The check constraint 'xxxxGENERATED-IDxxxx' was violated while performing an INSERT or UPDATE on table 'APP.POS1'.
+ERROR 23513: The check constraint 'xxxxGENERATED-IDxxxx' was violated while performing an INSERT or UPDATE on table '"APP"."POS1"'.
 ij> select * from pos1;
 C1         
 -----------
@@ -93,13 +93,13 @@
 0 rows inserted/updated/deleted
 ij> -- constraint ck1st fails
 insert into negcks values (1, 3, 3);
-ERROR 23513: The check constraint 'CK1ST' was violated while performing an INSERT or UPDATE on table 'APP.NEGCKS'.
+ERROR 23513: The check constraint 'CK1ST' was violated while performing an INSERT or UPDATE on table '"APP"."NEGCKS"'.
 ij> -- constraint ckLast fails (ck2nd fails too)
 insert into negcks values (5, 1, 3);
-ERROR 23513: The check constraint 'CKLAST' was violated while performing an INSERT or UPDATE on table 'APP.NEGCKS'.
+ERROR 23513: The check constraint 'CKLAST' was violated while performing an INSERT or UPDATE on table '"APP"."NEGCKS"'.
 ij> -- constraint ck1st fails (ckLast fails too)
 insert into negcks values (2, 3, 3);
-ERROR 23513: The check constraint 'CK1ST' was violated while performing an INSERT or UPDATE on table 'APP.NEGCKS'.
+ERROR 23513: The check constraint 'CK1ST' was violated while performing an INSERT or UPDATE on table '"APP"."NEGCKS"'.
 ij> rollback;
 ij> -- same source and target tables
 create table pos1(c1 int, c2 int, constraint ck1 check (c1 < c2));
@@ -129,14 +129,14 @@
 ij> rollback;
 ij> -- these should fail
 insert into pos1 select c2, c1 from pos1;
-ERROR 23513: The check constraint 'CK1' was violated while performing an INSERT or UPDATE on table 'APP.POS1'.
+ERROR 23513: The check constraint 'CK1' was violated while performing an INSERT or UPDATE on table '"APP"."POS1"'.
 ij> select count(*) from pos1;
 1          
 -----------
 3          
 ij> update pos1 set c2 = (select min(c1) from pos1),
 				c1 = (select max(c2) from pos1);
-ERROR 23513: The check constraint 'CK1' was violated while performing an INSERT or UPDATE on table 'APP.POS1'.
+ERROR 23513: The check constraint 'CK1' was violated while performing an INSERT or UPDATE on table '"APP"."POS1"'.
 ij> select * from pos1;
 C1         |C2         
 -----------------------
@@ -150,7 +150,7 @@
 create table t1(c1 int, c2 int, constraint ck1 check(c1 = c2));
 0 rows inserted/updated/deleted
 ij> insert into t1 values (1, 1), (2, 1);
-ERROR 23513: The check constraint 'CK1' was violated while performing an INSERT or UPDATE on table 'APP.T1'.
+ERROR 23513: The check constraint 'CK1' was violated while performing an INSERT or UPDATE on table '"APP"."T1"'.
 ij> select * from t1;
 C1         |C2         
 -----------------------
@@ -158,7 +158,7 @@
 insert into t1 values (1.0, 1);
 1 row inserted/updated/deleted
 ij> insert into t1 values (2.0, 1);
-ERROR 23513: The check constraint 'CK1' was violated while performing an INSERT or UPDATE on table 'APP.T1'.
+ERROR 23513: The check constraint 'CK1' was violated while performing an INSERT or UPDATE on table '"APP"."T1"'.
 ij> select * from t1;
 C1         |C2         
 -----------------------
@@ -166,7 +166,7 @@
 ij> update t1 set c2 = 1.0;
 1 row inserted/updated/deleted
 ij> update t1 set c2 = 2.0;
-ERROR 23513: The check constraint 'CK1' was violated while performing an INSERT or UPDATE on table 'APP.T1'.
+ERROR 23513: The check constraint 'CK1' was violated while performing an INSERT or UPDATE on table '"APP"."T1"'.
 ij> select * from t1;
 C1         |C2         
 -----------------------
@@ -195,7 +195,7 @@
 1 row inserted/updated/deleted
 ij> -- this update should fail
 update t1 set c1 = c1 + 1 where current of c1;
-ERROR 23513: The check constraint 'CK2' was violated while performing an INSERT or UPDATE on table 'APP.T1'.
+ERROR 23513: The check constraint 'CK2' was violated while performing an INSERT or UPDATE on table '"APP"."T1"'.
 ij> close c1;
 ij> get cursor c2 as 'select * from t1 where c1 = 2 for update of c2';
 ij> next c2;
@@ -207,7 +207,7 @@
 1 row inserted/updated/deleted
 ij> -- this update should fail
 update t1 set c2 = c2 + 1 where current of c2;
-ERROR 23513: The check constraint 'CK2' was violated while performing an INSERT or UPDATE on table 'APP.T1'.
+ERROR 23513: The check constraint 'CK2' was violated while performing an INSERT or UPDATE on table '"APP"."T1"'.
 ij> close c2;
 ij> get cursor c3 as 'select * from t1 where c1 = 2 for update of c1, c2';
 ij> next c3;
@@ -219,7 +219,7 @@
 1 row inserted/updated/deleted
 ij> -- this update should fail
 update t1 set c2 = c2 + 1, c1 = c1 + 3 where current of c3;
-ERROR 23513: The check constraint 'CK2' was violated while performing an INSERT or UPDATE on table 'APP.T1'.
+ERROR 23513: The check constraint 'CK2' was violated while performing an INSERT or UPDATE on table '"APP"."T1"'.
 ij> -- this update should succeed
 update t1 set c2 = c1 + 3, c1 = c2 + 3 where current of c3;
 1 row inserted/updated/deleted
@@ -248,7 +248,7 @@
 2 rows inserted/updated/deleted
 ij> -- this update should fail
 update t1 set c1 = c2;
-ERROR 23513: The check constraint 'xxxxGENERATED-IDxxxx' was violated while performing an INSERT or UPDATE on table 'APP.T1'.
+ERROR 23513: The check constraint 'xxxxGENERATED-IDxxxx' was violated while performing an INSERT or UPDATE on table '"APP"."T1"'.
 ij> select * from t1;
 C1         |C2         
 -----------------------
@@ -270,14 +270,14 @@
 1 row inserted/updated/deleted
 ij> -- this insert should fail, does not satisfy check constraint
 insert into intTab values 2;
-ERROR 23513: The check constraint 'xxxxGENERATED-IDxxxx' was violated while performing an INSERT or UPDATE on table 'APP.INTTAB'.
+ERROR 23513: The check constraint 'xxxxGENERATED-IDxxxx' was violated while performing an INSERT or UPDATE on table '"APP"."INTTAB"'.
 ij> create table maxIntTab (c1 int check(INT(2147483647) > c1));
 0 rows inserted/updated/deleted
 ij> insert into maxIntTab values 1;
 1 row inserted/updated/deleted
 ij> -- this insert should fail, does not satisfy check constraint
 insert into maxIntTab values 2147483647;
-ERROR 23513: The check constraint 'xxxxGENERATED-IDxxxx' was violated while performing an INSERT or UPDATE on table 'APP.MAXINTTAB'.
+ERROR 23513: The check constraint 'xxxxGENERATED-IDxxxx' was violated while performing an INSERT or UPDATE on table '"APP"."MAXINTTAB"'.
 ij> rollback;
 ij> -- verify that inserts, updates and statements with forced constraints are
 -- indeed dependent on the constraints
@@ -391,4 +391,15 @@
 CONSTRAINTNAME                                                                                                                  |&
 ----------------------------------------------------------------------------------------------------------------------------------
 xxxxGENERATED-IDxxxx                                                                                                              |P
+ij> -- DERBY-2989
+CREATE TABLE "indicator" (c CHAR(1) DEFAULT 'N');
+0 rows inserted/updated/deleted
+ij> ALTER TABLE  "indicator" ADD CONSTRAINT my_constraint CHECK ((c IN ('Y','N')));
+0 rows inserted/updated/deleted
+ij> INSERT INTO  "indicator" VALUES ('N');
+1 row inserted/updated/deleted
+ij> ALTER TABLE  "indicator" DROP CONSTRAINT my_constraint;
+0 rows inserted/updated/deleted
+ij> DROP TABLE   "indicator";
+0 rows inserted/updated/deleted
 ij> 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/columnDefaults.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/columnDefaults.out?rev=570285&r1=570284&r2=570285&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/columnDefaults.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/columnDefaults.out Mon Aug 27 17:54:32 2007
@@ -69,7 +69,7 @@
 create table neg(c1 int default 10);
 0 rows inserted/updated/deleted
 ij> insert into neg values (1, default);
-ERROR 42X06: Too many result columns specified for table 'APP.NEG'.
+ERROR 42X06: Too many result columns specified for table '"APP"."NEG"'.
 ij> insert into neg values (default, 1);
 ERROR 42802: The number of values assigned is not the same as the number of specified or implied columns.
 ij> drop table neg;

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/db2Compatibility.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/db2Compatibility.out?rev=570285&r1=570284&r2=570285&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/db2Compatibility.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/db2Compatibility.out Mon Aug 27 17:54:32 2007
@@ -732,7 +732,7 @@
 ij> insert into testconst1( col1, col2) values( 'a', 2);
 ERROR 23505: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'xxxxGENERATED-IDxxxx' defined on 'TESTCONST1'.
 ij> insert into testconst1( col1, col2) values( 'b', 0);
-ERROR 23513: The check constraint 'CC' was violated while performing an INSERT or UPDATE on table 'APP.TESTCONST1'.
+ERROR 23513: The check constraint 'CC' was violated while performing an INSERT or UPDATE on table '"APP"."TESTCONST1"'.
 ij> insert into testconst2( col1, col2, col3) values( 'a', 'a', 1);
 1 row inserted/updated/deleted
 ij> insert into testconst2( col1, col2, col3) values( 'z', 'b', 1);
@@ -769,13 +769,13 @@
 ij> insert into testconst2( col1, col2, col3) values( 'a', 'a', 1);
 1 row inserted/updated/deleted
 ij> ALTER TABLE testconst2 DROP FOREIGN KEY noSuchConstraint;
-ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.NOSUCHCONSTRAINT' on table 'APP.TESTCONST2'. 
+ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.NOSUCHCONSTRAINT' on table '"APP"."TESTCONST2"'. 
 ij> ALTER TABLE testconst2 DROP CHECK noSuchConstraint;
-ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.NOSUCHCONSTRAINT' on table 'APP.TESTCONST2'. 
+ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.NOSUCHCONSTRAINT' on table '"APP"."TESTCONST2"'. 
 ij> ALTER TABLE testconst2 DROP UNIQUE noSuchConstraint;
-ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.NOSUCHCONSTRAINT' on table 'APP.TESTCONST2'. 
+ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.NOSUCHCONSTRAINT' on table '"APP"."TESTCONST2"'. 
 ij> ALTER TABLE testconst1 DROP PRIMARY KEY;
-ERROR 42X86: ALTER TABLE failed. There is no constraint 'PRIMARY KEY' on table 'APP.TESTCONST1'. 
+ERROR 42X86: ALTER TABLE failed. There is no constraint 'PRIMARY KEY' on table '"APP"."TESTCONST1"'. 
 ij> -- clean up
 DROP TABLE testconst1;
 0 rows inserted/updated/deleted

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dml108.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dml108.out?rev=570285&r1=570284&r2=570285&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dml108.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dml108.out Mon Aug 27 17:54:32 2007
@@ -204,7 +204,7 @@
    ROLLBACK WORK;
 ij> --0   DROP TABLE TEMPS CASCADE;
    DROP TABLE SUBQ1 ;
-ERROR 42Y62: 'DROP TABLE' is not allowed on 'FLATER.SUBQ1' because it is a view.
+ERROR 42Y62: 'DROP TABLE' is not allowed on '"FLATER"."SUBQ1"' because it is a view.
 ij> DROP TABLE TEMPS ;
 ERROR X0Y23: Operation 'DROP TABLE' cannot be performed on object 'TEMPS' because VIEW 'SUBQ1' is dependent on that object.
 ij> -- PASS:0617 If table and view are dropped?

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/fk_nonSPS.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/fk_nonSPS.out?rev=570285&r1=570284&r2=570285&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/fk_nonSPS.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/fk_nonSPS.out Mon Aug 27 17:54:32 2007
@@ -192,13 +192,13 @@
 ERROR X0Y46: Constraint 'FK' is invalid: referenced table NOTTHERE does not exist.
 ij> -- negative: fk table, bad column
 create table f (x int, constraint fk foreign key (x) references p1(notthere));
-ERROR X0Y44: Constraint 'FK' is invalid: there is no unique or primary key constraint on table 'APP.P1' that matches the number and types of the columns in the foreign key.
+ERROR X0Y44: Constraint 'FK' is invalid: there is no unique or primary key constraint on table '"APP"."P1"' that matches the number and types of the columns in the foreign key.
 ij> -- negative: fk table, no constraint
 create table f (x int, constraint fk foreign key (x) references p2(y));
-ERROR X0Y44: Constraint 'FK' is invalid: there is no unique or primary key constraint on table 'APP.P2' that matches the number and types of the columns in the foreign key.
+ERROR X0Y44: Constraint 'FK' is invalid: there is no unique or primary key constraint on table '"APP"."P2"' that matches the number and types of the columns in the foreign key.
 ij> -- negative: fk table, wrong type
 create table f (x smallint, constraint fk foreign key (x) references p1(x));
-ERROR X0Y44: Constraint 'FK' is invalid: there is no unique or primary key constraint on table 'APP.P1' that matches the number and types of the columns in the foreign key.
+ERROR X0Y44: Constraint 'FK' is invalid: there is no unique or primary key constraint on table '"APP"."P1"' that matches the number and types of the columns in the foreign key.
 ij> -- negative: cannot reference a system table
 create table f (x char(36), constraint fk foreign key (x) references sys.sysforeignkeys(constraintid));
 ERROR 42Y08: Foreign key constraints are not allowed on system tables.
@@ -210,9 +210,9 @@
 ERROR 42X93: Table 'F' contains a constraint definition with column 'Z' which is not in the table.
 ij> -- negative: wrong number of columns
 create table f (x dec(5,2), y int, constraint fk foreign key (x) references p2(x,y));
-ERROR X0Y44: Constraint 'FK' is invalid: there is no unique or primary key constraint on table 'APP.P2' that matches the number and types of the columns in the foreign key.
+ERROR X0Y44: Constraint 'FK' is invalid: there is no unique or primary key constraint on table '"APP"."P2"' that matches the number and types of the columns in the foreign key.
 ij> create table f (x dec(5,2), y int, constraint fk foreign key (x,y) references p2(x));
-ERROR X0Y44: Constraint 'FK' is invalid: there is no unique or primary key constraint on table 'APP.P2' that matches the number and types of the columns in the foreign key.
+ERROR X0Y44: Constraint 'FK' is invalid: there is no unique or primary key constraint on table '"APP"."P2"' that matches the number and types of the columns in the foreign key.
 ij> -- 
 -- Negative test cases for foreign key COLUMN
 -- constraints
@@ -222,13 +222,13 @@
 ERROR X0Y46: Constraint 'xxxxGENERATED-IDxxxx' is invalid: referenced table NOTTHERE does not exist.
 ij> -- negative: fk column, bad column
 create table f (x int references p1(notthere));
-ERROR X0Y44: Constraint 'xxxxGENERATED-IDxxxx' is invalid: there is no unique or primary key constraint on table 'APP.P1' that matches the number and types of the columns in the foreign key.
+ERROR X0Y44: Constraint 'xxxxGENERATED-IDxxxx' is invalid: there is no unique or primary key constraint on table '"APP"."P1"' that matches the number and types of the columns in the foreign key.
 ij> -- negative: fk column, no constraint
 create table f (x int references p2(y));
-ERROR X0Y44: Constraint 'xxxxGENERATED-IDxxxx' is invalid: there is no unique or primary key constraint on table 'APP.P2' that matches the number and types of the columns in the foreign key.
+ERROR X0Y44: Constraint 'xxxxGENERATED-IDxxxx' is invalid: there is no unique or primary key constraint on table '"APP"."P2"' that matches the number and types of the columns in the foreign key.
 ij> -- negative: fk column, wrong type
 create table f (x smallint references p1(x));
-ERROR X0Y44: Constraint 'xxxxGENERATED-IDxxxx' is invalid: there is no unique or primary key constraint on table 'APP.P1' that matches the number and types of the columns in the foreign key.
+ERROR X0Y44: Constraint 'xxxxGENERATED-IDxxxx' is invalid: there is no unique or primary key constraint on table '"APP"."P1"' that matches the number and types of the columns in the foreign key.
 ij> -- negative: cannot reference a system table
 create table f (x char(36) references sys.sysforeignkeys(constraintid));
 ERROR 42Y08: Foreign key constraints are not allowed on system tables.
@@ -271,20 +271,20 @@
 0 rows inserted/updated/deleted
 ij> -- type mismatch
 create table f (i int, d dec(5,1), constraint fk foreign key (i,d) references p2(x,y));
-ERROR X0Y44: Constraint 'FK' is invalid: there is no unique or primary key constraint on table 'APP.P2' that matches the number and types of the columns in the foreign key.
+ERROR X0Y44: Constraint 'FK' is invalid: there is no unique or primary key constraint on table '"APP"."P2"' that matches the number and types of the columns in the foreign key.
 ij> create table f (i int, d dec(4,2), constraint fk foreign key (i,d) references p2(x,y));
-ERROR X0Y44: Constraint 'FK' is invalid: there is no unique or primary key constraint on table 'APP.P2' that matches the number and types of the columns in the foreign key.
+ERROR X0Y44: Constraint 'FK' is invalid: there is no unique or primary key constraint on table '"APP"."P2"' that matches the number and types of the columns in the foreign key.
 ij> create table f (i int, d dec(4,2), constraint fk foreign key (i,d) references p2(x,y));
-ERROR X0Y44: Constraint 'FK' is invalid: there is no unique or primary key constraint on table 'APP.P2' that matches the number and types of the columns in the foreign key.
+ERROR X0Y44: Constraint 'FK' is invalid: there is no unique or primary key constraint on table '"APP"."P2"' that matches the number and types of the columns in the foreign key.
 ij> create table f (i int, d numeric(5,2), constraint fk foreign key (i,d) references p2(x,y));
-ERROR X0Y44: Constraint 'FK' is invalid: there is no unique or primary key constraint on table 'APP.P2' that matches the number and types of the columns in the foreign key.
+ERROR X0Y44: Constraint 'FK' is invalid: there is no unique or primary key constraint on table '"APP"."P2"' that matches the number and types of the columns in the foreign key.
 ij> create table f (c char(11) references p3(x));
-ERROR X0Y44: Constraint 'xxxxGENERATED-IDxxxx' is invalid: there is no unique or primary key constraint on table 'APP.P3' that matches the number and types of the columns in the foreign key.
+ERROR X0Y44: Constraint 'xxxxGENERATED-IDxxxx' is invalid: there is no unique or primary key constraint on table '"APP"."P3"' that matches the number and types of the columns in the foreign key.
 ij> create table f (c varchar(10) references p3(x));
-ERROR X0Y44: Constraint 'xxxxGENERATED-IDxxxx' is invalid: there is no unique or primary key constraint on table 'APP.P3' that matches the number and types of the columns in the foreign key.
+ERROR X0Y44: Constraint 'xxxxGENERATED-IDxxxx' is invalid: there is no unique or primary key constraint on table '"APP"."P3"' that matches the number and types of the columns in the foreign key.
 ij> -- wrong order
 create table f (d dec(5,2), i int, constraint fk foreign key (d,i) references p2(x,y));
-ERROR X0Y44: Constraint 'FK' is invalid: there is no unique or primary key constraint on table 'APP.P2' that matches the number and types of the columns in the foreign key.
+ERROR X0Y44: Constraint 'FK' is invalid: there is no unique or primary key constraint on table '"APP"."P2"' that matches the number and types of the columns in the foreign key.
 ij> -- check system tables 
 create table f (x int, constraint fk foreign key (x) references p1);
 0 rows inserted/updated/deleted
@@ -355,7 +355,7 @@
 0 rows inserted/updated/deleted
 ij> -- we shouldn't be able to add an fk on p1 now
 alter table f add constraint fk foreign key (x) references p1;
-ERROR X0Y41: Constraint 'FK' is invalid because the referenced table APP.P1 has no primary key.  Either add a primary key to APP.P1 or explicitly specify the columns of a unique constraint that this foreign key references. 
+ERROR X0Y41: Constraint 'FK' is invalid because the referenced table "APP"."P1" has no primary key.  Either add a primary key to "APP"."P1" or explicitly specify the columns of a unique constraint that this foreign key references. 
 ij> -- add the constraint and try again
 alter table p1 add constraint pk1 primary key (x);
 0 rows inserted/updated/deleted

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/refActions2.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/refActions2.out?rev=570285&r1=570284&r2=570285&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/refActions2.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/refActions2.out Mon Aug 27 17:54:32 2007
@@ -804,7 +804,7 @@
 ij> alter table t3 drop constraint c2;
 0 rows inserted/updated/deleted
 ij> alter table t3 drop constraint c3;
-ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.C3' on table 'APP.T3'. 
+ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.C3' on table '"APP"."T3"'. 
 ij> -- c3 fails; sql0632N - 3 
 alter table t2 add constraint c1 foreign key (x) 
                              references t1(a) on delete CASCADE;
@@ -820,7 +820,7 @@
 ij> alter table t3 drop constraint c2;
 0 rows inserted/updated/deleted
 ij> alter table t3 drop constraint c3;
-ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.C3' on table 'APP.T3'. 
+ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.C3' on table '"APP"."T3"'. 
 ij> -- passes
 alter table t2 add constraint c1 foreign key (x) 
                              references t1(a) on delete set null;
@@ -900,7 +900,7 @@
 ij> alter table t3 drop constraint c2;
 0 rows inserted/updated/deleted
 ij> alter table t3 drop constraint c3;
-ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.C3' on table 'APP.T3'. 
+ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.C3' on table '"APP"."T3"'. 
 ij> drop table t1;
 0 rows inserted/updated/deleted
 ij> drop table t2;
@@ -932,7 +932,7 @@
 ij> alter table t1 drop constraint c1;
 0 rows inserted/updated/deleted
 ij> alter table t2 drop constraint c2;
-ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.C2' on table 'APP.T2'. 
+ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.C2' on table '"APP"."T2"'. 
 ij> --c2 fails - sql0632N - reason code 2
 alter table t1 add constraint c1 foreign key (b)
                              references t2(x) on delete cascade;
@@ -943,7 +943,7 @@
 ij> alter table t1 drop constraint c1;
 0 rows inserted/updated/deleted
 ij> alter table t2 drop constraint c2;
-ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.C2' on table 'APP.T2'. 
+ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.C2' on table '"APP"."T2"'. 
 ij> --c1 fails - sql0634N - reason code 2
 alter table t2 add constraint c2 foreign key (y)
                               references t1(b) on delete set null;
@@ -952,7 +952,7 @@
                              references t2(x) on delete cascade;
 ERROR 42915: Foreign  Key 'C1' is invalid because 'The delete rule of foreign key cannot be CASCADE. (The relationship would form a cycle that would cause a table to be delete-connected to itself. One of the existing delete rules in the cycle is not CASCADE, so this relationship may be definable if the delete rule is not CASCADE.) '. 
 ij> alter table t1 drop constraint c1;
-ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.C1' on table 'APP.T1'. 
+ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.C1' on table '"APP"."T1"'. 
 ij> alter table t2 drop constraint c2;
 0 rows inserted/updated/deleted
 ij> -- c1 fails : column b can not contain null values
@@ -1045,7 +1045,7 @@
 ij> alter table t2 drop constraint c2;
 0 rows inserted/updated/deleted
 ij> alter table t3 drop constraint c3;
-ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.C3' on table 'APP.T3'. 
+ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.C3' on table '"APP"."T3"'. 
 ij> --c3 should fail SQL0634N - 2 -- PROBLEMATIC CASE
 -- DELETE CONNECTED CYCLE
 alter table t1 add constraint c1 foreign key (b)
@@ -1062,7 +1062,7 @@
 ij> alter table t2 drop constraint c2;
 0 rows inserted/updated/deleted
 ij> alter table t3 drop constraint c3;
-ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.C3' on table 'APP.T3'. 
+ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.C3' on table '"APP"."T3"'. 
 ij> --c3 should fail - SQL0634N - 2
 --DELETE CONNECTED CYCLE
 alter table t1 add constraint c1 foreign key (b)
@@ -1079,7 +1079,7 @@
 ij> alter table t2 drop constraint c2;
 0 rows inserted/updated/deleted
 ij> alter table t3 drop constraint c3;
-ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.C3' on table 'APP.T3'. 
+ERROR 42X86: ALTER TABLE failed. There is no constraint 'APP.C3' on table '"APP"."T3"'. 
 ij> -- passes
 alter table t1 add constraint c1 foreign key (b)
                               references t3(m) on delete set null;

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/schemas.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/schemas.out?rev=570285&r1=570284&r2=570285&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/schemas.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/schemas.out Mon Aug 27 17:54:32 2007
@@ -410,7 +410,7 @@
 ij> create table sampletab (c1 int constraint st_c1 check (c1 > 1), c2 char(20));
 0 rows inserted/updated/deleted
 ij> insert into sampletab values (1,'in schema: TEST');
-ERROR 23513: The check constraint 'ST_C1' was violated while performing an INSERT or UPDATE on table 'TEST.SAMPLETAB'.
+ERROR 23513: The check constraint 'ST_C1' was violated while performing an INSERT or UPDATE on table '"TEST"."SAMPLETAB"'.
 ij> insert into sampletab values (2,'in schema: TEST');
 1 row inserted/updated/deleted
 ij> -- verify it

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/triggerGeneral.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/triggerGeneral.out?rev=570285&r1=570284&r2=570285&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/triggerGeneral.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/triggerGeneral.out Mon Aug 27 17:54:32 2007
@@ -64,7 +64,7 @@
 ERROR 42X62: 'CREATE TRIGGER' is not allowed in the 'SYS' schema.
 ij> -- not on table in sys schema
 create trigger tr NO CASCADE before insert on sys.systables for each row values 1;
-ERROR X0Y56: 'CREATE TRIGGER' is not allowed on the System table 'SYS.SYSTABLES'.
+ERROR X0Y56: 'CREATE TRIGGER' is not allowed on the System table '"SYS"."SYSTABLES"'.
 ij> -- duplicate columns, not allowed
 create trigger tr NO CASCADE before update of x, x on x for each row values 1;
 ERROR 42Y40: 'X' appears multiple times in the UPDATE OF column list for trigger 'TR'.
@@ -76,7 +76,7 @@
 ERROR 42X14: 'DOESNOTEXIST' is not a column in table or VTI 'X'.
 ij> -- not on view
 create trigger tr NO CASCADE before insert on v for each row values 1;
-ERROR 42Y62: 'CREATE TRIGGER' is not allowed on 'APP.V' because it is a view.
+ERROR 42Y62: 'CREATE TRIGGER' is not allowed on '"APP"."V"' because it is a view.
 ij> -- error to use table qualifier
 create trigger tr NO CASCADE before update of x.x on x for each row values 1;
 ERROR 42X01: Syntax error: Encountered "." at line 2, column 48.

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/views.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/views.out?rev=570285&r1=570284&r2=570285&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/views.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/views.out Mon Aug 27 17:54:32 2007
@@ -80,7 +80,7 @@
 ERROR X0Y16: 'T1' is not a view.  If it is a table, then use DROP TABLE instead.
 ij> -- drop table on view
 drop table sv1;
-ERROR 42Y62: 'DROP TABLE' is not allowed on 'APP.SV1' because it is a view.
+ERROR 42Y62: 'DROP TABLE' is not allowed on '"APP"."SV1"' because it is a view.
 ij> -- views and tables share same name space
 create view sv1(i) as values 1;
 ERROR X0Y32: Table/View 'SV1' already exists in Schema 'APP'.
@@ -148,7 +148,7 @@
 ERROR 42Y90: FOR UPDATE is not permitted in this type of statement.  
 ij> -- create index on a view
 create index i1 on sv2(i);
-ERROR 42Y62: 'CREATE INDEX' is not allowed on 'APP.SV2' because it is a view.
+ERROR 42Y62: 'CREATE INDEX' is not allowed on '"APP"."SV2"' because it is a view.
 ij> -- positive tests
 select * from sv1;
 S_WAS_I    |DP_WA&|I_WAS_F               |F_WAS_DP              

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/xts752.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/xts752.out?rev=570285&r1=570284&r2=570285&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/xts752.out (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/xts752.out Mon Aug 27 17:54:32 2007
@@ -76,7 +76,7 @@
 
    COMMIT WORK;
 ij> INSERT INTO TAB752a VALUES(1000,'KILLER','PAROS');
-ERROR 23513: The check constraint 'COL3_CHECK' was violated while performing an INSERT or UPDATE on table 'CTS1.TAB752A'.
+ERROR 23513: The check constraint 'COL3_CHECK' was violated while performing an INSERT or UPDATE on table '"CTS1"."TAB752A"'.
 ij> -- PASS:7052 If ERROR - integrity constraint violation?
 
    ROLLBACK WORK;

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/checkConstraint.sql
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/checkConstraint.sql?rev=570285&r1=570284&r2=570285&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/checkConstraint.sql (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/checkConstraint.sql Mon Aug 27 17:54:32 2007
@@ -235,3 +235,10 @@
 drop table t4;
 create table t4(c11 int not null, c12 int not null, primary key (c11, c12));
 select c.constraintname, c.type from sys.sysconstraints c, sys.systables t where c.tableid = t.tableid and tablename='T4';
+
+-- DERBY-2989
+CREATE TABLE "indicator" (c CHAR(1) DEFAULT 'N');
+ALTER TABLE  "indicator" ADD CONSTRAINT my_constraint CHECK ((c IN ('Y','N')));
+INSERT INTO  "indicator" VALUES ('N');
+ALTER TABLE  "indicator" DROP CONSTRAINT my_constraint;
+DROP TABLE   "indicator";



Mime
View raw message