Index: java/engine/org/apache/derby/iapi/types/TypeId.java =================================================================== --- java/engine/org/apache/derby/iapi/types/TypeId.java (revision 294902) +++ java/engine/org/apache/derby/iapi/types/TypeId.java (working copy) @@ -1245,6 +1245,7 @@ case StoredFormatIds.NATIONAL_LONGVARCHAR_TYPE_ID: case StoredFormatIds.LONGVARCHAR_TYPE_ID: case StoredFormatIds.XML_TYPE_ID: + case StoredFormatIds.LONGVARBIT_TYPE_ID: return false; case StoredFormatIds.USERDEFINED_TYPE_ID_V3: Index: java/testing/org/apache/derbyTesting/functionTests/master/groupBy.out =================================================================== --- java/testing/org/apache/derbyTesting/functionTests/master/groupBy.out (revision 294902) +++ java/testing/org/apache/derbyTesting/functionTests/master/groupBy.out (working copy) @@ -248,11 +248,7 @@ NULL ij> -- grouping by long varchar [for bit data] cols should fail in db2 mode select lbv from t group by lbv order by lbv; -LBV --------------------------------------------------------------------------------------------------------------------------------- -1234 -abcd -NULL +ERROR X0X67: Columns of type 'LONG VARCHAR FOR BIT DATA' may not be used in CREATE INDEX, ORDER BY, GROUP BY, UNION, INTERSECT, EXCEPT or DISTINCT statements because comparisons are not supported for that type. ij> -- multicolumn grouping select i, dt, b from t where 1=1 group by i, dt, b order by i,dt,b; I |DT |B Index: java/testing/org/apache/derbyTesting/functionTests/master/aggbuiltin.out =================================================================== --- java/testing/org/apache/derbyTesting/functionTests/master/aggbuiltin.out (revision 294902) +++ java/testing/org/apache/derbyTesting/functionTests/master/aggbuiltin.out (working copy) @@ -756,8 +756,7 @@ 1 ----------- ij> select count(lbv) from empty group by lbv; -1 ------------ +ERROR X0X67: Columns of type 'LONG VARCHAR FOR BIT DATA' may not be used in CREATE INDEX, ORDER BY, GROUP BY, UNION, INTERSECT, EXCEPT or DISTINCT statements because comparisons are not supported for that type. ij> select count(dc) from empty group by dc; 1 ----------- @@ -924,11 +923,7 @@ 0 WARNING 01003: Null values were eliminated from the argument of a column function. ij> select count(lbv) from t group by lbv; -1 ------------ -15 -0 -WARNING 01003: Null values were eliminated from the argument of a column function. +ERROR X0X67: Columns of type 'LONG VARCHAR FOR BIT DATA' may not be used in CREATE INDEX, ORDER BY, GROUP BY, UNION, INTERSECT, EXCEPT or DISTINCT statements because comparisons are not supported for that type. ij> select count(dc) from t group by dc; 1 ----------- Index: java/testing/org/apache/derbyTesting/functionTests/master/implicitConversions.out =================================================================== --- java/testing/org/apache/derbyTesting/functionTests/master/implicitConversions.out (revision 294902) +++ java/testing/org/apache/derbyTesting/functionTests/master/implicitConversions.out (working copy) @@ -1881,7 +1881,7 @@ ij> create index all1_bv on all1(bv); 0 rows inserted/updated/deleted ij> create index all1_lbv on all1(lbv); -0 rows inserted/updated/deleted +ERROR X0X67: Columns of type 'LONG VARCHAR FOR BIT DATA' may not be used in CREATE INDEX, ORDER BY, GROUP BY, UNION, INTERSECT, EXCEPT or DISTINCT statements because comparisons are not supported for that type. ij> create index all1_dt on all1(dt); 0 rows inserted/updated/deleted ij> create index all1_tm on all1(tm); @@ -3338,7 +3338,7 @@ ij> create index all1_bv on all1(bv); 0 rows inserted/updated/deleted ij> create index all1_lbv on all1(lbv); -0 rows inserted/updated/deleted +ERROR X0X67: Columns of type 'LONG VARCHAR FOR BIT DATA' may not be used in CREATE INDEX, ORDER BY, GROUP BY, UNION, INTERSECT, EXCEPT or DISTINCT statements because comparisons are not supported for that type. ij> create index all1_dt on all1(dt); 0 rows inserted/updated/deleted ij> create index all1_tm on all1(tm); Index: java/testing/org/apache/derbyTesting/functionTests/master/bit.out =================================================================== --- java/testing/org/apache/derbyTesting/functionTests/master/bit.out (revision 294902) +++ java/testing/org/apache/derbyTesting/functionTests/master/bit.out (working copy) @@ -260,14 +260,7 @@ ff |ff |ff NULL|null |null columns ij> select vb16, c20, cv20, lbv from t order by lbv; -VB16|C20 |CV20 |LBV -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - |0 |zero length column | -01 |1 |1 |0000000001 -03 |3 |3 |03 -ff |ff |ff |1111111111 -aa |aa |aa |aa -NULL|null |null columns |NULL +ERROR X0X67: Columns of type 'LONG VARCHAR FOR BIT DATA' may not be used in CREATE INDEX, ORDER BY, GROUP BY, UNION, INTERSECT, EXCEPT or DISTINCT statements because comparisons are not supported for that type. ij> select b10 from t where b10 > X'0000000010'; B10 ----------------------------------------