db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: rev 47111 - in incubator/derby/code/trunk: . java/drda/org/apache/derby/impl/drda java/engine/org/apache/derby/iapi/services/diag java/engine/org/apache/derby/iapi/services/info java/engine/org/apache/derby/impl/services/uuid java/engine/org/apache/derby/impl/sql/execute java/engine/org/apache/derby/impl/store/raw/log java/tools/org/apache/derby/impl/tools/sysinfo java/tools/org/apache/derby/tools
Date Thu, 23 Sep 2004 16:59:55 GMT
Author: djd
Date: Thu Sep 23 09:59:54 2004
New Revision: 47111

Modified:
   incubator/derby/code/trunk/BUILDING.txt   (props changed)
   incubator/derby/code/trunk/build.xml   (contents, props changed)
   incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DB2jServerImpl.java
   incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/services/diag/Performance.java
   incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/ProductVersionHolder.java
   incubator/derby/code/trunk/java/engine/org/apache/derby/impl/services/uuid/BasicUUID.java
   incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericTriggerExecutor.java
   incubator/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java
   incubator/derby/code/trunk/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java
   incubator/derby/code/trunk/java/tools/org/apache/derby/tools/sysinfo.java
Log:
Revert change 47110, changes were checked in by mistake.


Modified: incubator/derby/code/trunk/build.xml
==============================================================================
--- incubator/derby/code/trunk/build.xml	(original)
+++ incubator/derby/code/trunk/build.xml	Thu Sep 23 09:59:54 2004
@@ -488,20 +488,16 @@
   <target name="buildjarsclean" depends="cleanjars,initjars,derbyjar,derbytoolsjar,derbynetjar"/>
   <target name="buildjars" depends="initjars,derbyjar,derbytoolsjar,derbynetjar"/>
 
-  <target name="initjars" depends="setsanityname,getsvnversion">
+  <target name="initjars" depends="setsanityname">
     <property name="derby.jar.dir" value="${basedir}/jars/${sanity.name}"/>
     <property name="derby.jar.topdir" value="${basedir}/jars"/>
     <mkdir dir="${derby.jar.dir}"/>
     <mkdir dir="${derby.jar.dir}/lists"/>
-     <loadfile srcFile="${basedir}/changenumber.properties"
-               failonerror="false"
-               property="changenumber"/>
-    <condition property="changenumber" value="???">
+    <condition property="changenumber" value="1">
       <not>
         <isset property="changenumber"/>
       </not>
     </condition>
-    <echo message="Revision number set to ${changenumber}."/>
   </target>
 
 
@@ -738,14 +734,6 @@
     </condition>
   </target>
 
-   <target name="getsvnversion">
-     <exec executable="svnversion"
-           failifexecutionfails="no"
-           output="${basedir}/changenumber.properties">
-       <arg value="${basedir}"/>
-       <arg value="-n"/>
-     </exec>
-   </target>
 
   <target name="cleanjars" depends="setsanityname">
     <delete dir="${basedir}/jars/${sanity.name}"/>

Modified: incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DB2jServerImpl.java
==============================================================================
--- incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DB2jServerImpl.java	(original)
+++ incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DB2jServerImpl.java	Thu
Sep 23 09:59:54 2004
@@ -154,7 +154,7 @@
 	protected static String att_extnam;
 	protected static String att_srvrlslv; 
 	protected static String prdId;
