db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Army <a...@golux.com>
Subject [PATCH] (DERBY-40) Cannot set default value for BIGINT
Date Wed, 13 Oct 2004 15:13:29 GMT
I'm am submitting the following patch as a fix for Derby-40.

Army

Index: java/engine/org/apache/derby/impl/sql/compile/ColumnDefinitionNode.java
===================================================================
--- java/engine/org/apache/derby/impl/sql/compile/ColumnDefinitionNode.java	(revision 54741)
+++ java/engine/org/apache/derby/impl/sql/compile/ColumnDefinitionNode.java	(working copy)
@@ -645,6 +645,14 @@
  			// value if it's integer.
  				return (defType == StoredFormatIds.INT_TYPE_ID);

+			case StoredFormatIds.LONGINT_TYPE_ID:
+			// This is a BIGINT column: we allow smallints, ints,
+			// and big int constants.  Smallint and int literals
+			// are both covered by INT_TYPE; big int literals are
+			// covered by LONG_INT type.
+				return ((defType == StoredFormatIds.INT_TYPE_ID)
+					|| (defType == StoredFormatIds.LONGINT_TYPE_ID));
+
  			case StoredFormatIds.DECIMAL_TYPE_ID:
  				if (defType == StoredFormatIds.DECIMAL_TYPE_ID) {
  				// only valid if scale and precision are within

Mime
View raw message