db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Satheesh Bandaram <sathe...@Sourcery.Org>
Subject Re: [PATCH] Derby-107, Phase II
Date Sat, 26 Feb 2005 00:31:56 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Submitted this patch.<br>
<br>
Satheesh<br>
<br>
Sending&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
java\engine\org\apache\derby\impl\jdbc\metadata.properties<br>
Sending&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
java\testing\org\apache\derbyTesting\functionTests\master\DerbyNet\metadata.out<br>
Sending&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
java\testing\org\apache\derbyTesting\functionTests\master\forbitdata.out<br>
Sending&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
java\testing\org\apache\derbyTesting\functionTests\master\metadata.out<br>
Sending&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
java\testing\org\apache\derbyTesting\functionTests\master\xaSimplePositive.out<br>
Sending&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
java\testing\org\apache\derbyTesting\functionTests\tests\jdbcapi\xaSimplePositive.sql<br>
Transmitting file data ......<br>
Committed revision 155378.<br>
<br>
Army wrote:<br>
<blockquote cite="mid421240C1.6040806@sbcglobal.net" type="cite">Army
wrote:
  <br>
&gt;
  <br>
&gt; Attached is a patch for Phase II of my proposal for fixing
Derby-107:
  <br>
&gt;
  <br>
&gt; "Phase II) Where it is SAFE to do, modify the values of
non-numeric rows
  <br>
&gt; in the metadata result sets to be NULL when the columns in
question don't
  <br>
&gt; apply.&nbsp; For example, "SCALE/DECIMAL_DIGITS" and "NUM_PREC_RADIX"
are two
  <br>
&gt; columns that wouldn't apply to a row that is for CHAR, and thus
the values
  <br>
&gt; in those two columns (for that specific row) would be NULL."
  <br>
&gt;&nbsp;&nbsp; -- Pasted from my first email referenced above.
  <br>
&gt;
  <br>
  <br>
As I was glancing over the Phase II patch for DERBY-107, I realized
that I'm not entirely certain whether or not the SCALE/DECIMAL_DIGITS
and NUM_PREC_RADIX columns should apply to date, time, and timestamp
columns...Anyone know?
  <br>
  <br>
In my version of the Phase II patch, I assumed they did NOT; now, since
I'm not so sure of that, I'm changing the Phase II patch so that date,
time, and timestamp columns will return the same values as they always
have for those columns in Derby (instead of the NULL values that my
original Phase II patch was returning).
  <br>
  <br>
Please find the RE-patch for Phase II attached to this email.&nbsp; Since
none of the patches have been applied so far, I hope this isn't too
much of an inconvenience.
  <br>
  <br>
NOTE: This patch is STILL with respect to the Phase I patch, found
here:
  <br>
  <br>
<a class="moz-txt-link-freetext" href="http://mail-archives.eu.apache.org/mod_mbox/db-derby-dev/200502.mbox/%3c4202699E.3000009@golux.com%3e">http://mail-archives.eu.apache.org/mod_mbox/db-derby-dev/200502.mbox/%3c4202699E.3000009@golux.com%3e</a>
  <br>
  <br>
So committers, please commit the Phase I patch before committing this
one.
  <br>
  <br>
I hope to post the third and final patch for Derby-107 later today.&nbsp; In
the meantime, any feedback regarding the first two patches would be
appreciated--and if there isn't any, then perhaps a committer could go
ahead and commit them to the trunk...?
  <br>
  <br>
Thanks,
  <br>
Army
  <br>
  <pre wrap="">
<hr size="4" width="90%">
Index: java/engine/org/apache/derby/impl/jdbc/metadata.properties
===================================================================
--- java/engine/org/apache/derby/impl/jdbc/metadata.properties  (revision 153297)
+++ java/engine/org/apache/derby/impl/jdbc/metadata.properties  (working copy)
@@ -112,8 +112,24 @@
 	    V."TYPE_NAME" AS TYPE_NAME, \
 	    V."PRECISION" AS PRECISION, \
 	    V."LENGTH" AS LENGTH, \
-	    V."SCALE" AS SCALE, \
-	    V."RADIX" AS RADIX, \
+		CASE WHEN (V."DATA_TYPE" IN (java.sql.Types::DECIMAL, \
+			java.sql.Types::NUMERIC, java.sql.Types::INTEGER, \
+			java.sql.Types::SMALLINT, java.sql.Types::TINYINT, \
+			java.sql.Types::BIGINT, java.sql.Types::DATE, \
+			java.sql.Types::TIME, java.sql.Types::TIMESTAMP)) \
+				THEN V."SCALE" \
+				ELSE CAST (NULL AS SMALLINT) END \
+			AS SCALE, \
+		CASE WHEN (V."DATA_TYPE" IN (java.sql.Types::DECIMAL, \
+			java.sql.Types::NUMERIC, java.sql.Types::INTEGER, \
+			java.sql.Types::SMALLINT, java.sql.Types::TINYINT, \
+			java.sql.Types::BIGINT, java.sql.Types::DOUBLE, \
+			java.sql.Types::FLOAT, java.sql.Types::REAL, \
+			java.sql.Types::DATE, java.sql.Types::TIME, \
+			java.sql.Types::TIMESTAMP)) \
+				THEN V."RADIX" \
+				ELSE CAST (NULL AS SMALLINT) END \
+	    	AS RADIX, \
 	    V."NULLABLE" AS NULLABLE, \
 	    V."REMARKS" AS REMARKS, \
 	    V."METHOD_ID" AS METHOD_ID, \
@@ -171,13 +187,24 @@
 				C.COLUMNDATATYPE.getMaximumWidth() END AS COLUMN_SIZE, \
 		CAST( NULL AS INT) AS BUFFER_LENGTH, \
 		CASE WHEN (C.COLUMNDATATYPE.getJDBCTypeId() IN (java.sql.Types::DECIMAL, 				\
-						 java.sql.Types::NUMERIC)) THEN \
-					C.COLUMNDATATYPE.getScale() ELSE \
-					CAST(NULL AS INT) END \
+			java.sql.Types::NUMERIC, java.sql.Types::INTEGER, \
+			java.sql.Types::SMALLINT, java.sql.Types::TINYINT, \
+			java.sql.Types::BIGINT, java.sql.Types::DATE, \
+			java.sql.Types::TIME, java.sql.Types::TIMESTAMP)) \
+				THEN C.COLUMNDATATYPE.getScale() \
+				ELSE CAST(NULL AS INT) END \
 			AS DECIMAL_DIGITS, 											\
 		CASE WHEN (C.COLUMNDATATYPE.getJDBCTypeId() IN (java.sql.Types::REAL, 					\
-						 java.sql.Types::DOUBLE,		\
-						 java.sql.Types::FLOAT)) THEN 2 ELSE 10 END \
+			java.sql.Types::DOUBLE, java.sql.Types::FLOAT)) \
+				THEN 2 \
+				ELSE (CASE WHEN (C.COLUMNDATATYPE.getJDBCTypeId() IN ( \
+					java.sql.Types::INTEGER, java.sql.Types::SMALLINT, \
+					java.sql.Types::TINYINT, java.sql.Types::BIGINT, \
+					java.sql.Types::DECIMAL, java.sql.Types::NUMERIC, \
+					java.sql.Types::DATE, java.sql.Types::TIME, \
+					java.sql.Types::TIMESTAMP)) \
+						THEN 10 \
+						ELSE CAST (NULL AS INTEGER) END) END \
 			AS NUM_PREC_RADIX, 											\
 		CASE WHEN C.COLUMNDATATYPE.isNullable() THEN \
 			java.sql.DatabaseMetaData::columnNullable ELSE \
@@ -504,37 +531,82 @@
 				PK_NAME, \
 				KEY_SEQ
 
