db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krist...@apache.org
Subject svn commit: r1033864 - in /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog: XPLAINResultSetDescriptor.java XPLAINScanPropsDescriptor.java XPLAINSortPropsDescriptor.java XPLAINStatementDescriptor.java
Date Thu, 11 Nov 2010 10:06:29 GMT
Author: kristwaa
Date: Thu Nov 11 10:06:29 2010
New Revision: 1033864

URL: http://svn.apache.org/viewvc?rev=1033864&view=rev
Log:
DERBY-4772: Data truncation error with XPLAIN-functionality enabled 

Increased max length of string fields with undefined max lenghts to the
maximum allowed length of the VARCHAR data type (and also changed the data
type from CHAR to VARCHAR).

Patch file: derby-4772-1b-increase_max_len.diff


Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/XPLAINResultSetDescriptor.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/XPLAINScanPropsDescriptor.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/XPLAINSortPropsDescriptor.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/XPLAINStatementDescriptor.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/XPLAINResultSetDescriptor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/XPLAINResultSetDescriptor.java?rev=1033864&r1=1033863&r2=1033864&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/XPLAINResultSetDescriptor.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/XPLAINResultSetDescriptor.java
Thu Nov 11 10:06:29 2010
@@ -26,7 +26,7 @@ import java.sql.SQLException;
 
 import org.apache.derby.catalog.UUID;
 import org.apache.derby.iapi.sql.dictionary.SystemColumn;
-import org.apache.derby.impl.sql.catalog.SystemColumnImpl;
+import org.apache.derby.iapi.types.TypeId;
 import java.sql.Types;
 
 public class XPLAINResultSetDescriptor extends XPLAINTableDescriptor 
@@ -188,8 +188,10 @@ public class XPLAINResultSetDescriptor e
         
         return new SystemColumn[] {
             SystemColumnImpl.getUUIDColumn("RS_ID", false),
-            SystemColumnImpl.getColumn("OP_IDENTIFIER",Types.VARCHAR,false,30),
-            SystemColumnImpl.getColumn("OP_DETAILS", Types.VARCHAR, true, 256),
+            SystemColumnImpl.getColumn("OP_IDENTIFIER", Types.VARCHAR, false,
+                    TypeId.VARCHAR_MAXWIDTH),
+            SystemColumnImpl.getColumn("OP_DETAILS", Types.VARCHAR, true,
+                    TypeId.VARCHAR_MAXWIDTH),
             SystemColumnImpl.getColumn("NO_OPENS", Types.INTEGER, true),
             SystemColumnImpl.getColumn("NO_INDEX_UPDATES", Types.INTEGER, true),
             SystemColumnImpl.getColumn("LOCK_MODE", Types.CHAR, true, 2),

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/XPLAINScanPropsDescriptor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/XPLAINScanPropsDescriptor.java?rev=1033864&r1=1033863&r2=1033864&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/XPLAINScanPropsDescriptor.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/XPLAINScanPropsDescriptor.java
Thu Nov 11 10:06:29 2010
@@ -26,7 +26,7 @@ import java.sql.SQLException;
 
 import org.apache.derby.catalog.UUID;
 import org.apache.derby.iapi.sql.dictionary.SystemColumn;
-import org.apache.derby.impl.sql.catalog.SystemColumnImpl;
+import org.apache.derby.iapi.types.TypeId;
 import java.sql.Types;
 
 public class XPLAINScanPropsDescriptor extends XPLAINTableDescriptor 
@@ -205,14 +205,20 @@ public class XPLAINScanPropsDescriptor e
             SystemColumnImpl.getColumn("NO_QUALIFIED_ROWS", Types.INTEGER, true),
             SystemColumnImpl.getColumn("NO_VISITED_DELETED_ROWS", Types.INTEGER, true),
             SystemColumnImpl.getColumn("NO_FETCHED_COLUMNS", Types.INTEGER, true),
-            SystemColumnImpl.getColumn("BITSET_OF_FETCHED_COLUMNS", Types.VARCHAR, true,
256),
+            SystemColumnImpl.getColumn("BITSET_OF_FETCHED_COLUMNS",
+                    Types.VARCHAR, true, TypeId.VARCHAR_MAXWIDTH),
             SystemColumnImpl.getColumn("BTREE_HEIGHT", Types.INTEGER, true),
             SystemColumnImpl.getColumn("FETCH_SIZE", Types.INTEGER, true),
-            SystemColumnImpl.getColumn("START_POSITION", Types.VARCHAR, true, 512),
-            SystemColumnImpl.getColumn("STOP_POSITION", Types.VARCHAR, true, 512),
-            SystemColumnImpl.getColumn("SCAN_QUALIFIERS", Types.VARCHAR, true, 512),
-            SystemColumnImpl.getColumn("NEXT_QUALIFIERS", Types.VARCHAR, true, 512),
-            SystemColumnImpl.getColumn("HASH_KEY_COLUMN_NUMBERS", Types.VARCHAR, true, 512),
+            SystemColumnImpl.getColumn("START_POSITION", Types.VARCHAR, true,
+                    TypeId.VARCHAR_MAXWIDTH),
+            SystemColumnImpl.getColumn("STOP_POSITION", Types.VARCHAR, true,
+                    TypeId.VARCHAR_MAXWIDTH),
+            SystemColumnImpl.getColumn("SCAN_QUALIFIERS", Types.VARCHAR, true,
+                    TypeId.VARCHAR_MAXWIDTH),
+            SystemColumnImpl.getColumn("NEXT_QUALIFIERS", Types.VARCHAR, true,
+                    TypeId.VARCHAR_MAXWIDTH),
+            SystemColumnImpl.getColumn("HASH_KEY_COLUMN_NUMBERS",
+                    Types.VARCHAR, true, TypeId.VARCHAR_MAXWIDTH),
             SystemColumnImpl.getColumn("HASH_TABLE_SIZE", Types.INTEGER, true),
         };
     }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/XPLAINSortPropsDescriptor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/XPLAINSortPropsDescriptor.java?rev=1033864&r1=1033863&r2=1033864&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/XPLAINSortPropsDescriptor.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/XPLAINSortPropsDescriptor.java