-	private static String buildNumber;
+	private static int buildNumber;
 	// we will use single or mixed, not double byte to reduce traffic on the
 	// wire, this is in keeping with JCC
 	// Note we specify UTF8 for the single byte encoding even though it can

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/services/diag/Performance.java
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/services/diag/Performance.java
(original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/services/diag/Performance.java
Thu Sep 23 09:59:54 2004
@@ -20,5 +20,5 @@
 	// file and change the value of this to `true', then compile
 	// whichever other classes are depending on this.  In general,
 	// such a check-out should only be temporary.
-	public static final boolean MEASURE = true;
+	public static final boolean MEASURE = false;
 }

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/ProductVersionHolder.java
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/ProductVersionHolder.java
(original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/ProductVersionHolder.java
Thu Sep 23 09:59:54 2004
@@ -122,7 +122,7 @@
 	private int minorVersion = BAD_NUMBER;
 	private int maintVersion = BAD_NUMBER;
 	private int drdaMaintVersion = BAD_NUMBER;
-	private String buildNumber = "????";
+	private int buildNumber = BAD_NUMBER;
 	private Boolean isBeta;
 
 	private ProductVersionHolder() {
@@ -141,7 +141,7 @@
 								 int minorVersion,
 								 int maintVersion,
 								 int drdaMaintVersion,
-								 String buildNumber,
+								 int buildNumber,
 								 Boolean isBeta)
 	{
 		if (productVendorName != null)
@@ -171,7 +171,7 @@
 	  @param maintVersion The least significant portion of a 3 part
 	  product version. Must be non-negative.
 	  @param drdaMaintVersion The protocol modification number for minor release.
-	  @param buildNumber The buildNumber for a product. 
+	  @param buildNumber The buildNumber for a product. Must be positive.
 	  @param isBeta true iff the product is beta.
 	  @return A valid ProductVersionHolder of null if any of the parameters
 	  provided are not valid.
@@ -185,7 +185,7 @@
 						   int minorVersion,
 						   int maintVersion,
 						   int drdaMaintVersion,
-						   String buildNumber,
+						   int buildNumber,
 						   Boolean isBeta)
 	{
 		ProductVersionHolder pvh =
@@ -288,7 +288,7 @@
 		int v2 = parseInt(p.getProperty(PropertyNames.PRODUCT_MINOR_VERSION));
 		int v3 = parseInt(p.getProperty(PropertyNames.PRODUCT_MAINT_VERSION));
 		int v4 = parseInt(p.getProperty(PropertyNames.PRODUCT_DRDA_MAINT_VERSION));
-		String bn = p.getProperty(PropertyNames.PRODUCT_BUILD_NUMBER);
+		int bn = parseInt(p.getProperty(PropertyNames.PRODUCT_BUILD_NUMBER));
 		Boolean isBeta =
 			Boolean.valueOf(p.getProperty(PropertyNames.PRODUCT_BETA_VERSION));
 		return 	getProductVersionHolder(pvn,pn,ptn,v1,v2,v3,v4,bn,isBeta);
@@ -357,40 +357,8 @@
 	/**
 	  Return the build number for this product.
 	  */
-	public String getBuildNumber() {return buildNumber;}
+	public int getBuildNumber() {return buildNumber;}
 
-    /**
-     * Return the build number as an integer if possible,
-     * mapping from the SVN number.
-     * nnnnn -> returns nnnnn
-     * nnnnnM -> returns -nnnnn indicates a modified code base
-     * nnnnn:mmmmm -> returns -nnnnn
-     * anything else -> returns -1
-    */
-    public int getBuildNumberAsInt(){
-    	if (buildNumber == null)
-    	    return -1;
-    	boolean dubiousCode = false;
-    	int offset = buildNumber.indexOf('M');
-    	if (offset == -1)
-    	    offset = buildNumber.indexOf(':');
-    	else
-    	    dubiousCode = true;
-    	if (offset == -1)
-    		offset = buildNumber.length();
-        else
-            dubiousCode = true;
-    	
-    	try {
-    		int bnai = Integer.parseInt(buildNumber.substring(0, offset));
-    		if (dubiousCode)
-    		    bnai = -bnai;
-    		return bnai;
-    	} catch (NumberFormatException nfe) 
-     	{
-     		return -1;
-    	}
-    }
 
 	/**
 	  Parse a string containing a non-negative integer. Return
@@ -458,7 +426,7 @@
 
 		return sb.toString();
 	}
-	public static String fullVersionString(int major, int minor, int maint, boolean isBeta,
String build) {
+	public static String fullVersionString(int major, int minor, int maint, boolean isBeta,
int build) {
 		StringBuffer sb = new StringBuffer();
 		sb.append(major);
 		sb.append('.');
@@ -494,7 +462,7 @@
 			sb.append(' ');
             sb.append(preRelease);
         }
-		if (build != null) {
+		if (build != 0) {
 			sb.append(" - (");
 
 			sb.append(build);
@@ -510,7 +478,7 @@
     public String getVersionBuildString(boolean withBuild)
     {
 		return ProductVersionHolder.fullVersionString(majorVersion, minorVersion, maintVersion,
isBeta(),
-			withBuild ? buildNumber : null);
+			withBuild ? buildNumber : 0);
     }
 
 	/*

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/services/uuid/BasicUUID.java
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/services/uuid/BasicUUID.java
(original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/services/uuid/BasicUUID.java
Thu Sep 23 09:59:54 2004
@@ -279,26 +279,26 @@
 		byte[] result = new byte[16];
 
 		int lsequence = sequence; 
-		result[0] = (byte)(lsequence >>> 24);
-		result[1] = (byte)(lsequence >>> 16);
-		result[2] = (byte)(lsequence >>> 8);
-		result[3] = (byte)lsequence;
+		result[0] = (byte)((lsequence & 0xff000000) >>> 24);
+		result[1] = (byte)((lsequence & 0x00ff0000) >>> 16);
+		result[2] = (byte)((lsequence & 0x0000ff00) >>> 8);
+		result[3] = (byte) (lsequence & 0x000000ff);
 
 		long ltimemillis = timemillis;
-		result[4] = (byte)(ltimemillis >>> 40);
-		result[5] = (byte)(ltimemillis >>> 32);
-		result[6] = (byte)(ltimemillis >>> 24);
-		result[7] = (byte)(ltimemillis >>> 16);
- 		result[8] = (byte)(ltimemillis >>> 8);
-		result[9] = (byte)ltimemillis;
+		result[4] = (byte)((ltimemillis & 0x0000ff0000000000L) >>> 40);
+		result[5] = (byte)((ltimemillis & 0x000000ff00000000L) >>> 32);
+		result[6] = (byte)((ltimemillis & 0x00000000ff000000L) >>> 24);
+		result[7] = (byte)((ltimemillis & 0x0000000000ff0000L) >>> 16);
+ 		result[8] = (byte)((ltimemillis & 0x000000000000ff00L) >>> 8);
+		result[9] = (byte) (ltimemillis & 0x00000000000000ffL);
 
 		long linetaddr = majorId;
-		result[10] = (byte)(linetaddr >>> 40);
-		result[11] = (byte)(linetaddr >>> 32);
-		result[12] = (byte)(linetaddr >>> 24);
-		result[13] = (byte)(linetaddr >>> 16);
-		result[14] = (byte)(linetaddr >>> 8);
-		result[15] = (byte)linetaddr;
+		result[10] = (byte)((linetaddr & 0x0000ff0000000000L) >>> 40);
+		result[11] = (byte)((linetaddr & 0x000000ff00000000L) >>> 32);
+		result[12] = (byte)((linetaddr & 0x00000000ff000000L) >>> 24);
+		result[13] = (byte)((linetaddr & 0x0000000000ff0000L) >>> 16);
+		result[14] = (byte)((linetaddr & 0x000000000000ff00L) >>> 8);
+		result[15] = (byte) (linetaddr & 0x00000000000000ffL);
 
 		return result;
 	}

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericTriggerExecutor.java
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericTriggerExecutor.java
(original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericTriggerExecutor.java
Thu Sep 23 09:59:54 2004
@@ -157,18 +157,7 @@
 			*/
 			try
 			{
-				ResultSet rs = ps.execute(spsActivation, false, false, false);
-                if( rs.returnsRows())
-                {
-                    // Fetch all the data to ensure that functions in the select list or
values statement will
-                    // be evaluated and side effects will happen. Why else would the trigger
action return
-                    // rows, but for side effects?
-                    // The result set was opened in ps.execute()
-                    while( rs.getNextRow() != null)
-                    {
-                    }
-                }
-                rs.close();
+				ps.execute(spsActivation, false, false, false);
 			} 
 			catch (StandardException e)
 			{

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java
(original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/log/LogToFile.java
Thu Sep 23 09:59:54 2004
@@ -2218,7 +2218,7 @@
 
 		// For 2.0 beta we added the build number and the isBeta indication.
 		// (5 bytes from our first spare long)
-		daos.writeInt(jbmsVersion.getBuildNumberAsInt());
+		daos.writeInt(jbmsVersion.getBuildNumber());
 		byte flags = 0;
 		if (onDiskBeta) flags |= IS_BETA_FLAG;
 		daos.writeByte(flags);

Modified: incubator/derby/code/trunk/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java
==============================================================================
--- incubator/derby/code/trunk/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java	(original)
+++ incubator/derby/code/trunk/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java	Thu
Sep 23 09:59:54 2004
@@ -379,7 +379,7 @@
 			int major = Integer.valueOf(p.getProperty ("derby.locale.version.major")).intValue();
 			int minor = Integer.valueOf(p.getProperty ("derby.locale.version.minor")).intValue();
 			int maint = Integer.valueOf(p.getProperty ("derby.locale.version.maint")).intValue();
-			String build = p.getProperty ("derby.locale.build.number");
+			int build = Integer.valueOf(p.getProperty ("derby.locale.build.number")).intValue();
 
 			String lv = ProductVersionHolder.fullVersionString(major, minor, maint, false, build);
 
@@ -862,7 +862,7 @@
 			minor.intValue(),
 			0,
 			0,
-			build.toString(),
+			build.intValue(),
 			Boolean.FALSE);
 
 		ZipInfoProperties zip = new ZipInfoProperties(jccVersion);

Modified: incubator/derby/code/trunk/java/tools/org/apache/derby/tools/sysinfo.java
==============================================================================
--- incubator/derby/code/trunk/java/tools/org/apache/derby/tools/sysinfo.java	(original)
+++ incubator/derby/code/trunk/java/tools/org/apache/derby/tools/sysinfo.java	Thu Sep 23 09:59:54
2004
@@ -120,7 +120,7 @@
 		gets the build number for the IBM Cloudscape embedded library
 		@return the build number, or -1 if the information is not found.
 	*/
-  static public String getBuildNumber()
+  static public int getBuildNumber()
   {
     return getBuildNumber("DBMS");
   }
@@ -129,14 +129,14 @@
 		gets the build number for the specified library
 		@param genus which library to get the build number for. Valid inputs are
 			DBMS, TOOLS
-		@return the build number, or ???? if the information is not found.
+		@return the build number, or -1 if the information is not found.
 	*/
-  static public String getBuildNumber(String genus)
+  static public int getBuildNumber(String genus)
   {
         ProductVersionHolder pvh = ProductVersionHolder.getProductVersionHolderFromMyEnv(genus);
         if (pvh == null)
         {
-            return "????";
+            return -1;
         }
 
         return pvh.getBuildNumber();

Mime
View raw message