-getTypeInfo=SELECT CAST (RTRIM(CAST (T1 AS CHAR(128))) AS VARCHAR(128)) AS TYPE_NAME, CAST (T2 AS SMALLINT) AS DATA_TYPE, \
-T3 AS PRECISION, CAST (RTRIM(CAST(T4 AS CHAR(10))) AS VARCHAR(10)) AS LITERAL_PREFIX,CAST (RTRIM(T5) AS VARCHAR(10)) AS LITERAL_SUFFIX, \
-CAST (RTRIM(CAST(T6 AS CHAR(20))) AS VARCHAR(20)) AS CREATE_PARAMS,T7 AS NULLABLE, T8 AS CASE_SENSITIVE, \
-T9 AS SEARCHABLE,T10 AS UNSIGNED_ATTRIBUTE,T11 AS FIXED_PREC_SCALE, \
-T12 AS AUTO_INCREMENT,CAST (RTRIM(CAST(T1 AS CHAR(128))) AS VARCHAR(128)) AS LOCAL_TYPE_NAME, \
-T14 AS MINIMUM_SCALE,T15 AS MAXIMUM_SCALE,CAST (NULL AS INT) AS SQL_DATA_TYPE, \
-CAST (NULL AS INT) AS SQL_DATETIME_SUB,T18 AS NUM_PREC_RADIX \
-FROM ( VALUES \
-('BIGINT',-5,19,CAST (NULL AS CHAR),CAST (NULL AS CHAR),CAST (NULL AS CHAR),1,FALSE,2,FALSE,FALSE,TRUE,0,0,10),\
-('LONG VARCHAR FOR BIT DATA',-4,32700,'X''','''',CAST (NULL AS CHAR),1,FALSE,2,TRUE,FALSE,FALSE,0,0,0),\
-('VARCHAR () FOR BIT DATA',-3,32762,'X''','''','length',1,FALSE,2,TRUE,FALSE,FALSE,0,0,2),\
-('CHAR () FOR BIT DATA',-2,254,'X''','''','length',1,FALSE,2,TRUE,FALSE,FALSE,0,0,2),\
-('LONG VARCHAR',-1,32700,'''','''',CAST (NULL AS CHAR),1,TRUE,3,TRUE,FALSE,FALSE,0,0,0),\
-('LONG NVARCHAR',-1,32700,'''','''',CAST (NULL AS CHAR),1,TRUE,3,TRUE,FALSE,FALSE,0,0,0),\
-('CHAR',1,254,'''','''','length',1,TRUE,3,TRUE,FALSE,FALSE,0,0,0),\
-('NATIONAL CHAR',1,2147483647,'''','''','length',1,TRUE,3,TRUE,FALSE,FALSE,0,0,0),\
-('NUMERIC',2,31,CAST (NULL AS CHAR),CAST (NULL AS CHAR),'precision,scale',1,FALSE,2,FALSE,TRUE,FALSE,0,32767,10),\
-('DECIMAL',3,31,CAST (NULL AS CHAR),CAST (NULL AS CHAR),'precision,scale',1,FALSE,2,FALSE,TRUE,FALSE,0,32767,10),\
-('INTEGER',4,10,CAST (NULL AS CHAR),CAST (NULL AS CHAR),CAST (NULL AS CHAR),1,FALSE,2,FALSE,FALSE,TRUE,0,0,10),\
-('SMALLINT',5,5,CAST (NULL AS CHAR),CAST (NULL AS CHAR),CAST (NULL AS CHAR),1,FALSE,2,FALSE,FALSE,TRUE,0,0,10),\
-('FLOAT',6,52,CAST (NULL AS CHAR),CAST (NULL AS CHAR),'precision',1,FALSE,2,FALSE,FALSE,FALSE,0,0,2),\
-('REAL',7,23,CAST (NULL AS CHAR),CAST (NULL AS CHAR),CAST (NULL AS CHAR),1,FALSE,2,FALSE,FALSE,FALSE,0,0,2),\
-('DOUBLE',8,52,CAST (NULL AS CHAR),CAST (NULL AS CHAR),CAST (NULL AS CHAR),1,FALSE,2,FALSE,FALSE,FALSE,0,0,2),\
-('VARCHAR',12,32672,'''','''','length',1,TRUE,3,TRUE,FALSE,FALSE,0,0,0),\
-('NATIONAL CHAR VARYING',12,2147483647,'''','''','length',1,TRUE,3,TRUE,FALSE,FALSE,0,0,0),\
-('DATE',91,10,'DATE''','''',CAST (NULL AS CHAR),1,FALSE,2,TRUE,FALSE,FALSE,0,0,0),\
-('TIME',92,0,'TIME''','''',CAST (NULL AS CHAR),1,FALSE,2,TRUE,FALSE,FALSE,0,0,0),\
-('TIMESTAMP',93,0,'TIMESTAMP''','''',CAST (NULL AS CHAR),1,FALSE,2,TRUE,FALSE,FALSE,0,0,0),\
-('BLOB',2004,2147483647,CAST (NULL AS CHAR),CAST (NULL AS CHAR),'length',1,FALSE,1,CAST (NULL AS BOOLEAN),FALSE,CAST (NULL AS BOOLEAN),CAST (NULL AS INTEGER),CAST (NULL AS INTEGER),CAST (NULL AS INTEGER)),\
-('CLOB',2005,2147483647,'''','''','length',1,TRUE,1,CAST (NULL AS BOOLEAN),FALSE,CAST (NULL AS BOOLEAN),CAST (NULL AS INTEGER),CAST (NULL AS INTEGER),CAST (NULL AS INTEGER))\
-) AS TYPEINFO(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T14,T15,T18)
+getTypeInfo=\
+	SELECT CAST (RTRIM(CAST (T1 AS CHAR(128))) AS VARCHAR(128)) AS TYPE_NAME, \
+		CAST (T2 AS SMALLINT) AS DATA_TYPE, \
+		T3 AS PRECISION, \
+		CAST (RTRIM(CAST(T4 AS CHAR(10))) AS VARCHAR(10)) AS LITERAL_PREFIX, \
+		CAST (RTRIM(T5) AS VARCHAR(10)) AS LITERAL_SUFFIX, \
+		CAST (RTRIM(CAST(T6 AS CHAR(20))) AS VARCHAR(20)) AS CREATE_PARAMS, \
+		T7 AS NULLABLE, \
+		T8 AS CASE_SENSITIVE, \
+		T9 AS SEARCHABLE, \
+		T10 AS UNSIGNED_ATTRIBUTE, \
+		T11 AS FIXED_PREC_SCALE, \
+		T12 AS AUTO_INCREMENT, \
+		CAST (RTRIM(CAST(T1 AS CHAR(128))) AS VARCHAR(128)) AS LOCAL_TYPE_NAME, \
+		T14 AS MINIMUM_SCALE, \
+		T15 AS MAXIMUM_SCALE, \
+		CAST (NULL AS INT) AS SQL_DATA_TYPE, \
+		CAST (NULL AS INT) AS SQL_DATETIME_SUB, \
+		T18 AS NUM_PREC_RADIX \
+	FROM ( VALUES \
+		('BIGINT',-5,19,CAST (NULL AS CHAR),CAST (NULL AS CHAR),CAST (NULL AS CHAR), \
+			1,FALSE,2,FALSE,FALSE,TRUE,0,0,10),\
+		('LONG VARCHAR FOR BIT DATA',-4,32700,'X''','''',CAST (NULL AS CHAR), \
+			1,FALSE,2,TRUE,FALSE,FALSE,CAST (NULL AS INTEGER),CAST (NULL AS INTEGER), \
+			CAST (NULL AS INTEGER)), \
+		('VARCHAR () FOR BIT DATA',-3,32762,'X''','''','length', \
+			1,FALSE,2,TRUE,FALSE,FALSE,CAST (NULL AS INTEGER),CAST (NULL AS INTEGER), \
+			CAST (NULL AS INTEGER)), \
+		('CHAR () FOR BIT DATA',-2,254,'X''','''','length', \
+			1,FALSE,2,TRUE,FALSE,FALSE,CAST (NULL AS INTEGER),CAST (NULL AS INTEGER), \
+			CAST (NULL AS INTEGER)), \
+		('LONG VARCHAR',-1,32700,'''','''',CAST (NULL AS CHAR), \
+			1,TRUE,3,TRUE,FALSE,FALSE,CAST (NULL AS INTEGER),CAST (NULL AS INTEGER), \
+			CAST (NULL AS INTEGER)), \
+		('LONG NVARCHAR',-1,32700,'''','''',CAST (NULL AS CHAR), \
+			1,TRUE,3,TRUE,FALSE,FALSE,CAST (NULL AS INTEGER),CAST (NULL AS INTEGER), \
+			CAST (NULL AS INTEGER)), \
+		('CHAR',1,254,'''','''','length', \
+			1,TRUE,3,TRUE,FALSE,FALSE,CAST (NULL AS INTEGER),CAST (NULL AS INTEGER), \
+			CAST (NULL AS INTEGER)), \
+		('NATIONAL CHAR',1,2147483647,'''','''','length', \
+			1,TRUE,3,TRUE,FALSE,FALSE,CAST (NULL AS INTEGER),CAST (NULL AS INTEGER), \
+			CAST (NULL AS INTEGER)), \
+		('NUMERIC',2,31,CAST (NULL AS CHAR),CAST (NULL AS CHAR),'precision,scale', \
+			1,FALSE,2,FALSE,TRUE,FALSE,0,32767,10),\
+		('DECIMAL',3,31,CAST (NULL AS CHAR),CAST (NULL AS CHAR),'precision,scale', \
+			1,FALSE,2,FALSE,TRUE,FALSE,0,32767,10),\
+		('INTEGER',4,10,CAST (NULL AS CHAR),CAST (NULL AS CHAR),CAST (NULL AS CHAR), \
+			1,FALSE,2,FALSE,FALSE,TRUE,0,0,10),\
+		('SMALLINT',5,5,CAST (NULL AS CHAR),CAST (NULL AS CHAR),CAST (NULL AS CHAR), \
+			1,FALSE,2,FALSE,FALSE,TRUE,0,0,10),\
+		('FLOAT',6,52,CAST (NULL AS CHAR),CAST (NULL AS CHAR),'precision', \
+			1,FALSE,2,FALSE,FALSE,FALSE,CAST (NULL AS INTEGER),CAST (NULL AS INTEGER),2),\
+		('REAL',7,23,CAST (NULL AS CHAR),CAST (NULL AS CHAR),CAST (NULL AS CHAR), \
+			1,FALSE,2,FALSE,FALSE,FALSE,CAST (NULL AS INTEGER),CAST (NULL AS INTEGER),2),\
+		('DOUBLE',8,52,CAST (NULL AS CHAR),CAST (NULL AS CHAR),CAST (NULL AS CHAR), \
+			1,FALSE,2,FALSE,FALSE,FALSE,CAST (NULL AS INTEGER),CAST (NULL AS INTEGER),2),\
+		('VARCHAR',12,32672,'''','''','length', \
+			1,TRUE,3,TRUE,FALSE,FALSE,CAST (NULL AS INTEGER),CAST (NULL AS INTEGER), \
+			CAST (NULL AS INTEGER)), \
+		('NATIONAL CHAR VARYING',12,2147483647,'''','''','length', \
+			1,TRUE,3,TRUE,FALSE,FALSE,CAST (NULL AS INTEGER),CAST (NULL AS INTEGER), \
+			CAST (NULL AS INTEGER)), \
+		('DATE',91,10,'DATE''','''',CAST (NULL AS CHAR), \
+			1,FALSE,2,TRUE,FALSE,FALSE,0,0,10),\
+		('TIME',92,0,'TIME''','''',CAST (NULL AS CHAR), \
+			1,FALSE,2,TRUE,FALSE,FALSE,0,0,10),\
+		('TIMESTAMP',93,0,'TIMESTAMP''','''',CAST (NULL AS CHAR), \
+			1,FALSE,2,TRUE,FALSE,FALSE,0,0,10),\
+		('BLOB',2004,2147483647,CAST (NULL AS CHAR),CAST (NULL AS CHAR),'length', \
+			1,FALSE,1,CAST (NULL AS BOOLEAN),FALSE,CAST (NULL AS BOOLEAN), \
+			CAST (NULL AS INTEGER),CAST (NULL AS INTEGER),CAST (NULL AS INTEGER)),\
+		('CLOB',2005,2147483647,'''','''','length', \
+			1,TRUE,1,CAST (NULL AS BOOLEAN),FALSE,CAST (NULL AS BOOLEAN), \
+			CAST (NULL AS INTEGER),CAST (NULL AS INTEGER),CAST (NULL AS INTEGER)) \
+	) AS TYPEINFO(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T14,T15,T18)
 
 
 # parameter 1 = pattern for catalog name 
@@ -631,7 +703,15 @@
 		CAST (COLS.COLUMNDATATYPE.getTypeName() AS VARCHAR(128)) AS TYPE_NAME, \
 		COLS.COLUMNDATATYPE.getMaximumWidth() AS COLUMN_SIZE, \
 		CAST (NULL AS INT) AS BUFFER_LENGTH, \
-		CAST (COLS.COLUMNDATATYPE.getPrecision() AS SMALLINT) AS DECIMAL_DIGITS, \
+		CAST ((CASE WHEN (COLS.COLUMNDATATYPE.getJDBCTypeId() IN ( \
+			java.sql.Types::DECIMAL, java.sql.Types::NUMERIC, \
+			java.sql.Types::INTEGER, java.sql.Types::SMALLINT, \
+			java.sql.Types::TINYINT, java.sql.Types::BIGINT, \
+			java.sql.Types::DATE, java.sql.Types::TIME, \
+			java.sql.Types::TIMESTAMP)) \
+				THEN COLS.COLUMNDATATYPE.getPrecision() \
+				ELSE CAST (NULL AS SMALLINT) END) AS SMALLINT) \
+			AS DECIMAL_DIGITS, \
 		CAST (java.sql.DatabaseMetaData::bestRowNotPseudo AS SMALLINT) AS PSEUDO_COLUMN \
 	FROM SYS.SYSSCHEMAS SCHEMAS, SYS.SYSTABLES TABS, \
 		SYS.SYSCONSTRAINTS cons, SYS.SYSKEYS keys, \
@@ -685,7 +765,15 @@
 		CAST (COLS.COLUMNDATATYPE.getTypeName() AS VARCHAR(128)) AS TYPE_NAME, \
 		COLS.COLUMNDATATYPE.getMaximumWidth() AS COLUMN_SIZE, \
 		CAST (NULL AS INT) AS BUFFER_LENGTH, \
-		CAST (COLS.COLUMNDATATYPE.getPrecision() AS SMALLINT) AS DECIMAL_DIGITS, \
+		CAST ((CASE WHEN (COLS.COLUMNDATATYPE.getJDBCTypeId() IN ( \
+			java.sql.Types::DECIMAL, java.sql.Types::NUMERIC, \
+			java.sql.Types::INTEGER, java.sql.Types::SMALLINT, \
+			java.sql.Types::TINYINT, java.sql.Types::BIGINT, \
+			java.sql.Types::DATE, java.sql.Types::TIME, \
+			java.sql.Types::TIMESTAMP)) \
+				THEN COLS.COLUMNDATATYPE.getPrecision() \
+				ELSE CAST (NULL AS SMALLINT) END) AS SMALLINT) \
+			AS DECIMAL_DIGITS, \
 		CAST (java.sql.DatabaseMetaData::bestRowNotPseudo AS SMALLINT) AS PSEUDO_COLUMN \
 	FROM SYS.SYSSCHEMAS SCHEMAS, SYS.SYSTABLES TABS, \
 		SYS.SYSCONSTRAINTS cons, SYS.SYSKEYS keys, \
@@ -738,7 +826,15 @@
 		CAST (COLS.COLUMNDATATYPE.getTypeName() AS VARCHAR(128)) AS TYPE_NAME, \
 		COLS.COLUMNDATATYPE.getMaximumWidth() AS COLUMN_SIZE, \
 		CAST (NULL AS INT) AS BUFFER_LENGTH, \
-		CAST (COLS.COLUMNDATATYPE.getPrecision() AS SMALLINT) AS DECIMAL_DIGITS, \
+		CAST ((CASE WHEN (COLS.COLUMNDATATYPE.getJDBCTypeId() IN ( \
+			java.sql.Types::DECIMAL, java.sql.Types::NUMERIC, \
+			java.sql.Types::INTEGER, java.sql.Types::SMALLINT, \
+			java.sql.Types::TINYINT, java.sql.Types::BIGINT, \
+			java.sql.Types::DATE, java.sql.Types::TIME, \
+			java.sql.Types::TIMESTAMP)) \
+				THEN COLS.COLUMNDATATYPE.getPrecision() \
+				ELSE CAST (NULL AS SMALLINT) END) AS SMALLINT) \
+			AS DECIMAL_DIGITS, \
 		CAST (java.sql.DatabaseMetaData::bestRowNotPseudo AS SMALLINT) AS PSEUDO_COLUMN \
 	FROM SYS.SYSSCHEMAS SCHEMAS, SYS.SYSTABLES TABS, \
 		SYS.SYSCONGLOMERATES IDX, SYS.SYSCOLUMNS COLS \
@@ -768,7 +864,15 @@
 		CAST (COLS.COLUMNDATATYPE.getTypeName() AS VARCHAR(128)) AS TYPE_NAME, \
 		COLS.COLUMNDATATYPE.getMaximumWidth() AS COLUMN_SIZE, \
 		CAST (NULL AS INT) AS BUFFER_LENGTH, \
-		CAST (COLS.COLUMNDATATYPE.getPrecision() AS SMALLINT) AS DECIMAL_DIGITS, \
+		CAST ((CASE WHEN (COLS.COLUMNDATATYPE.getJDBCTypeId() IN ( \
+			java.sql.Types::DECIMAL, java.sql.Types::NUMERIC, \
+			java.sql.Types::INTEGER, java.sql.Types::SMALLINT, \
+			java.sql.Types::TINYINT, java.sql.Types::BIGINT, \
+			java.sql.Types::DATE, java.sql.Types::TIME, \
+			java.sql.Types::TIMESTAMP)) \
+				THEN COLS.COLUMNDATATYPE.getPrecision() \
+				ELSE CAST (NULL AS SMALLINT) END) AS SMALLINT) \
+			AS DECIMAL_DIGITS, \
 		CAST (java.sql.DatabaseMetaData::bestRowNotPseudo AS SMALLINT) AS PSEUDO_COLUMN \
 	FROM SYS.SYSSCHEMAS SCHEMAS, SYS.SYSTABLES TABS,  \
 		SYS.SYSCOLUMNS COLS  \
Index: java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/xaSimplePositive.sql
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/xaSimplePositive.sql	(revision 153297)
+++ java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/xaSimplePositive.sql	(working copy)
@@ -65,6 +65,20 @@
 -- both transactions should be prepared
 select * from APP.global_xactTable where gxid is not null order by gxid;
 
+-- NOTE: The following call to "xa_recover xa_startrscan" is apt to
+-- return the result set rows in reverse order when changes to
+-- the Derby engine affect the number of transactions that it takes
+-- to create a database.  The transactions are stored in a hash table
+-- based on a global and local id, and when the number of transactions
+-- changes, the (internal) local id can change, which may lead to a
+-- change in the result set order.  This order is determined by the
+-- JVM's hashing algorithm. Examples of changes to the engine that
+-- can affect this include ones that cause more commits or that
+-- change the amount of data being stored, such as changes to the
+-- metadata statements (which is what prompted this explanation in
+-- the first place).  Ultimately, the problem is that there is no
+-- way to order the return values from "xa_recover" since it is an
+-- ij internal statement, not SQL...
 xa_recover xa_startrscan;
 xa_recover xa_noflags;
 
Index: java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/metadata.out
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/metadata.out	(revision 153297)
+++ java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/metadata.out	(working copy)
@@ -154,24 +154,24 @@
 getConnection(): same connection
 getProcedureColumns():
 PROCEDURE_CAT[VARCHAR],PROCEDURE_SCHEM[VARCHAR],PROCEDURE_NAME[VARCHAR],COLUMN_NAME[VARCHAR],COLUMN_TYPE[SMALLINT],DATA_TYPE[SMALLINT],TYPE_NAME[VARCHAR],PRECISION[INTEGER],LENGTH[INTEGER],SCALE[SMALLINT],RADIX[SMALLINT],NULLABLE[SMALLINT],REMARKS[VARCHAR],METHOD_ID[SMALLINT],PARAMETER_ID[SMALLINT]
-null,APP,GETPCTEST1,OUTB,4,12,VARCHAR,3,3,0,10,1,null,12,0
-null,APP,GETPCTEST1,A,1,12,VARCHAR,3,3,0,10,1,null,12,1
+null,APP,GETPCTEST1,OUTB,4,12,VARCHAR,3,3,null,null,1,null,12,0
+null,APP,GETPCTEST1,A,1,12,VARCHAR,3,3,null,null,1,null,12,1
 null,APP,GETPCTEST1,B,1,2,NUMERIC,5,6,0,10,1,null,12,2
 null,APP,GETPCTEST1,C,1,5,SMALLINT,5,2,0,10,1,null,12,3
 null,APP,GETPCTEST1,E,1,5,SMALLINT,5,2,0,10,1,null,12,4
 null,APP,GETPCTEST1,F,1,4,INTEGER,10,4,0,10,1,null,12,5
 null,APP,GETPCTEST1,G,1,-5,BIGINT,19,8,0,10,1,null,12,6
-null,APP,GETPCTEST1,H,1,8,DOUBLE,52,8,0,2,1,null,12,7
-null,APP,GETPCTEST1,I,1,8,DOUBLE,52,8,0,2,1,null,12,8
+null,APP,GETPCTEST1,H,1,8,DOUBLE,52,8,null,2,1,null,12,7
+null,APP,GETPCTEST1,I,1,8,DOUBLE,52,8,null,2,1,null,12,8
 null,APP,GETPCTEST1,K,1,91,DATE,10,-1,0,10,1,null,12,9
 null,APP,GETPCTEST1,L,1,92,TIME,8,-1,0,10,1,null,12,10
 null,APP,GETPCTEST1,T,1,93,TIMESTAMP,26,-1,0,10,1,null,12,11
 null,APP,GETPCTEST2,PA,1,4,INTEGER,10,4,0,10,1,null,2,0
 null,APP,GETPCTEST2,PB,1,-5,BIGINT,19,8,0,10,1,null,2,1
-null,APP,GETPCTEST3A,STRING1,1,12,VARCHAR,5,5,0,10,1,null,2,0
-null,APP,GETPCTEST3A,STRING2,4,12,VARCHAR,5,5,0,10,1,null,2,1
-null,APP,GETPCTEST3B,STRING3,1,12,VARCHAR,5,5,0,10,1,null,2,0
-null,APP,GETPCTEST3B,STRING4,2,12,VARCHAR,5,5,0,10,1,null,2,1
+null,APP,GETPCTEST3A,STRING1,1,12,VARCHAR,5,5,null,null,1,null,2,0
+null,APP,GETPCTEST3A,STRING2,4,12,VARCHAR,5,5,null,null,1,null,2,1
+null,APP,GETPCTEST3B,STRING3,1,12,VARCHAR,5,5,null,null,1,null,2,0
+null,APP,GETPCTEST3B,STRING4,2,12,VARCHAR,5,5,null,null,1,null,2,1
 null,APP,GETPCTEST4BX,RETPARAM,4,4,INTEGER,10,4,0,10,1,null,1,0
 getTables() with TABLE_TYPE in ('SYSTEM TABLE') :
 TABLE_CAT[VARCHAR],TABLE_SCHEM[VARCHAR],TABLE_NAME[VARCHAR],TABLE_TYPE[VARCHAR],REMARKS[VARCHAR]
@@ -234,43 +234,43 @@
 TABLE_CAT[VARCHAR],TABLE_SCHEM[VARCHAR],TABLE_NAME[VARCHAR],COLUMN_NAME[VARCHAR],DATA_TYPE[SMALLINT],TYPE_NAME[VARCHAR],COLUMN_SIZE[INTEGER],BUFFER_LENGTH[INTEGER],DECIMAL_DIGITS[INTEGER],NUM_PREC_RADIX[INTEGER],NULLABLE[INTEGER],REMARKS[VARCHAR],COLUMN_DEF[VARCHAR],SQL_DATA_TYPE[INTEGER],SQL_DATETIME_SUB[INTEGER],CHAR_OCTET_LENGTH[INTEGER],ORDINAL_POSITION[INTEGER],IS_NULLABLE[VARCHAR]
 getColumns('SYSTABLES'):
 TABLE_CAT[VARCHAR],TABLE_SCHEM[VARCHAR],TABLE_NAME[VARCHAR],COLUMN_NAME[VARCHAR],DATA_TYPE[SMALLINT],TYPE_NAME[VARCHAR],COLUMN_SIZE[INTEGER],BUFFER_LENGTH[INTEGER],DECIMAL_DIGITS[INTEGER],NUM_PREC_RADIX[INTEGER],NULLABLE[INTEGER],REMARKS[VARCHAR],COLUMN_DEF[VARCHAR],SQL_DATA_TYPE[INTEGER],SQL_DATETIME_SUB[INTEGER],CHAR_OCTET_LENGTH[INTEGER],ORDINAL_POSITION[INTEGER],IS_NULLABLE[VARCHAR]
-,SYS,SYSTABLES,TABLEID,1,CHAR,36,null,null,10,0,,null,null,null,72,1,NO
-,SYS,SYSTABLES,TABLENAME,12,VARCHAR,128,null,null,10,0,,null,null,null,256,2,NO
-,SYS,SYSTABLES,TABLETYPE,1,CHAR,1,null,null,10,0,,null,null,null,2,3,NO
-,SYS,SYSTABLES,SCHEMAID,1,CHAR,36,null,null,10,0,,null,null,null,72,4,NO
-,SYS,SYSTABLES,LOCKGRANULARITY,1,CHAR,1,null,null,10,0,,null,null,null,2,5,NO
+,SYS,SYSTABLES,TABLEID,1,CHAR,36,null,null,null,0,,null,null,null,72,1,NO
+,SYS,SYSTABLES,TABLENAME,12,VARCHAR,128,null,null,null,0,,null,null,null,256,2,NO
+,SYS,SYSTABLES,TABLETYPE,1,CHAR,1,null,null,null,0,,null,null,null,2,3,NO
+,SYS,SYSTABLES,SCHEMAID,1,CHAR,36,null,null,null,0,,null,null,null,72,4,NO
+,SYS,SYSTABLES,LOCKGRANULARITY,1,CHAR,1,null,null,null,0,,null,null,null,2,5,NO
 getColumns('ALLTYPES'):
 TABLE_CAT[VARCHAR],TABLE_SCHEM[VARCHAR],TABLE_NAME[VARCHAR],COLUMN_NAME[VARCHAR],DATA_TYPE[SMALLINT],TYPE_NAME[VARCHAR],COLUMN_SIZE[INTEGER],BUFFER_LENGTH[INTEGER],DECIMAL_DIGITS[INTEGER],NUM_PREC_RADIX[INTEGER],NULLABLE[INTEGER],REMARKS[VARCHAR],COLUMN_DEF[VARCHAR],SQL_DATA_TYPE[INTEGER],SQL_DATETIME_SUB[INTEGER],CHAR_OCTET_LENGTH[INTEGER],ORDINAL_POSITION[INTEGER],IS_NULLABLE[VARCHAR]
-,APP,ALLTYPES,SMALLINTCOL,5,SMALLINT,5,null,null,10,1,,null,null,null,null,1,YES
-,APP,ALLTYPES,INTCOL,4,INTEGER,10,null,null,10,1,,20,null,null,null,2,YES
-,APP,ALLTYPES,BIGINTCOL,-5,BIGINT,19,null,null,10,1,,null,null,null,null,3,YES
+,APP,ALLTYPES,SMALLINTCOL,5,SMALLINT,5,null,0,10,1,,null,null,null,null,1,YES
+,APP,ALLTYPES,INTCOL,4,INTEGER,10,null,0,10,1,,20,null,null,null,2,YES
+,APP,ALLTYPES,BIGINTCOL,-5,BIGINT,19,null,0,10,1,,null,null,null,null,3,YES
 ,APP,ALLTYPES,REALCOL,7,REAL,23,null,null,2,1,,null,null,null,null,4,YES
 ,APP,ALLTYPES,DOUBLEPRECCOL,8,DOUBLE,52,null,null,2,1,,10,null,null,null,5,YES
 ,APP,ALLTYPES,DECIMALCOL10P4S,3,DECIMAL,10,null,4,10,1,,null,null,null,null,6,YES
 ,APP,ALLTYPES,NUMERICCOL20P2S,2,NUMERIC,20,null,2,10,1,,null,null,null,null,7,YES
-,APP,ALLTYPES,CHAR8COL___,1,CHAR,8,null,null,10,1,,null,null,null,16,8,YES
-,APP,ALLTYPES,VARCHAR9COL,12,VARCHAR,9,null,null,10,1,,null,null,null,18,9,YES
-,APP,ALLTYPES,LONGVARCHARCOL,-1,LONG VARCHAR,32700,null,null,10,1,,null,null,null,null,10,YES
-,APP,ALLTYPES,BLOBCOL,2004,BLOB,3072,null,null,10,1,,null,null,null,null,11,YES
+,APP,ALLTYPES,CHAR8COL___,1,CHAR,8,null,null,null,1,,null,null,null,16,8,YES
+,APP,ALLTYPES,VARCHAR9COL,12,VARCHAR,9,null,null,null,1,,null,null,null,18,9,YES
+,APP,ALLTYPES,LONGVARCHARCOL,-1,LONG VARCHAR,32700,null,null,null,1,,null,null,null,null,10,YES
+,APP,ALLTYPES,BLOBCOL,2004,BLOB,3072,null,null,null,1,,null,null,null,null,11,YES
 getColumns('LOUIE'):
 TABLE_CAT[VARCHAR],TABLE_SCHEM[VARCHAR],TABLE_NAME[VARCHAR],COLUMN_NAME[VARCHAR],DATA_TYPE[SMALLINT],TYPE_NAME[VARCHAR],COLUMN_SIZE[INTEGER],BUFFER_LENGTH[INTEGER],DECIMAL_DIGITS[INTEGER],NUM_PREC_RADIX[INTEGER],NULLABLE[INTEGER],REMARKS[VARCHAR],COLUMN_DEF[VARCHAR],SQL_DATA_TYPE[INTEGER],SQL_DATETIME_SUB[INTEGER],CHAR_OCTET_LENGTH[INTEGER],ORDINAL_POSITION[INTEGER],IS_NULLABLE[VARCHAR]
-,APP,LOUIE,I,4,INTEGER,10,null,null,10,0,,10,null,null,null,1,NO
-,APP,LOUIE,S,5,SMALLINT,5,null,null,10,0,,null,null,null,null,2,NO
-,APP,LOUIE,C30,1,CHAR,30,null,null,10,0,,null,null,null,60,3,NO
-,APP,LOUIE,VC10,12,VARCHAR,10,null,null,10,0,,'asdf',null,null,20,4,NO
-,APP,LOUIE,AI,-5,BIGINT,19,null,null,10,0,,AUTOINCREMENT: start -10 increment 2001,null,null,null,5,NO
+,APP,LOUIE,I,4,INTEGER,10,null,0,10,0,,10,null,null,null,1,NO
+,APP,LOUIE,S,5,SMALLINT,5,null,0,10,0,,null,null,null,null,2,NO
+,APP,LOUIE,C30,1,CHAR,30,null,null,null,0,,null,null,null,60,3,NO
+,APP,LOUIE,VC10,12,VARCHAR,10,null,null,null,0,,'asdf',null,null,20,4,NO
+,APP,LOUIE,AI,-5,BIGINT,19,null,0,10,0,,AUTOINCREMENT: start -10 increment 2001,null,null,null,5,NO
 getColumns('INFLIGHT'):
 TABLE_CAT[VARCHAR],TABLE_SCHEM[VARCHAR],TABLE_NAME[VARCHAR],COLUMN_NAME[VARCHAR],DATA_TYPE[SMALLINT],TYPE_NAME[VARCHAR],COLUMN_SIZE[INTEGER],BUFFER_LENGTH[INTEGER],DECIMAL_DIGITS[INTEGER],NUM_PREC_RADIX[INTEGER],NULLABLE[INTEGER],REMARKS[VARCHAR],COLUMN_DEF[VARCHAR],SQL_DATA_TYPE[INTEGER],SQL_DATETIME_SUB[INTEGER],CHAR_OCTET_LENGTH[INTEGER],ORDINAL_POSITION[INTEGER],IS_NULLABLE[VARCHAR]
-,APP,INFLIGHT,FLT_NUM,1,CHAR,20,null,null,10,0,,null,null,null,40,1,NO
-,APP,INFLIGHT,FLT_ORIGIN,1,CHAR,6,null,null,10,1,,null,null,null,12,2,YES
-,APP,INFLIGHT,FLT_DEST,1,CHAR,6,null,null,10,1,,null,null,null,12,3,YES
-,APP,INFLIGHT,FLT_AIRCRAFT,1,CHAR,20,null,null,10,1,,null,null,null,40,4,YES
-,APP,INFLIGHT,FLT_FLYING_TIME,12,VARCHAR,22,null,null,10,1,,null,null,null,44,5,YES
-,APP,INFLIGHT,FLT_DEPT_TIME,1,CHAR,8,null,null,10,1,,null,null,null,16,6,YES
-,APP,INFLIGHT,FLT_ARR_TIME,1,CHAR,8,null,null,10,1,,null,null,null,16,7,YES
-,APP,INFLIGHT,FLT_NOTES,12,VARCHAR,510,null,null,10,1,,null,null,null,1020,8,YES
-,APP,INFLIGHT,FLT_DAYS_OF_WK,1,CHAR,14,null,null,10,1,,null,null,null,28,9,YES
-,APP,INFLIGHT,FLT_CRAFT_PIC,12,VARCHAR,32672,null,null,10,1,,null,null,null,65344,10,YES
+,APP,INFLIGHT,FLT_NUM,1,CHAR,20,null,null,null,0,,null,null,null,40,1,NO
+,APP,INFLIGHT,FLT_ORIGIN,1,CHAR,6,null,null,null,1,,null,null,null,12,2,YES
+,APP,INFLIGHT,FLT_DEST,1,CHAR,6,null,null,null,1,,null,null,null,12,3,YES
+,APP,INFLIGHT,FLT_AIRCRAFT,1,CHAR,20,null,null,null,1,,null,null,null,40,4,YES
+,APP,INFLIGHT,FLT_FLYING_TIME,12,VARCHAR,22,null,null,null,1,,null,null,null,44,5,YES
+,APP,INFLIGHT,FLT_DEPT_TIME,1,CHAR,8,null,null,null,1,,null,null,null,16,6,YES
+,APP,INFLIGHT,FLT_ARR_TIME,1,CHAR,8,null,null,null,1,,null,null,null,16,7,YES
+,APP,INFLIGHT,FLT_NOTES,12,VARCHAR,510,null,null,null,1,,null,null,null,1020,8,YES
+,APP,INFLIGHT,FLT_DAYS_OF_WK,1,CHAR,14,null,null,null,1,,null,null,null,28,9,YES
+,APP,INFLIGHT,FLT_CRAFT_PIC,12,VARCHAR,32672,null,null,null,1,,null,null,null,65344,10,YES
 getColumnPrivileges():
 TABLE_CAT[VARCHAR],TABLE_SCHEM[VARCHAR],TABLE_NAME[VARCHAR],COLUMN_NAME[VARCHAR],GRANTOR[VARCHAR],GRANTEE[VARCHAR],PRIVILEGE[VARCHAR],IS_GRANTABLE[VARCHAR]
 getTablePrivileges():
@@ -278,10 +278,10 @@
 getBestRowIdentifier("",null,"LOUIE"):
 SCOPE[SMALLINT],COLUMN_NAME[VARCHAR],DATA_TYPE[SMALLINT],TYPE_NAME[VARCHAR],COLUMN_SIZE[INTEGER],BUFFER_LENGTH[INTEGER],DECIMAL_DIGITS[SMALLINT],PSEUDO_COLUMN[SMALLINT]
 2,I,4,INTEGER,4,null,10,1
-2,VC10,12,VARCHAR,10,null,0,1
+2,VC10,12,VARCHAR,10,null,null,1
 getBestRowIdentifier("","SYS","SYSTABLES"):
 SCOPE[SMALLINT],COLUMN_NAME[VARCHAR],DATA_TYPE[SMALLINT],TYPE_NAME[VARCHAR],COLUMN_SIZE[INTEGER],BUFFER_LENGTH[INTEGER],DECIMAL_DIGITS[SMALLINT],PSEUDO_COLUMN[SMALLINT]
-2,TABLEID,1,CHAR,36,null,0,1
+2,TABLEID,1,CHAR,36,null,null,1
 getVersionColumns():
 SCOPE[INTEGER],COLUMN_NAME[VARCHAR],DATA_TYPE[INTEGER],TYPE_NAME[VARCHAR],COLUMN_SIZE[INTEGER],BUFFER_LENGTH[INTEGER],DECIMAL_DIGITS[INTEGER],PSEUDO_COLUMN[INTEGER]
 getPrimaryKeys():
@@ -369,25 +369,25 @@
 getTypeInfo():
 TYPE_NAME[VARCHAR],DATA_TYPE[SMALLINT],PRECISION[INTEGER],LITERAL_PREFIX[VARCHAR],LITERAL_SUFFIX[VARCHAR],CREATE_PARAMS[VARCHAR],NULLABLE[INTEGER],CASE_SENSITIVE[SMALLINT],SEARCHABLE[INTEGER],UNSIGNED_ATTRIBUTE[SMALLINT],FIXED_PREC_SCALE[SMALLINT],AUTO_INCREMENT[SMALLINT],LOCAL_TYPE_NAME[VARCHAR],MINIMUM_SCALE[INTEGER],MAXIMUM_SCALE[INTEGER],SQL_DATA_TYPE[INTEGER],SQL_DATETIME_SUB[INTEGER],NUM_PREC_RADIX[INTEGER]
 BIGINT,-5,19,null,null,null,1,0,2,0,0,1,BIGINT,0,0,null,null,10
-LONG VARCHAR FOR BIT DATA,-4,32700,X',',null,1,0,2,1,0,0,LONG VARCHAR FOR BIT DATA,0,0,null,null,0
-VARCHAR () FOR BIT DATA,-3,32762,X',',length,1,0,2,1,0,0,VARCHAR () FOR BIT DATA,0,0,null,null,2
-CHAR () FOR BIT DATA,-2,254,X',',length,1,0,2,1,0,0,CHAR () FOR BIT DATA,0,0,null,null,2
-LONG VARCHAR,-1,32700,',',null,1,1,3,1,0,0,LONG VARCHAR,0,0,null,null,0
-LONG NVARCHAR,-1,32700,',',null,1,1,3,1,0,0,LONG NVARCHAR,0,0,null,null,0
-CHAR,1,254,',',length,1,1,3,1,0,0,CHAR,0,0,null,null,0
-NATIONAL CHAR,1,2147483647,',',length,1,1,3,1,0,0,NATIONAL CHAR,0,0,null,null,0
+LONG VARCHAR FOR BIT DATA,-4,32700,X',',null,1,0,2,1,0,0,LONG VARCHAR FOR BIT DATA,null,null,null,null,null
+VARCHAR () FOR BIT DATA,-3,32762,X',',length,1,0,2,1,0,0,VARCHAR () FOR BIT DATA,null,null,null,null,null
+CHAR () FOR BIT DATA,-2,254,X',',length,1,0,2,1,0,0,CHAR () FOR BIT DATA,null,null,null,null,null
+LONG VARCHAR,-1,32700,',',null,1,1,3,1,0,0,LONG VARCHAR,null,null,null,null,null
+LONG NVARCHAR,-1,32700,',',null,1,1,3,1,0,0,LONG NVARCHAR,null,null,null,null,null
+CHAR,1,254,',',length,1,1,3,1,0,0,CHAR,null,null,null,null,null
+NATIONAL CHAR,1,2147483647,',',length,1,1,3,1,0,0,NATIONAL CHAR,null,null,null,null,null
 NUMERIC,2,31,null,null,precision,scale,1,0,2,0,1,0,NUMERIC,0,32767,null,null,10
 DECIMAL,3,31,null,null,precision,scale,1,0,2,0,1,0,DECIMAL,0,32767,null,null,10
 INTEGER,4,10,null,null,null,1,0,2,0,0,1,INTEGER,0,0,null,null,10
 SMALLINT,5,5,null,null,null,1,0,2,0,0,1,SMALLINT,0,0,null,null,10
-FLOAT,6,52,null,null,precision,1,0,2,0,0,0,FLOAT,0,0,null,null,2
-REAL,7,23,null,null,null,1,0,2,0,0,0,REAL,0,0,null,null,2
-DOUBLE,8,52,null,null,null,1,0,2,0,0,0,DOUBLE,0,0,null,null,2
-VARCHAR,12,32672,',',length,1,1,3,1,0,0,VARCHAR,0,0,null,null,0
-NATIONAL CHAR VARYING,12,2147483647,',',length,1,1,3,1,0,0,NATIONAL CHAR VARYING,0,0,null,null,0
-DATE,91,10,DATE',',null,1,0,2,1,0,0,DATE,0,0,null,null,0
-TIME,92,0,TIME',',null,1,0,2,1,0,0,TIME,0,0,null,null,0
-TIMESTAMP,93,0,TIMESTAMP',',null,1,0,2,1,0,0,TIMESTAMP,0,0,null,null,0
+FLOAT,6,52,null,null,precision,1,0,2,0,0,0,FLOAT,null,null,null,null,2
+REAL,7,23,null,null,null,1,0,2,0,0,0,REAL,null,null,null,null,2
+DOUBLE,8,52,null,null,null,1,0,2,0,0,0,DOUBLE,null,null,null,null,2
+VARCHAR,12,32672,',',length,1,1,3,1,0,0,VARCHAR,null,null,null,null,null
+NATIONAL CHAR VARYING,12,2147483647,',',length,1,1,3,1,0,0,NATIONAL CHAR VARYING,null,null,null,null,null
+DATE,91,10,DATE',',null,1,0,2,1,0,0,DATE,0,0,null,null,10
+TIME,92,0,TIME',',null,1,0,2,1,0,0,TIME,0,0,null,null,10
+TIMESTAMP,93,0,TIMESTAMP',',null,1,0,2,1,0,0,TIMESTAMP,0,0,null,null,10
 BLOB,2004,2147483647,null,null,length,1,0,1,null,0,null,BLOB,null,null,null,null,null
 CLOB,2005,2147483647,',',length,1,1,1,null,0,null,CLOB,null,null,null,null,null
 getIndexInfo():
@@ -406,11 +406,11 @@
 ,SYS,SYSTABLES,0,,SYSTABLES_INDEX2,3,1,TABLEID,A,null,null,null
 getColumns('SYSTABLES'):
 TABLE_CAT[VARCHAR],TABLE_SCHEM[VARCHAR],TABLE_NAME[VARCHAR],COLUMN_NAME[VARCHAR],DATA_TYPE[SMALLINT],TYPE_NAME[VARCHAR],COLUMN_SIZE[INTEGER],BUFFER_LENGTH[INTEGER],DECIMAL_DIGITS[INTEGER],NUM_PREC_RADIX[INTEGER],NULLABLE[INTEGER],REMARKS[VARCHAR],COLUMN_DEF[VARCHAR],SQL_DATA_TYPE[INTEGER],SQL_DATETIME_SUB[INTEGER],CHAR_OCTET_LENGTH[INTEGER],ORDINAL_POSITION[INTEGER],IS_NULLABLE[VARCHAR]
-,SYS,SYSTABLES,TABLEID,1,CHAR,36,null,null,10,0,,null,null,null,72,1,NO
-,SYS,SYSTABLES,TABLENAME,12,VARCHAR,128,null,null,10,0,,null,null,null,256,2,NO
-,SYS,SYSTABLES,TABLETYPE,1,CHAR,1,null,null,10,0,,null,null,null,2,3,NO
-,SYS,SYSTABLES,SCHEMAID,1,CHAR,36,null,null,10,0,,null,null,null,72,4,NO
-,SYS,SYSTABLES,LOCKGRANULARITY,1,CHAR,1,null,null,10,0,,null,null,null,2,5,NO
+,SYS,SYSTABLES,TABLEID,1,CHAR,36,null,null,null,0,,null,null,null,72,1,NO
+,SYS,SYSTABLES,TABLENAME,12,VARCHAR,128,null,null,null,0,,null,null,null,256,2,NO
+,SYS,SYSTABLES,TABLETYPE,1,CHAR,1,null,null,null,0,,null,null,null,2,3,NO
+,SYS,SYSTABLES,SCHEMAID,1,CHAR,36,null,null,null,0,,null,null,null,72,4,NO
+,SYS,SYSTABLES,LOCKGRANULARITY,1,CHAR,1,null,null,null,0,,null,null,null,2,5,NO
 -----
 Referential action values
 RESTRICT = 1
Index: java/testing/org/apache/derbyTesting/functionTests/master/forbitdata.out
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/master/forbitdata.out	(revision 153297)
+++ java/testing/org/apache/derbyTesting/functionTests/master/forbitdata.out	(working copy)
@@ -17,14 +17,14 @@
 CREATE TABLE FBDOK.T006 (C006 VARCHAR(100) FOR BIT DATA)
 CREATE TABLE FBDOK.T007 (C007 VARCHAR(32672) FOR BIT DATA)
 CREATE TABLE FBDOK.T008 (C008 LONG VARCHAR FOR BIT DATA)
-FBDOK,T001,C001,-2,CHAR () FOR BIT DATA,1,null,10,1,null,null,1,YES
-FBDOK,T002,C002,-2,CHAR () FOR BIT DATA,1,null,10,1,null,null,1,YES
-FBDOK,T003,C003,-2,CHAR () FOR BIT DATA,10,null,10,1,null,null,1,YES
-FBDOK,T004,C004,-2,CHAR () FOR BIT DATA,254,null,10,1,null,null,1,YES
-FBDOK,T005,C005,-3,VARCHAR () FOR BIT DATA,1,null,10,1,null,null,1,YES
-FBDOK,T006,C006,-3,VARCHAR () FOR BIT DATA,100,null,10,1,null,null,1,YES
-FBDOK,T007,C007,-3,VARCHAR () FOR BIT DATA,32672,null,10,1,null,null,1,YES
-FBDOK,T008,C008,-4,LONG VARCHAR FOR BIT DATA,32700,null,10,1,null,null,1,YES
+FBDOK,T001,C001,-2,CHAR () FOR BIT DATA,1,null,null,1,null,null,1,YES
+FBDOK,T002,C002,-2,CHAR () FOR BIT DATA,1,null,null,1,null,null,1,YES
+FBDOK,T003,C003,-2,CHAR () FOR BIT DATA,10,null,null,1,null,null,1,YES
+FBDOK,T004,C004,-2,CHAR () FOR BIT DATA,254,null,null,1,null,null,1,YES
+FBDOK,T005,C005,-3,VARCHAR () FOR BIT DATA,1,null,null,1,null,null,1,YES
+FBDOK,T006,C006,-3,VARCHAR () FOR BIT DATA,100,null,null,1,null,null,1,YES
+FBDOK,T007,C007,-3,VARCHAR () FOR BIT DATA,32672,null,null,1,null,null,1,YES
+FBDOK,T008,C008,-4,LONG VARCHAR FOR BIT DATA,32700,null,null,1,null,null,1,YES
 TABLE FBDOK.T001
   C001 CHAR () FOR BIT DATA precision 1
 TABLE FBDOK.T002
Index: java/testing/org/apache/derbyTesting/functionTests/master/xaSimplePositive.out
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/master/xaSimplePositive.out	(revision 153297)
+++ java/testing/org/apache/derbyTesting/functionTests/master/xaSimplePositive.out	(working copy)
@@ -90,10 +90,24 @@
 -------------------------------------------------------------
 (1  |PREPARED|false|SKU       |UserTransaction               
 (2  |PREPARED|false|SKU       |UserTransaction               
-ij(XA)&gt; xa_recover xa_startrscan;
+ij(XA)&gt; -- NOTE: The following call to "xa_recover xa_startrscan" is apt to
+-- return the result set rows in reverse order when changes to
+-- the Derby engine affect the number of transactions that it takes
+-- to create a database.  The transactions are stored in a hash table
+-- based on a global and local id, and when the number of transactions
+-- changes, the (internal) local id can change, which may lead to a
+-- change in the result set order.  This order is determined by the
+-- JVM's hashing algorithm. Examples of changes to the engine that
+-- can affect this include ones that cause more commits or that
+-- change the amount of data being stored, such as changes to the
+-- metadata statements (which is what prompted this explanation in
+-- the first place).  Ultimately, the problem is that there is no
+-- way to order the return values from "xa_recover" since it is an
+-- ij internal statement, not SQL...
+xa_recover xa_startrscan;
 Recovered 2 in doubt transactions
-Transaction 1 : (2,FILTERED,FILTERED)
-Transaction 2 : (1,FILTERED,FILTERED)
+Transaction 1 : (1,FILTERED,FILTERED)
+Transaction 2 : (2,FILTERED,FILTERED)
 ij(XA)&gt; xa_recover xa_noflags;
 Recovered 0 in doubt transactions
 ij(XA)&gt; xa_commit xa_2Phase 1;
Index: java/testing/org/apache/derbyTesting/functionTests/master/metadata.out
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/master/metadata.out	(revision 153297)
+++ java/testing/org/apache/derbyTesting/functionTests/master/metadata.out	(working copy)
@@ -154,24 +154,24 @@
 getConnection(): same connection
 getProcedureColumns():
 PROCEDURE_CAT[VARCHAR],PROCEDURE_SCHEM[VARCHAR],PROCEDURE_NAME[VARCHAR],COLUMN_NAME[VARCHAR],COLUMN_TYPE[SMALLINT],DATA_TYPE[SMALLINT],TYPE_NAME[VARCHAR],PRECISION[INTEGER],LENGTH[INTEGER],SCALE[SMALLINT],RADIX[SMALLINT],NULLABLE[SMALLINT],REMARKS[VARCHAR],METHOD_ID[SMALLINT],PARAMETER_ID[SMALLINT]
-null,APP,GETPCTEST1,OUTB,4,12,VARCHAR,3,3,0,10,1,null,12,0
-null,APP,GETPCTEST1,A,1,12,VARCHAR,3,3,0,10,1,null,12,1
+null,APP,GETPCTEST1,OUTB,4,12,VARCHAR,3,3,null,null,1,null,12,0
+null,APP,GETPCTEST1,A,1,12,VARCHAR,3,3,null,null,1,null,12,1
 null,APP,GETPCTEST1,B,1,2,NUMERIC,5,6,0,10,1,null,12,2
 null,APP,GETPCTEST1,C,1,5,SMALLINT,5,2,0,10,1,null,12,3
 null,APP,GETPCTEST1,E,1,5,SMALLINT,5,2,0,10,1,null,12,4
 null,APP,GETPCTEST1,F,1,4,INTEGER,10,4,0,10,1,null,12,5
 null,APP,GETPCTEST1,G,1,-5,BIGINT,19,8,0,10,1,null,12,6
-null,APP,GETPCTEST1,H,1,8,DOUBLE,52,8,0,2,1,null,12,7
-null,APP,GETPCTEST1,I,1,8,DOUBLE,52,8,0,2,1,null,12,8
+null,APP,GETPCTEST1,H,1,8,DOUBLE,52,8,null,2,1,null,12,7
+null,APP,GETPCTEST1,I,1,8,DOUBLE,52,8,null,2,1,null,12,8
 null,APP,GETPCTEST1,K,1,91,DATE,10,-1,0,10,1,null,12,9
 null,APP,GETPCTEST1,L,1,92,TIME,8,-1,0,10,1,null,12,10
 null,APP,GETPCTEST1,T,1,93,TIMESTAMP,26,-1,0,10,1,null,12,11
 null,APP,GETPCTEST2,PA,1,4,INTEGER,10,4,0,10,1,null,2,0
 null,APP,GETPCTEST2,PB,1,-5,BIGINT,19,8,0,10,1,null,2,1
-null,APP,GETPCTEST3A,STRING1,1,12,VARCHAR,5,5,0,10,1,null,2,0
-null,APP,GETPCTEST3A,STRING2,4,12,VARCHAR,5,5,0,10,1,null,2,1
-null,APP,GETPCTEST3B,STRING3,1,12,VARCHAR,5,5,0,10,1,null,2,0
-null,APP,GETPCTEST3B,STRING4,2,12,VARCHAR,5,5,0,10,1,null,2,1
+null,APP,GETPCTEST3A,STRING1,1,12,VARCHAR,5,5,null,null,1,null,2,0
+null,APP,GETPCTEST3A,STRING2,4,12,VARCHAR,5,5,null,null,1,null,2,1
+null,APP,GETPCTEST3B,STRING3,1,12,VARCHAR,5,5,null,null,1,null,2,0
+null,APP,GETPCTEST3B,STRING4,2,12,VARCHAR,5,5,null,null,1,null,2,1
 null,APP,GETPCTEST4BX,RETPARAM,4,4,INTEGER,10,4,0,10,1,null,1,0
 getTables() with TABLE_TYPE in ('SYSTEM TABLE') :
 TABLE_CAT[VARCHAR],TABLE_SCHEM[VARCHAR],TABLE_NAME[VARCHAR],TABLE_TYPE[VARCHAR],REMARKS[VARCHAR]
@@ -234,43 +234,43 @@
 TABLE_CAT[VARCHAR],TABLE_SCHEM[VARCHAR],TABLE_NAME[VARCHAR],COLUMN_NAME[VARCHAR],DATA_TYPE[SMALLINT],TYPE_NAME[VARCHAR],COLUMN_SIZE[INTEGER],BUFFER_LENGTH[INTEGER],DECIMAL_DIGITS[INTEGER],NUM_PREC_RADIX[INTEGER],NULLABLE[INTEGER],REMARKS[VARCHAR],COLUMN_DEF[VARCHAR],SQL_DATA_TYPE[INTEGER],SQL_DATETIME_SUB[INTEGER],CHAR_OCTET_LENGTH[INTEGER],ORDINAL_POSITION[INTEGER],IS_NULLABLE[VARCHAR]
 getColumns('SYSTABLES'):
 TABLE_CAT[VARCHAR],TABLE_SCHEM[VARCHAR],TABLE_NAME[VARCHAR],COLUMN_NAME[VARCHAR],DATA_TYPE[SMALLINT],TYPE_NAME[VARCHAR],COLUMN_SIZE[INTEGER],BUFFER_LENGTH[INTEGER],DECIMAL_DIGITS[INTEGER],NUM_PREC_RADIX[INTEGER],NULLABLE[INTEGER],REMARKS[VARCHAR],COLUMN_DEF[VARCHAR],SQL_DATA_TYPE[INTEGER],SQL_DATETIME_SUB[INTEGER],CHAR_OCTET_LENGTH[INTEGER],ORDINAL_POSITION[INTEGER],IS_NULLABLE[VARCHAR]
-,SYS,SYSTABLES,TABLEID,1,CHAR,36,null,null,10,0,,null,null,null,72,1,NO
-,SYS,SYSTABLES,TABLENAME,12,VARCHAR,128,null,null,10,0,,null,null,null,256,2,NO
-,SYS,SYSTABLES,TABLETYPE,1,CHAR,1,null,null,10,0,,null,null,null,2,3,NO
-,SYS,SYSTABLES,SCHEMAID,1,CHAR,36,null,null,10,0,,null,null,null,72,4,NO
-,SYS,SYSTABLES,LOCKGRANULARITY,1,CHAR,1,null,null,10,0,,null,null,null,2,5,NO
+,SYS,SYSTABLES,TABLEID,1,CHAR,36,null,null,null,0,,null,null,null,72,1,NO
+,SYS,SYSTABLES,TABLENAME,12,VARCHAR,128,null,null,null,0,,null,null,null,256,2,NO
+,SYS,SYSTABLES,TABLETYPE,1,CHAR,1,null,null,null,0,,null,null,null,2,3,NO
+,SYS,SYSTABLES,SCHEMAID,1,CHAR,36,null,null,null,0,,null,null,null,72,4,NO
+,SYS,SYSTABLES,LOCKGRANULARITY,1,CHAR,1,null,null,null,0,,null,null,null,2,5,NO
 getColumns('ALLTYPES'):
 TABLE_CAT[VARCHAR],TABLE_SCHEM[VARCHAR],TABLE_NAME[VARCHAR],COLUMN_NAME[VARCHAR],DATA_TYPE[SMALLINT],TYPE_NAME[VARCHAR],COLUMN_SIZE[INTEGER],BUFFER_LENGTH[INTEGER],DECIMAL_DIGITS[INTEGER],NUM_PREC_RADIX[INTEGER],NULLABLE[INTEGER],REMARKS[VARCHAR],COLUMN_DEF[VARCHAR],SQL_DATA_TYPE[INTEGER],SQL_DATETIME_SUB[INTEGER],CHAR_OCTET_LENGTH[INTEGER],ORDINAL_POSITION[INTEGER],IS_NULLABLE[VARCHAR]
-,APP,ALLTYPES,SMALLINTCOL,5,SMALLINT,5,null,null,10,1,,null,null,null,null,1,YES
-,APP,ALLTYPES,INTCOL,4,INTEGER,10,null,null,10,1,,20,null,null,null,2,YES
-,APP,ALLTYPES,BIGINTCOL,-5,BIGINT,19,null,null,10,1,,null,null,null,null,3,YES
+,APP,ALLTYPES,SMALLINTCOL,5,SMALLINT,5,null,0,10,1,,null,null,null,null,1,YES
+,APP,ALLTYPES,INTCOL,4,INTEGER,10,null,0,10,1,,20,null,null,null,2,YES
+,APP,ALLTYPES,BIGINTCOL,-5,BIGINT,19,null,0,10,1,,null,null,null,null,3,YES
 ,APP,ALLTYPES,REALCOL,7,REAL,23,null,null,2,1,,null,null,null,null,4,YES
 ,APP,ALLTYPES,DOUBLEPRECCOL,8,DOUBLE,52,null,null,2,1,,10,null,null,null,5,YES
 ,APP,ALLTYPES,DECIMALCOL10P4S,3,DECIMAL,10,null,4,10,1,,null,null,null,null,6,YES
 ,APP,ALLTYPES,NUMERICCOL20P2S,2,NUMERIC,20,null,2,10,1,,null,null,null,null,7,YES
-,APP,ALLTYPES,CHAR8COL___,1,CHAR,8,null,null,10,1,,null,null,null,16,8,YES
-,APP,ALLTYPES,VARCHAR9COL,12,VARCHAR,9,null,null,10,1,,null,null,null,18,9,YES
-,APP,ALLTYPES,LONGVARCHARCOL,-1,LONG VARCHAR,32700,null,null,10,1,,null,null,null,null,10,YES
-,APP,ALLTYPES,BLOBCOL,2004,BLOB,3072,null,null,10,1,,null,null,null,null,11,YES
+,APP,ALLTYPES,CHAR8COL___,1,CHAR,8,null,null,null,1,,null,null,null,16,8,YES
+,APP,ALLTYPES,VARCHAR9COL,12,VARCHAR,9,null,null,null,1,,null,null,null,18,9,YES
+,APP,ALLTYPES,LONGVARCHARCOL,-1,LONG VARCHAR,32700,null,null,null,1,,null,null,null,null,10,YES
+,APP,ALLTYPES,BLOBCOL,2004,BLOB,3072,null,null,null,1,,null,null,null,null,11,YES
 getColumns('LOUIE'):
 TABLE_CAT[VARCHAR],TABLE_SCHEM[VARCHAR],TABLE_NAME[VARCHAR],COLUMN_NAME[VARCHAR],DATA_TYPE[SMALLINT],TYPE_NAME[VARCHAR],COLUMN_SIZE[INTEGER],BUFFER_LENGTH[INTEGER],DECIMAL_DIGITS[INTEGER],NUM_PREC_RADIX[INTEGER],NULLABLE[INTEGER],REMARKS[VARCHAR],COLUMN_DEF[VARCHAR],SQL_DATA_TYPE[INTEGER],SQL_DATETIME_SUB[INTEGER],CHAR_OCTET_LENGTH[INTEGER],ORDINAL_POSITION[INTEGER],IS_NULLABLE[VARCHAR]
-,APP,LOUIE,I,4,INTEGER,10,null,null,10,0,,10,null,null,null,1,NO
-,APP,LOUIE,S,5,SMALLINT,5,null,null,10,0,,null,null,null,null,2,NO
-,APP,LOUIE,C30,1,CHAR,30,null,null,10,0,,null,null,null,60,3,NO
-,APP,LOUIE,VC10,12,VARCHAR,10,null,null,10,0,,'asdf',null,null,20,4,NO
-,APP,LOUIE,AI,-5,BIGINT,19,null,null,10,0,,AUTOINCREMENT: start -10 increment 2001,null,null,null,5,NO
+,APP,LOUIE,I,4,INTEGER,10,null,0,10,0,,10,null,null,null,1,NO
+,APP,LOUIE,S,5,SMALLINT,5,null,0,10,0,,null,null,null,null,2,NO
+,APP,LOUIE,C30,1,CHAR,30,null,null,null,0,,null,null,null,60,3,NO
+,APP,LOUIE,VC10,12,VARCHAR,10,null,null,null,0,,'asdf',null,null,20,4,NO
+,APP,LOUIE,AI,-5,BIGINT,19,null,0,10,0,,AUTOINCREMENT: start -10 increment 2001,null,null,null,5,NO
 getColumns('INFLIGHT'):
 TABLE_CAT[VARCHAR],TABLE_SCHEM[VARCHAR],TABLE_NAME[VARCHAR],COLUMN_NAME[VARCHAR],DATA_TYPE[SMALLINT],TYPE_NAME[VARCHAR],COLUMN_SIZE[INTEGER],BUFFER_LENGTH[INTEGER],DECIMAL_DIGITS[INTEGER],NUM_PREC_RADIX[INTEGER],NULLABLE[INTEGER],REMARKS[VARCHAR],COLUMN_DEF[VARCHAR],SQL_DATA_TYPE[INTEGER],SQL_DATETIME_SUB[INTEGER],CHAR_OCTET_LENGTH[INTEGER],ORDINAL_POSITION[INTEGER],IS_NULLABLE[VARCHAR]
-,APP,INFLIGHT,FLT_NUM,1,CHAR,20,null,null,10,0,,null,null,null,40,1,NO
-,APP,INFLIGHT,FLT_ORIGIN,1,CHAR,6,null,null,10,1,,null,null,null,12,2,YES
-,APP,INFLIGHT,FLT_DEST,1,CHAR,6,null,null,10,1,,null,null,null,12,3,YES
-,APP,INFLIGHT,FLT_AIRCRAFT,1,CHAR,20,null,null,10,1,,null,null,null,40,4,YES
-,APP,INFLIGHT,FLT_FLYING_TIME,12,VARCHAR,22,null,null,10,1,,null,null,null,44,5,YES
-,APP,INFLIGHT,FLT_DEPT_TIME,1,CHAR,8,null,null,10,1,,null,null,null,16,6,YES
-,APP,INFLIGHT,FLT_ARR_TIME,1,CHAR,8,null,null,10,1,,null,null,null,16,7,YES
-,APP,INFLIGHT,FLT_NOTES,12,VARCHAR,510,null,null,10,1,,null,null,null,1020,8,YES
-,APP,INFLIGHT,FLT_DAYS_OF_WK,1,CHAR,14,null,null,10,1,,null,null,null,28,9,YES
-,APP,INFLIGHT,FLT_CRAFT_PIC,12,VARCHAR,32672,null,null,10,1,,null,null,null,65344,10,YES
+,APP,INFLIGHT,FLT_NUM,1,CHAR,20,null,null,null,0,,null,null,null,40,1,NO
+,APP,INFLIGHT,FLT_ORIGIN,1,CHAR,6,null,null,null,1,,null,null,null,12,2,YES
+,APP,INFLIGHT,FLT_DEST,1,CHAR,6,null,null,null,1,,null,null,null,12,3,YES
+,APP,INFLIGHT,FLT_AIRCRAFT,1,CHAR,20,null,null,null,1,,null,null,null,40,4,YES
+,APP,INFLIGHT,FLT_FLYING_TIME,12,VARCHAR,22,null,null,null,1,,null,null,null,44,5,YES
+,APP,INFLIGHT,FLT_DEPT_TIME,1,CHAR,8,null,null,null,1,,null,null,null,16,6,YES
+,APP,INFLIGHT,FLT_ARR_TIME,1,CHAR,8,null,null,null,1,,null,null,null,16,7,YES
+,APP,INFLIGHT,FLT_NOTES,12,VARCHAR,510,null,null,null,1,,null,null,null,1020,8,YES
+,APP,INFLIGHT,FLT_DAYS_OF_WK,1,CHAR,14,null,null,null,1,,null,null,null,28,9,YES
+,APP,INFLIGHT,FLT_CRAFT_PIC,12,VARCHAR,32672,null,null,null,1,,null,null,null,65344,10,YES
 getColumnPrivileges():
 TABLE_CAT[VARCHAR],TABLE_SCHEM[VARCHAR],TABLE_NAME[VARCHAR],COLUMN_NAME[VARCHAR],GRANTOR[VARCHAR],GRANTEE[VARCHAR],PRIVILEGE[VARCHAR],IS_GRANTABLE[VARCHAR]
 getTablePrivileges():
@@ -278,10 +278,10 @@
 getBestRowIdentifier("",null,"LOUIE"):
 SCOPE[SMALLINT],COLUMN_NAME[VARCHAR],DATA_TYPE[SMALLINT],TYPE_NAME[VARCHAR],COLUMN_SIZE[INTEGER],BUFFER_LENGTH[INTEGER],DECIMAL_DIGITS[SMALLINT],PSEUDO_COLUMN[SMALLINT]
 2,I,4,INTEGER,4,null,10,1
-2,VC10,12,VARCHAR,10,null,0,1
+2,VC10,12,VARCHAR,10,null,null,1
 getBestRowIdentifier("","SYS","SYSTABLES"):
 SCOPE[SMALLINT],COLUMN_NAME[VARCHAR],DATA_TYPE[SMALLINT],TYPE_NAME[VARCHAR],COLUMN_SIZE[INTEGER],BUFFER_LENGTH[INTEGER],DECIMAL_DIGITS[SMALLINT],PSEUDO_COLUMN[SMALLINT]
-2,TABLEID,1,CHAR,36,null,0,1
+2,TABLEID,1,CHAR,36,null,null,1
 getVersionColumns():
 SCOPE[INTEGER],COLUMN_NAME[VARCHAR],DATA_TYPE[INTEGER],TYPE_NAME[VARCHAR],COLUMN_SIZE[INTEGER],BUFFER_LENGTH[INTEGER],DECIMAL_DIGITS[INTEGER],PSEUDO_COLUMN[INTEGER]
 getPrimaryKeys():
@@ -369,25 +369,25 @@
 getTypeInfo():
 TYPE_NAME[VARCHAR],DATA_TYPE[SMALLINT],PRECISION[INTEGER],LITERAL_PREFIX[VARCHAR],LITERAL_SUFFIX[VARCHAR],CREATE_PARAMS[VARCHAR],NULLABLE[INTEGER],CASE_SENSITIVE[BOOLEAN],SEARCHABLE[INTEGER],UNSIGNED_ATTRIBUTE[BOOLEAN],FIXED_PREC_SCALE[BOOLEAN],AUTO_INCREMENT[BOOLEAN],LOCAL_TYPE_NAME[VARCHAR],MINIMUM_SCALE[INTEGER],MAXIMUM_SCALE[INTEGER],SQL_DATA_TYPE[INTEGER],SQL_DATETIME_SUB[INTEGER],NUM_PREC_RADIX[INTEGER]
 BIGINT,-5,19,null,null,null,1,false,2,false,false,true,BIGINT,0,0,null,null,10
-LONG VARCHAR FOR BIT DATA,-4,32700,X',',null,1,false,2,true,false,false,LONG VARCHAR FOR BIT DATA,0,0,null,null,0
-VARCHAR () FOR BIT DATA,-3,32762,X',',length,1,false,2,true,false,false,VARCHAR () FOR BIT DATA,0,0,null,null,2
-CHAR () FOR BIT DATA,-2,254,X',',length,1,false,2,true,false,false,CHAR () FOR BIT DATA,0,0,null,null,2
-LONG VARCHAR,-1,32700,',',null,1,true,3,true,false,false,LONG VARCHAR,0,0,null,null,0
-LONG NVARCHAR,-1,32700,',',null,1,true,3,true,false,false,LONG NVARCHAR,0,0,null,null,0
-CHAR,1,254,',',length,1,true,3,true,false,false,CHAR,0,0,null,null,0
-NATIONAL CHAR,1,2147483647,',',length,1,true,3,true,false,false,NATIONAL CHAR,0,0,null,null,0
+LONG VARCHAR FOR BIT DATA,-4,32700,X',',null,1,false,2,true,false,false,LONG VARCHAR FOR BIT DATA,null,null,null,null,null
+VARCHAR () FOR BIT DATA,-3,32762,X',',length,1,false,2,true,false,false,VARCHAR () FOR BIT DATA,null,null,null,null,null
+CHAR () FOR BIT DATA,-2,254,X',',length,1,false,2,true,false,false,CHAR () FOR BIT DATA,null,null,null,null,null
+LONG VARCHAR,-1,32700,',',null,1,true,3,true,false,false,LONG VARCHAR,null,null,null,null,null
+LONG NVARCHAR,-1,32700,',',null,1,true,3,true,false,false,LONG NVARCHAR,null,null,null,null,null
+CHAR,1,254,',',length,1,true,3,true,false,false,CHAR,null,null,null,null,null
+NATIONAL CHAR,1,2147483647,',',length,1,true,3,true,false,false,NATIONAL CHAR,null,null,null,null,null
 NUMERIC,2,31,null,null,precision,scale,1,false,2,false,true,false,NUMERIC,0,32767,null,null,10
 DECIMAL,3,31,null,null,precision,scale,1,false,2,false,true,false,DECIMAL,0,32767,null,null,10
 INTEGER,4,10,null,null,null,1,false,2,false,false,true,INTEGER,0,0,null,null,10
 SMALLINT,5,5,null,null,null,1,false,2,false,false,true,SMALLINT,0,0,null,null,10
-FLOAT,6,52,null,null,precision,1,false,2,false,false,false,FLOAT,0,0,null,null,2
-REAL,7,23,null,null,null,1,false,2,false,false,false,REAL,0,0,null,null,2
-DOUBLE,8,52,null,null,null,1,false,2,false,false,false,DOUBLE,0,0,null,null,2
-VARCHAR,12,32672,',',length,1,true,3,true,false,false,VARCHAR,0,0,null,null,0
-NATIONAL CHAR VARYING,12,2147483647,',',length,1,true,3,true,false,false,NATIONAL CHAR VARYING,0,0,null,null,0
-DATE,91,10,DATE',',null,1,false,2,true,false,false,DATE,0,0,null,null,0
-TIME,92,0,TIME',',null,1,false,2,true,false,false,TIME,0,0,null,null,0
-TIMESTAMP,93,0,TIMESTAMP',',null,1,false,2,true,false,false,TIMESTAMP,0,0,null,null,0
+FLOAT,6,52,null,null,precision,1,false,2,false,false,false,FLOAT,null,null,null,null,2
+REAL,7,23,null,null,null,1,false,2,false,false,false,REAL,null,null,null,null,2
+DOUBLE,8,52,null,null,null,1,false,2,false,false,false,DOUBLE,null,null,null,null,2
+VARCHAR,12,32672,',',length,1,true,3,true,false,false,VARCHAR,null,null,null,null,null
+NATIONAL CHAR VARYING,12,2147483647,',',length,1,true,3,true,false,false,NATIONAL CHAR VARYING,null,null,null,null,null
+DATE,91,10,DATE',',null,1,false,2,true,false,false,DATE,0,0,null,null,10
+TIME,92,0,TIME',',null,1,false,2,true,false,false,TIME,0,0,null,null,10
+TIMESTAMP,93,0,TIMESTAMP',',null,1,false,2,true,false,false,TIMESTAMP,0,0,null,null,10
 BLOB,2004,2147483647,null,null,length,1,false,1,null,false,null,BLOB,null,null,null,null,null
 CLOB,2005,2147483647,',',length,1,true,1,null,false,null,CLOB,null,null,null,null,null
 getIndexInfo():
@@ -406,11 +406,11 @@
 ,SYS,SYSTABLES,false,,SYSTABLES_INDEX2,3,1,TABLEID,A,null,null,null
 getColumns('SYSTABLES'):
 TABLE_CAT[VARCHAR],TABLE_SCHEM[VARCHAR],TABLE_NAME[VARCHAR],COLUMN_NAME[VARCHAR],DATA_TYPE[SMALLINT],TYPE_NAME[VARCHAR],COLUMN_SIZE[INTEGER],BUFFER_LENGTH[INTEGER],DECIMAL_DIGITS[INTEGER],NUM_PREC_RADIX[INTEGER],NULLABLE[INTEGER],REMARKS[VARCHAR],COLUMN_DEF[VARCHAR],SQL_DATA_TYPE[INTEGER],SQL_DATETIME_SUB[INTEGER],CHAR_OCTET_LENGTH[INTEGER],ORDINAL_POSITION[INTEGER],IS_NULLABLE[VARCHAR]
-,SYS,SYSTABLES,TABLEID,1,CHAR,36,null,null,10,0,,null,null,null,72,1,NO
-,SYS,SYSTABLES,TABLENAME,12,VARCHAR,128,null,null,10,0,,null,null,null,256,2,NO
-,SYS,SYSTABLES,TABLETYPE,1,CHAR,1,null,null,10,0,,null,null,null,2,3,NO
-,SYS,SYSTABLES,SCHEMAID,1,CHAR,36,null,null,10,0,,null,null,null,72,4,NO
-,SYS,SYSTABLES,LOCKGRANULARITY,1,CHAR,1,null,null,10,0,,null,null,null,2,5,NO
+,SYS,SYSTABLES,TABLEID,1,CHAR,36,null,null,null,0,,null,null,null,72,1,NO
+,SYS,SYSTABLES,TABLENAME,12,VARCHAR,128,null,null,null,0,,null,null,null,256,2,NO
+,SYS,SYSTABLES,TABLETYPE,1,CHAR,1,null,null,null,0,,null,null,null,2,3,NO
+,SYS,SYSTABLES,SCHEMAID,1,CHAR,36,null,null,null,0,,null,null,null,72,4,NO
+,SYS,SYSTABLES,LOCKGRANULARITY,1,CHAR,1,null,null,null,0,,null,null,null,2,5,NO
 ---------------------------------------
 Referential action values
 RESTRICT = 1
  </pre>
</blockquote>
</body>
</html>


Mime
View raw message