Thu Nov 11 10:06:29 2010
@@ -26,11 +26,11 @@ import java.sql.SQLException;
 
 import org.apache.derby.catalog.UUID;
 import org.apache.derby.iapi.sql.dictionary.SystemColumn;
-import org.apache.derby.impl.sql.catalog.SystemColumnImpl;
+import org.apache.derby.iapi.types.TypeId;
 import java.sql.Types;
+
 /**
  * This class describes a Tuple for the XPLAIN_SORT_PROPS System Table.
- *
  */
 public class XPLAINSortPropsDescriptor extends XPLAINTableDescriptor 
 {
@@ -135,11 +135,11 @@ public class XPLAINSortPropsDescriptor e
             SystemColumnImpl.getColumn("NO_INPUT_ROWS", Types.INTEGER, true),
             SystemColumnImpl.getColumn("NO_OUTPUT_ROWS", Types.INTEGER, true),
             SystemColumnImpl.getColumn("NO_MERGE_RUNS", Types.INTEGER, true),
-            SystemColumnImpl.getColumn("MERGE_RUN_DETAILS", Types.VARCHAR, true, 256),
+            SystemColumnImpl.getColumn("MERGE_RUN_DETAILS", Types.VARCHAR, true,
+                    TypeId.VARCHAR_MAXWIDTH),
             SystemColumnImpl.getColumn("ELIMINATE_DUPLICATES", Types.CHAR, true, 1),
             SystemColumnImpl.getColumn("IN_SORT_ORDER", Types.CHAR, true, 1),
             SystemColumnImpl.getColumn("DISTINCT_AGGREGATE", Types.CHAR, true, 1),
-
         };
     }
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/XPLAINStatementDescriptor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/XPLAINStatementDescriptor.java?rev=1033864&r1=1033863&r2=1033864&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/XPLAINStatementDescriptor.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/XPLAINStatementDescriptor.java
Thu Nov 11 10:06:29 2010
@@ -27,7 +27,6 @@ import java.sql.Timestamp;
 
 import org.apache.derby.catalog.UUID;
 import org.apache.derby.iapi.sql.dictionary.SystemColumn;
-import org.apache.derby.impl.sql.catalog.SystemColumnImpl;
 import org.apache.derby.iapi.types.TypeId;
 import java.sql.Types;
 
@@ -122,15 +121,21 @@ public class XPLAINStatementDescriptor e
             SystemColumnImpl.getIdentifierColumn("STMT_NAME", true),
             SystemColumnImpl.getColumn("STMT_TYPE", Types.CHAR, false, 3),
             SystemColumnImpl.getColumn("STMT_TEXT", Types.VARCHAR, false, TypeId.VARCHAR_MAXWIDTH),
-            SystemColumnImpl.getColumn("JVM_ID", Types.CHAR, false, 30),
-            SystemColumnImpl.getColumn("OS_IDENTIFIER", Types.CHAR, false, 30),
+            SystemColumnImpl.getColumn("JVM_ID", Types.VARCHAR, false,
+                    TypeId.VARCHAR_MAXWIDTH),
+            SystemColumnImpl.getColumn("OS_IDENTIFIER", Types.VARCHAR, false,
+                    TypeId.VARCHAR_MAXWIDTH),
             SystemColumnImpl.getColumn("XPLAIN_MODE", Types.CHAR, true, 1),
             SystemColumnImpl.getColumn("XPLAIN_TIME", Types.TIMESTAMP, true),
-            SystemColumnImpl.getColumn("XPLAIN_THREAD_ID", Types.CHAR, false, 32),
-            SystemColumnImpl.getColumn("TRANSACTION_ID", Types.CHAR, false, 32),
-            SystemColumnImpl.getColumn("SESSION_ID", Types.CHAR, false, 32),
+            SystemColumnImpl.getColumn("XPLAIN_THREAD_ID", Types.VARCHAR, false,
+                    TypeId.VARCHAR_MAXWIDTH),
+            SystemColumnImpl.getColumn("TRANSACTION_ID", Types.VARCHAR, false,
+                    TypeId.VARCHAR_MAXWIDTH),
+            SystemColumnImpl.getColumn("SESSION_ID", Types.VARCHAR, false,
+                    TypeId.VARCHAR_MAXWIDTH),
             SystemColumnImpl.getIdentifierColumn("DATABASE_NAME", false),
-            SystemColumnImpl.getColumn("DRDA_ID", Types.CHAR, true, 32),
+            SystemColumnImpl.getColumn("DRDA_ID", Types.VARCHAR, true,
+                    TypeId.VARCHAR_MAXWIDTH),
             SystemColumnImpl.getUUIDColumn("TIMING_ID", true),
         };
     }



Mime
View raw message