db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From banda...@apache.org
Subject svn commit: r295076 - in /db/derby/code/branches/10.1/java: engine/org/apache/derby/iapi/types/ testing/org/apache/derbyTesting/functionTests/master/
Date Wed, 05 Oct 2005 18:44:53 GMT
Author: bandaram
Date: Wed Oct  5 11:44:46 2005
New Revision: 295076

URL: http://svn.apache.org/viewcvs?rev=295076&view=rev
Log:
DERBY-392: Disable creating b-tree indexes on long varchar for bit data. This datatype requires
different kind of index and allowing the current behavior causes many issues.

Porting the fix from TRUNK (10.2) to 10.1 branch.

Submitted by Satheesh Bandaram (satheesh@sourcery.org)

Modified:
    db/derby/code/branches/10.1/java/engine/org/apache/derby/iapi/types/TypeId.java
    db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/aggbuiltin.out
    db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/bit.out
    db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/groupBy.out
    db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/implicitConversions.out

Modified: db/derby/code/branches/10.1/java/engine/org/apache/derby/iapi/types/TypeId.java
URL: http://svn.apache.org/viewcvs/db/derby/code/branches/10.1/java/engine/org/apache/derby/iapi/types/TypeId.java?rev=295076&r1=295075&r2=295076&view=diff
==============================================================================
--- db/derby/code/branches/10.1/java/engine/org/apache/derby/iapi/types/TypeId.java (original)
+++ db/derby/code/branches/10.1/java/engine/org/apache/derby/iapi/types/TypeId.java Wed Oct
 5 11:44:46 2005
@@ -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:

Modified: db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/aggbuiltin.out
URL: http://svn.apache.org/viewcvs/db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/aggbuiltin.out?rev=295076&r1=295075&r2=295076&view=diff
==============================================================================
--- db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/aggbuiltin.out
(original)
+++ db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/aggbuiltin.out
Wed Oct  5 11:44:46 2005
@@ -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          
 -----------

Modified: db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/bit.out
URL: http://svn.apache.org/viewcvs/db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/bit.out?rev=295076&r1=295075&r2=295076&view=diff
==============================================================================
--- db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/bit.out
(original)
+++ db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/bit.out
Wed Oct  5 11:44:46 2005
@@ -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                                     
 ----------------------------------------

Modified: db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/groupBy.out
URL: http://svn.apache.org/viewcvs/db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/groupBy.out?rev=295076&r1=295075&r2=295076&view=diff
==============================================================================
--- db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/groupBy.out
(original)
+++ db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/groupBy.out
Wed Oct  5 11:44:46 2005
@@ -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   

Modified: db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/implicitConversions.out
URL: http://svn.apache.org/viewcvs/db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/implicitConversions.out?rev=295076&r1=295075&r2=295076&view=diff
==============================================================================
--- db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/implicitConversions.out
(original)
+++ db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/implicitConversions.out
Wed Oct  5 11:44:46 2005
@@ -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);



Mime
View raw message