db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r439377 [1/2] - in /db/derby/code/branches/10.2/java: build/org/apache/derbyBuild/ engine/org/apache/derby/iapi/sql/compile/ engine/org/apache/derby/impl/io/ engine/org/apache/derby/impl/sql/compile/ testing/org/apache/derbyTesting/function...
Date Fri, 01 Sep 2006 17:05:03 GMT
Author: rhillegas
Date: Fri Sep  1 10:05:02 2006
New Revision: 439377

URL: http://svn.apache.org/viewvc?rev=439377&view=rev
Log:
DERBY-1725: Merge the following patches from the trunk to the 10.2 branch: No JIRA (439048), DERBY-1702 (439209), DERBY-1783 (439128), DERBY-1315 (439098, 439083), DERBY-1566 (439093).

Added:
    db/derby/code/branches/10.2/java/build/org/apache/derbyBuild/ErrorMessageGenerator.java
      - copied unchanged from r439210, db/derby/code/trunk/java/build/org/apache/derbyBuild/ErrorMessageGenerator.java
Modified:
    db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/sql/compile/Optimizable.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/io/DirFile4.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/FromTable.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/JoinNode.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/OptimizerImpl.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ProjectRestrictNode.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/SingleChildResultSetNode.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/TableOperatorNode.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/UnionNode.java
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/j9_13/floattypes.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/j9_foundation/autoGeneratedJdbc30.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/j9_foundation/floattypes.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/j9_foundation/iepnegativetests_ES.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/j9_foundation/resultset.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/floattypes_app.properties
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/junit/BaseJDBCTestCase.java

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/sql/compile/Optimizable.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/sql/compile/Optimizable.java?rev=439377&r1=439376&r2=439377&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/sql/compile/Optimizable.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/sql/compile/Optimizable.java Fri Sep  1 10:05:02 2006
@@ -253,15 +253,15 @@
 	 * Optimizable saved which "best plan", and allows us to load the
 	 * appropriate plans after each round of optimization.
 	 * 
-	 * @param doAdd True if we're saving a best plan for the OptimizerImpl/
-	 *  Optimizable; false if we're loading/retrieving the best plan.
+	 * @param action Indicates whether we're adding, loading, or removing
+	 *  a best plan for the OptimizerImpl/Optimizable.
 	 * @param planKey Object to use as the map key when adding/looking up
 	 *  a plan.  If it is an instance of OptimizerImpl then it corresponds
 	 *  to an outer query; otherwise it's some Optimizable above this
 	 *  Optimizable that could potentially reject plans chosen by the
 	 *  OptimizerImpl to which this Optimizable belongs.
 	 */
-	public void addOrLoadBestPlanMapping(boolean doAdd,
+	public void updateBestPlanMap(short action,
 		Object planKey) throws StandardException;
 
 	/**

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/io/DirFile4.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/io/DirFile4.java?rev=439377&r1=439376&r2=439377&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/io/DirFile4.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/io/DirFile4.java Fri Sep  1 10:05:02 2006
@@ -238,14 +238,14 @@
      *
      * @return an object that can be used for random access to the file.
      *
-     * @exception IllegalArgumentException if the mode argument is not equal to one of "r", "rw".
+     * @exception IllegalArgumentException if the mode argument is not equal to one of "r", "rw", "rws", or "rwd".
      * @exception FileNotFoundException if the file exists but is a directory rather than a regular
      *              file, or cannot be opened or created for any other reason .
      */
     public StorageRandomAccessFile getRandomAccessFile( String mode) throws FileNotFoundException
     {
         // Assume that modes "rws" and "rwd" are not supported.
-        if(!rwsOK && "rws".equals( mode) || "rwd".equals( mode))
+        if(!rwsOK && ("rws".equals( mode) || "rwd".equals( mode)))
             mode = "rw";
         return new DirRandomAccessFile4( (File) this, mode);
     } // end of getRandomAccessFile

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/FromTable.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/FromTable.java?rev=439377&r1=439376&r2=439377&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/FromTable.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/FromTable.java Fri Sep  1 10:05:02 2006
@@ -102,14 +102,21 @@
 	private boolean considerSortAvoidancePath;
 
 	/**
-	 Set of optimizer->trulyTheBestAccessPath mappings used to keep track
+	 Set of object->trulyTheBestAccessPath mappings used to keep track
 	 of which of this Optimizable's "trulyTheBestAccessPath" was the best
-	 with respect to a specific outer query; the outer query is represented
-	 by an instance of Optimizer.  Each outer query could potentially have
-	 a different idea of what this Optimizable's "best access path" is, so
-	 we have to keep track of them all.
+	 with respect to a specific outer query or ancestor node.  In the case
+	 of an outer query, the object key will be an instance of OptimizerImpl.
+	 In the case of an ancestor node, the object key will be that node itself.
+	 Each ancestor node or outer query could potentially have a different
+	 idea of what this Optimizable's "best access path" is, so we have to
+	 keep track of them all.
 	*/
-	private HashMap optimizerToBestPlanMap;
+	private HashMap bestPlanMap;
+
+	/** Operations that can be performed on bestPlanMap. */
+	protected static final short REMOVE_PLAN = 0;
+	protected static final short ADD_PLAN = 1;
+	protected static final short LOAD_PLAN = 2;
 
 	/**
 	 * Initializer for a table in a FROM list.
@@ -122,7 +129,7 @@
 		this.correlationName = (String) correlationName;
 		this.tableProperties = (Properties) tableProperties;
 		tableNumber = -1;
-		optimizerToBestPlanMap = null;
+		bestPlanMap = null;
 	}
 
 	/**
@@ -157,7 +164,7 @@
 		// current plans using "this" node as the key.  If needed, we'll
 		// then make the call to revert the plans in OptimizerImpl's
 		// getNextDecoratedPermutation() method.
-		addOrLoadBestPlanMapping(true, this);
+		updateBestPlanMap(ADD_PLAN, this);
 
 		CostEstimate singleScanCost = estimateCost(predList,
 												(ConglomerateDescriptor) null,
@@ -507,25 +514,37 @@
 		return absolutePosition;
 	}
 
-	/** @see Optimizable#addOrLoadBestPlanMapping */
-	public void addOrLoadBestPlanMapping(boolean doAdd,
+	/** @see Optimizable#updateBestPlanMap */
+	public void updateBestPlanMap(short action,
 		Object planKey) throws StandardException
 	{
+		if (action == REMOVE_PLAN)
+		{
+			if (bestPlanMap != null)
+			{
+				bestPlanMap.remove(planKey);
+				if (bestPlanMap.size() == 0)
+					bestPlanMap = null;
+			}
+
+			return;
+		}
+
 		AccessPath bestPath = getTrulyTheBestAccessPath();
 		AccessPathImpl ap = null;
-		if (doAdd)
+		if (action == ADD_PLAN)
 		{
 			// If we get to this method before ever optimizing this node, then
 			// there will be no best path--so there's nothing to do.
 			if (bestPath == null)
 				return;
 
-			// If the optimizerToBestPlanMap already exists, search for an
+			// If the bestPlanMap already exists, search for an
 			// AccessPath for the received key and use that if we can.
-			if (optimizerToBestPlanMap == null)
-				optimizerToBestPlanMap = new HashMap();
+			if (bestPlanMap == null)
+				bestPlanMap = new HashMap();
 			else
-				ap = (AccessPathImpl)optimizerToBestPlanMap.get(planKey);
+				ap = (AccessPathImpl)bestPlanMap.get(planKey);
 
 			// If we don't already have an AccessPath for the key,
 			// create a new one.  If the key is an OptimizerImpl then
@@ -540,7 +559,7 @@
 			}
 
 			ap.copy(bestPath);
-			optimizerToBestPlanMap.put(planKey, ap);
+			bestPlanMap.put(planKey, ap);
 			return;
 		}
 
@@ -550,10 +569,10 @@
 		// If we don't have any plans saved, then there's nothing to load.
 		// This can happen if the key is an OptimizerImpl that tried some
 		// join order for which there was no valid plan.
-		if (optimizerToBestPlanMap == null)
+		if (bestPlanMap == null)
 			return;
 
-		ap = (AccessPathImpl)optimizerToBestPlanMap.get(planKey);
+		ap = (AccessPathImpl)bestPlanMap.get(planKey);
 
 		// It might be the case that there is no plan stored for
 		// the key, in which case there's nothing to load.
@@ -595,23 +614,23 @@
 		// Since we just set trulyTheBestAccessPath for the current
 		// join order of the received optimizer, take note of what
 		// that path is, in case we need to "revert" back to this
-		// path later.  See Optimizable.addOrLoadBestPlanMapping().
+		// path later.  See Optimizable.updateBestPlanMap().
 		// Note: Since this call descends all the way down to base
 		// tables, it can be relatively expensive when we have deeply
 		// nested subqueries.  So in an attempt to save some work, we
 		// skip the call if this node is a ProjectRestrictNode whose
 		// child is an Optimizable--in that case the ProjectRestrictNode
 		// will in turn call "rememberAsBest" on its child and so
-		// the required call to addOrLoadBestPlanMapping() will be
+		// the required call to updateBestPlanMap() will be
 		// made at that time.  If we did it here, too, then we would
 		// just end up duplicating the work.
 		if (!(this instanceof ProjectRestrictNode))
-			addOrLoadBestPlanMapping(true, optimizer);
+			updateBestPlanMap(ADD_PLAN, optimizer);
 		else
 		{
 			ProjectRestrictNode prn = (ProjectRestrictNode)this;
 			if (!(prn.getChildResult() instanceof Optimizable))
-				addOrLoadBestPlanMapping(true, optimizer);
+				updateBestPlanMap(ADD_PLAN, optimizer);
 		}
 		 
 		/* also store the name of the access path; i.e index name/constraint

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/JoinNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/JoinNode.java?rev=439377&r1=439376&r2=439377&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/JoinNode.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/JoinNode.java Fri Sep  1 10:05:02 2006
@@ -187,7 +187,7 @@
 		// current plans using "this" node as the key.  If needed, we'll
 		// then make the call to revert the plans in OptimizerImpl's
 		// getNextDecoratedPermutation() method.
-		addOrLoadBestPlanMapping(true, this);
+		updateBestPlanMap(ADD_PLAN, this);
 
 		/*
 		** RESOLVE: Most types of Optimizables only implement estimateCost(),

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/OptimizerImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/OptimizerImpl.java?rev=439377&r1=439376&r2=439377&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/OptimizerImpl.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/OptimizerImpl.java Fri Sep  1 10:05:02 2006
@@ -366,6 +366,7 @@
 				trace(NO_TABLES, 0, 0, 0.0, null);
 			}
 
+			endOfRoundCleanup();
 			return false;
 		}
 
@@ -980,7 +981,7 @@
 				** can be expensive if there are deeply nested subqueries.
 				*/
 				if (reloadBestPlan)
-					pullMe.addOrLoadBestPlanMapping(false, this);
+					pullMe.updateBestPlanMap(FromTable.LOAD_PLAN, this);
 
 				/* Mark current join position as unused */
 				proposedJoinOrder[joinPosition] = -1;
@@ -1133,7 +1134,9 @@
 						rewindJoinOrder();
 						joinPosition = -1;
 					}
+
 					permuteState = READY_TO_JUMP;
+					endOfRoundCleanup();
 					return false;
 				}
 			}
@@ -1170,6 +1173,7 @@
 			return true;
 		}
 
+		endOfRoundCleanup();
 		return false;
 	}
 
@@ -1183,7 +1187,7 @@
 									proposedJoinOrder[joinPosition]);
 			pullMe.pullOptPredicates(predicateList);
 			if (reloadBestPlan)
-				pullMe.addOrLoadBestPlanMapping(false, this);
+				pullMe.updateBestPlanMap(FromTable.LOAD_PLAN, this);
 			proposedJoinOrder[joinPosition] = -1;
 			if (joinPosition == 0) break;
 		}
@@ -1192,6 +1196,25 @@
 		assignedTableMap.clearAll();
 	}
 
+	/**
+	 * Do any work that needs to be done after the current round
+	 * of optimization has completed.  For now this just means walking
+	 * the subtrees for each optimizable and removing the "bestPlan"
+	 * that we saved (w.r.t to this OptimizerImpl) from all of the
+	 * nodes.  If we don't do this post-optimization cleanup we
+	 * can end up consuming a huge amount of memory for deeply-
+	 * nested queries, which can lead to OOM errors.  DERBY-1315.
+	 */
+	private void endOfRoundCleanup()
+		throws StandardException
+	{
+		for (int i = 0; i < numOptimizables; i++)
+		{
+			optimizableList.getOptimizable(i).
+				updateBestPlanMap(FromTable.REMOVE_PLAN, this);
+		}
+	}
+
 	/*
 	** Push predicates from this optimizer's list to the given optimizable,
 	** as appropriate given the outer tables.
@@ -1309,7 +1332,7 @@
 			if (curOpt.getBestAccessPath().getCostEstimate().compare(
 				curOpt.getCurrentAccessPath().getCostEstimate()) != 0)
 			{
-				curOpt.addOrLoadBestPlanMapping(false, curOpt);
+				curOpt.updateBestPlanMap(FromTable.LOAD_PLAN, curOpt);
 			}
 			else if (curOpt.getBestAccessPath().getCostEstimate().rowCount() <
 				curOpt.getCurrentAccessPath().getCostEstimate().rowCount())
@@ -1319,10 +1342,17 @@
 				// still need to revert the plans.  In this case the row
 				// count for currentCost will be greater than the row count
 				// for bestCost, so that's what we just checked.
-				curOpt.addOrLoadBestPlanMapping(false, curOpt);
+				curOpt.updateBestPlanMap(FromTable.LOAD_PLAN, curOpt);
 			}
 		}
 
+		/* If we needed to revert plans for curOpt, we just did it above.
+		 * So we no longer need to keep the previous best plan--and in fact,
+		 * keeping it can lead to extreme memory usage for very large
+		 * queries.  So delete the stored plan for curOpt. DERBY-1315.
+		 */
+		curOpt.updateBestPlanMap(FromTable.REMOVE_PLAN, curOpt);
+
 		/*
 		** When all the access paths have been looked at, we know what the
 		** cheapest one is, so remember it.  Only do this if a cost estimate
@@ -2373,30 +2403,39 @@
 	public boolean useStatistics() { return useStatistics && optimizableList.useStatistics(); }
 
 	/**
-	 * Remember the current best join order as the best one for
-	 * some outer query, represented by another OptimizerImpl. Then
+	 * Process (i.e. add, load, or remove) current best join order as the
+	 * best one for some outer query or ancestor node, represented by another
+	 * OptimizerImpl or an instance of FromTable, respectively. Then
 	 * iterate through our optimizableList and tell each Optimizable
-	 * to remember its best plan with respect to the outer query.
-	 * See Optimizable.addOrLoadBestPlan() for more on why this is
-	 * necessary.
+	 * to do the same.  See Optimizable.updateBestPlan() for more on why
+	 * this is necessary.
 	 *
-	 * @param doAdd True if we're adding a mapping, false if we're loading.
+	 * @param action Indicates whether to add, load, or remove the plan
 	 * @param planKey Object to use as the map key when adding/looking up
 	 *  a plan.  If this is an instance of OptimizerImpl then it corresponds
 	 *  to an outer query; otherwise it's some Optimizable above this
 	 *  OptimizerImpl that could potentially reject plans chosen by this
 	 *  OptimizerImpl.
 	 */
-	protected void addOrLoadBestPlanMappings(boolean doAdd,
+	protected void updateBestPlanMaps(short action,
 		Object planKey) throws StandardException
 	{
-		// First we save this OptimizerImpl's best join order.  If there's
+		// First we process this OptimizerImpl's best join order.  If there's
 		// only one optimizable in the list, then there's only one possible
 		// join order, so don't bother.
 		if (numOptimizables > 1)
 		{
 			int [] joinOrder = null;
-			if (doAdd)
+			if (action == FromTable.REMOVE_PLAN)
+			{
+				if (savedJoinOrders != null)
+				{
+					savedJoinOrders.remove(planKey);
+					if (savedJoinOrders.size() == 0)
+						savedJoinOrders = null;
+				}
+			}
+			else if (action == FromTable.ADD_PLAN)
 			{
 				// If the savedJoinOrder map already exists, search for the
 				// join order for the target optimizer and reuse that.
@@ -2438,13 +2477,13 @@
 			}
 		}
 
-		// Now iterate through all Optimizables in this OptimizerImpl's list
-	 	// and add/load the best plan "mapping" for each one, as described in
-	 	// in Optimizable.addOrLoadBestPlanMapping().
+		// Now iterate through all Optimizables in this OptimizerImpl's
+	 	// list and add/load/remove the best plan "mapping" for each one,
+		// as described in in Optimizable.updateBestPlanMap().
 		for (int i = optimizableList.size() - 1; i >= 0; i--)
 		{
 			optimizableList.getOptimizable(i).
-				addOrLoadBestPlanMapping(doAdd, planKey);
+				updateBestPlanMap(action, planKey);
 		}
 	}
 

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ProjectRestrictNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ProjectRestrictNode.java?rev=439377&r1=439376&r2=439377&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ProjectRestrictNode.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ProjectRestrictNode.java Fri Sep  1 10:05:02 2006
@@ -304,7 +304,7 @@
 		// current plans using "this" node as the key.  If needed, we'll
 		// then make the call to revert the plans in OptimizerImpl's
 		// getNextDecoratedPermutation() method.
-		addOrLoadBestPlanMapping(true, this);
+		updateBestPlanMap(ADD_PLAN, this);
 
 		/* If the childResult is instanceof Optimizable, then we optimizeIt.
 		 * Otherwise, we are going into a new query block.  If the new query

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/SingleChildResultSetNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/SingleChildResultSetNode.java?rev=439377&r1=439376&r2=439377&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/SingleChildResultSetNode.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/SingleChildResultSetNode.java Fri Sep  1 10:05:02 2006
@@ -165,16 +165,17 @@
 	}
 
 	/**
-	 * @see Optimizable#addOrLoadBestPlanMapping
+	 * @see Optimizable#updateBestPlanMap
 	 *
-	 * Makes a call to add/load the plan mapping for this node,
+	 * Makes a call to add/load/remove a plan mapping for this node,
 	 * and then makes the necessary call to recurse on this node's
-	 * child, in order to ensure that we have a full plan mapped.
+	 * child, in order to ensure that we've handled the full plan
+	 * all the way down this node's subtree.
 	 */
-	public void addOrLoadBestPlanMapping(boolean doAdd,
+	public void updateBestPlanMap(short action,
 		Object planKey) throws StandardException
 	{
-		super.addOrLoadBestPlanMapping(doAdd, planKey);
+		super.updateBestPlanMap(action, planKey);
 
 		// Now walk the child.  Note that if the child is not an
 		// Optimizable and the call to child.getOptimizerImpl()
@@ -185,12 +186,12 @@
 		if (childResult instanceof Optimizable)
 		{
 			((Optimizable)childResult).
-				addOrLoadBestPlanMapping(doAdd, planKey);
+				updateBestPlanMap(action, planKey);
 		}
 		else if (childResult.getOptimizerImpl() != null)
 		{
 			childResult.getOptimizerImpl().
-				addOrLoadBestPlanMappings(doAdd, planKey);
+				updateBestPlanMaps(action, planKey);
 		}
 	}
 

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/TableOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/TableOperatorNode.java?rev=439377&r1=439376&r2=439377&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/TableOperatorNode.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/TableOperatorNode.java Fri Sep  1 10:05:02 2006
@@ -156,17 +156,17 @@
 	}
 
 	/**
-	 * @see Optimizable#addOrLoadBestPlanMapping
+	 * @see Optimizable#updateBestPlanMap
 	 *
-	 * Makes a call to add/load the plan mapping for this node,
+	 * Makes a call to add/load/remove the plan mapping for this node,
 	 * and then makes the necessary call to recurse on this node's
-	 * left and right child, in order to ensure that we have a
-	 * full plan mapped.
+	 * left and right child, in order to ensure that we've handled
+	 * the full plan all the way down this node's subtree. 
 	 */
-	public void addOrLoadBestPlanMapping(boolean doAdd,
+	public void updateBestPlanMap(short action,
 		Object planKey) throws StandardException
 	{
-		super.addOrLoadBestPlanMapping(doAdd, planKey);
+		super.updateBestPlanMap(action, planKey);
 
 		// Now walk the children.  Note that if either child is not
 		// an Optimizable and the call to child.getOptimizerImpl()
@@ -177,23 +177,23 @@
 		if (leftResultSet instanceof Optimizable)
 		{
 			((Optimizable)leftResultSet).
-				addOrLoadBestPlanMapping(doAdd, planKey);
+				updateBestPlanMap(action, planKey);
 		}
 		else if (leftResultSet.getOptimizerImpl() != null)
 		{
 			leftResultSet.getOptimizerImpl().
-				addOrLoadBestPlanMappings(doAdd, planKey);
+				updateBestPlanMaps(action, planKey);
 		}
 
 		if (rightResultSet instanceof Optimizable)
 		{
 			((Optimizable)rightResultSet).
-				addOrLoadBestPlanMapping(doAdd, planKey);
+				updateBestPlanMap(action, planKey);
 		}
 		else if (rightResultSet.getOptimizerImpl() != null)
 		{
 			rightResultSet.getOptimizerImpl().
-				addOrLoadBestPlanMappings(doAdd, planKey);
+				updateBestPlanMaps(action, planKey);
 		}
 	}
 

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/UnionNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/UnionNode.java?rev=439377&r1=439376&r2=439377&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/UnionNode.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/UnionNode.java Fri Sep  1 10:05:02 2006
@@ -245,7 +245,7 @@
 		// current plans using "this" node as the key.  If needed, we'll
 		// then make the call to revert the plans in OptimizerImpl's
 		// getNextDecoratedPermutation() method.
-		addOrLoadBestPlanMapping(true, this);
+		updateBestPlanMap(ADD_PLAN, this);
 
 		leftResultSet = optimizeSource(
 							optimizer,

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/j9_13/floattypes.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/j9_13/floattypes.out?rev=439377&r1=439376&r2=439377&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/j9_13/floattypes.out (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/j9_13/floattypes.out Fri Sep  1 10:05:02 2006
@@ -50,13 +50,13 @@
 ------
 1     
 ij> values cast (1.1 as dec(5,3));
-1       
---------
-1.100   
+1      
+-------
+1.100  
 ij> values cast (1.1 as numeric(5,3));
-1       
---------
-1.100   
+1      
+-------
+1.100  
 ij> -- cast to all valid types
 values cast (1.1 as int);
 1          
@@ -393,15 +393,15 @@
 1.0                   
 1.0                   
 ij> select cast(d as dec(10,2)) from tmp;
-1            
--------------
-1.00         
-1.00         
+1           
+------------
+1.00        
+1.00        
 ij> select cast(d as dec(10,8)) from tmp;
-1            
--------------
-1.00000000   
-1.00000000   
+1           
+------------
+1.00000000  
+1.00000000  
 ij> drop table tmp;
 0 rows inserted/updated/deleted
 ij> drop table t;
@@ -440,12 +440,12 @@
 						 );
 1 row inserted/updated/deleted
 ij> select dc from t;
-DC           
--------------
-NULL         
-10.00        
--10.00       
-0.00         
+DC          
+------------
+NULL        
+10.00       
+-10.00      
+0.00        
 ij> select dc + i, dc + s, dc + r, dc + dc from t;
 1               |2             |3            |4             
 ------------------------------------------------------------
@@ -484,11 +484,11 @@
 0.0                   |0.0                   
 ij> -- test null/null, constant/null, null/constant
 select dc, i / dc, 10 / dc, dc / 10e0 from t;
-DC           |2                                 |3                                 |4                     
-----------------------------------------------------------------------------------------------------------
-NULL         |NULL                              |NULL                              |NULL                  
-10.00        |1.0000000000000000000             |1.0000000000000000000             |1.0                   
--10.00       |1.0000000000000000000             |-1.0000000000000000000            |-1.0                  
+DC          |2                                 |3                                 |4                     
+---------------------------------------------------------------------------------------------------------
+NULL        |NULL                              |NULL                              |NULL                  
+10.00       |1.0000000000000000000             |1.0000000000000000000             |1.0                   
+-10.00      |1.0000000000000000000             |-1.0000000000000000000            |-1.0                  
 ERROR 22012: Attempt to divide by zero.
 ij> -- test for divide by 0
 select dc / i from t;
@@ -507,20 +507,20 @@
 1.0                   |1.0                   
 ij> -- test positive/negative, negative/positive and negative/negative
 select dc, dc / -dc, (-dc) / dc, (-dc) / -dc from t;
-DC           |2                                 |3                                 |4                                 
-----------------------------------------------------------------------------------------------------------------------
-NULL         |NULL                              |NULL                              |NULL                              
-10.00        |-1.000000000000000000000          |-1.000000000000000000000          |1.000000000000000000000           
--10.00       |-1.000000000000000000000          |-1.000000000000000000000          |1.000000000000000000000           
+DC          |2                                 |3                                 |4                                 
+---------------------------------------------------------------------------------------------------------------------
+NULL        |NULL                              |NULL                              |NULL                              
+10.00       |-1.000000000000000000000          |-1.000000000000000000000          |1.000000000000000000000           
+-10.00      |-1.000000000000000000000          |-1.000000000000000000000          |1.000000000000000000000           
 ERROR 22012: Attempt to divide by zero.
 ij> -- test some "more complex" expressions
 select dc, dc + 10e0, dc - (10 - 20e0), dc - 10, dc - (20 - 10) from t;
-DC           |2                     |3                     |4               |5               
----------------------------------------------------------------------------------------------
-NULL         |NULL                  |NULL                  |NULL            |NULL            
-10.00        |20.0                  |20.0                  |0.00            |0.00            
--10.00       |0.0                   |0.0                   |-20.00          |-20.00          
-0.00         |10.0                  |10.0                  |-10.00          |-10.00          
+DC          |2                     |3                     |4               |5               
+--------------------------------------------------------------------------------------------
+NULL        |NULL                  |NULL                  |NULL            |NULL            
+10.00       |20.0                  |20.0                  |0.00            |0.00            
+-10.00      |0.0                   |0.0                   |-20.00          |-20.00          
+0.00        |10.0                  |10.0                  |-10.00          |-10.00          
 ij> -- make sure we get the right scale/precision during arithmetic
 values (9.0 + 9.0);
 1     
@@ -621,9 +621,9 @@
 --		 cast(1.7e308 as dec(2147483647))));
 --
 values cast(1 as dec(31, 20));
-1                                 
-----------------------------------
-1.00000000000000000000            
+1                                
+---------------------------------
+1.00000000000000000000           
 ij> -- test the arithmetic operators on a type we know they don't work on
 create table w (x dec, y long varchar);
 0 rows inserted/updated/deleted
@@ -651,314 +651,314 @@
 1 row inserted/updated/deleted
 ij> -- test =
 select dc from t where dc is null;
-DC           
--------------
-NULL         
+DC          
+------------
+NULL        
 ij> select dc from t where dc = 10;
-DC           
--------------
-10.00        
+DC          
+------------
+10.00       
 ij> select dc from t where dc = -10;
-DC           
--------------
--10.00       
+DC          
+------------
+-10.00      
 ij> select dc from t where dc = 0;
-DC           
--------------
-0.00         
+DC          
+------------
+0.00        
 ij> select dc from t where dc = 1234.45;
-DC           
--------------
+DC          
+------------
 ij> select dc from t where dc = i;
-DC           
--------------
-10.00        
--10.00       
-0.00         
+DC          
+------------
+10.00       
+-10.00      
+0.00        
 ij> select dc from t where dc = l;
-DC           
--------------
-10.00        
--10.00       
-0.00         
+DC          
+------------
+10.00       
+-10.00      
+0.00        
 ij> select dc from t where dc = s;
-DC           
--------------
-10.00        
--10.00       
-0.00         
+DC          
+------------
+10.00       
+-10.00      
+0.00        
 ij> select dc from t where dc = r;
-DC           
--------------
-10.00        
--10.00       
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+-10.00      
+0.00        
+1234.56     
 ij> select dc from t where dc = d;
-DC           
--------------
-10.00        
--10.00       
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+-10.00      
+0.00        
+1234.56     
 ij> select dc from t where dc = dc;
-DC           
--------------
-10.00        
--10.00       
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+-10.00      
+0.00        
+1234.56     
 ij> -- test >
 select dc from t where dc > 10;
-DC           
--------------
-1234.56      
+DC          
+------------
+1234.56     
 ij> select dc from t where dc > -10;
-DC           
--------------
-10.00        
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+0.00        
+1234.56     
 ij> select dc from t where dc > 0;
-DC           
--------------
-10.00        
-1234.56      
+DC          
+------------
+10.00       
+1234.56     
 ij> select dc from t where dc > 1234.45;
-DC           
--------------
-1234.56      
+DC          
+------------
+1234.56     
 ij> select dc from t where dc > i;
-DC           
--------------
-1234.56      
+DC          
+------------
+1234.56     
 ij> select dc from t where dc > l;
-DC           
--------------
-1234.56      
+DC          
+------------
+1234.56     
 ij> select dc from t where dc > s;
-DC           
--------------
-1234.56      
+DC          
+------------
+1234.56     
 ij> select dc from t where dc > r;
-DC           
--------------
+DC          
+------------
 ij> select dc from t where dc > d;
-DC           
--------------
+DC          
+------------
 ij> select dc from t where dc > dc;
-DC           
--------------
+DC          
+------------
 ij> -- test >=
 select dc from t where dc >= 10;
-DC           
--------------
-10.00        
-1234.56      
+DC          
+------------
+10.00       
+1234.56     
 ij> select dc from t where dc >= -10;
-DC           
--------------
-10.00        
--10.00       
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+-10.00      
+0.00        
+1234.56     
 ij> select dc from t where dc >= 0;
-DC           
--------------
-10.00        
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+0.00        
+1234.56     
 ij> select dc from t where dc >= 1234.45;
-DC           
--------------
-1234.56      
+DC          
+------------
+1234.56     
 ij> select dc from t where dc >= i;
-DC           
--------------
-10.00        
--10.00       
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+-10.00      
+0.00        
+1234.56     
 ij> select dc from t where dc >= l;
-DC           
--------------
-10.00        
--10.00       
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+-10.00      
+0.00        
+1234.56     
 ij> select dc from t where dc >= s;
-DC           
--------------
-10.00        
--10.00       
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+-10.00      
+0.00        
+1234.56     
 ij> select dc from t where dc >= r;
-DC           
--------------
-10.00        
--10.00       
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+-10.00      
+0.00        
+1234.56     
 ij> select dc from t where dc >= d;
-DC           
--------------
-10.00        
--10.00       
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+-10.00      
+0.00        
+1234.56     
 ij> select dc from t where dc >= dc;
-DC           
--------------
-10.00        
--10.00       
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+-10.00      
+0.00        
+1234.56     
 ij> -- test <
 select dc from t where dc < 10;
-DC           
--------------
--10.00       
-0.00         
+DC          
+------------
+-10.00      
+0.00        
 ij> select dc from t where dc < -10;
-DC           
--------------
+DC          
+------------
 ij> select dc from t where dc < 0;
-DC           
--------------
--10.00       
+DC          
+------------
+-10.00      
 ij> select dc from t where dc < 1234.45;
-DC           
--------------
-10.00        
--10.00       
-0.00         
+DC          
+------------
+10.00       
+-10.00      
+0.00        
 ij> select dc from t where dc < i;
-DC           
--------------
+DC          
+------------
 ij> select dc from t where dc < l;
-DC           
--------------
+DC          
+------------
 ij> select dc from t where dc < s;
-DC           
--------------
+DC          
+------------
 ij> select dc from t where dc < r;
-DC           
--------------
+DC          
+------------
 ij> select dc from t where dc < d;
-DC           
--------------
+DC          
+------------
 ij> select dc from t where dc < dc;
-DC           
--------------
+DC          
+------------
 ij> -- test <=
 select dc from t where dc <= 10;
-DC           
--------------
-10.00        
--10.00       
-0.00         
+DC          
+------------
+10.00       
+-10.00      
+0.00        
 ij> select dc from t where dc <= -10;
-DC           
--------------
--10.00       
+DC          
+------------
+-10.00      
 ij> select dc from t where dc <= 0;
-DC           
--------------
--10.00       
-0.00         
+DC          
+------------
+-10.00      
+0.00        
 ij> select dc from t where dc <= 1234.45;
-DC           
--------------
-10.00        
--10.00       
-0.00         
+DC          
+------------
+10.00       
+-10.00      
+0.00        
 ij> select dc from t where dc <= i;
-DC           
--------------
-10.00        
--10.00       
-0.00         
+DC          
+------------
+10.00       
+-10.00      
+0.00        
 ij> select dc from t where dc <= l;
-DC           
--------------
-10.00        
--10.00       
-0.00         
+DC          
+------------
+10.00       
+-10.00      
+0.00        
 ij> select dc from t where dc <= s;
-DC           
--------------
-10.00        
--10.00       
-0.00         
+DC          
+------------
+10.00       
+-10.00      
+0.00        
 ij> select dc from t where dc <= r;
-DC           
--------------
-10.00        
--10.00       
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+-10.00      
+0.00        
+1234.56     
 ij> select dc from t where dc <= d;
-DC           
--------------
-10.00        
--10.00       
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+-10.00      
+0.00        
+1234.56     
 ij> select dc from t where dc <= dc;
-DC           
--------------
-10.00        
--10.00       
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+-10.00      
+0.00        
+1234.56     
 ij> -- test <>
 select dc from t where dc <> 10;
-DC           
--------------
--10.00       
-0.00         
-1234.56      
+DC          
+------------
+-10.00      
+0.00        
+1234.56     
 ij> select dc from t where dc <> -10;
-DC           
--------------
-10.00        
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+0.00        
+1234.56     
 ij> select dc from t where dc <> 0;
-DC           
--------------
-10.00        
--10.00       
-1234.56      
+DC          
+------------
+10.00       
+-10.00      
+1234.56     
 ij> select dc from t where dc <> 1234.45;
-DC           
--------------
-10.00        
--10.00       
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+-10.00      
+0.00        
+1234.56     
 ij> select dc from t where dc <> i;
-DC           
--------------
-1234.56      
+DC          
+------------
+1234.56     
 ij> select dc from t where dc <> l;
-DC           
--------------
-1234.56      
+DC          
+------------
+1234.56     
 ij> select dc from t where dc <> s;
-DC           
--------------
-1234.56      
+DC          
+------------
+1234.56     
 ij> select dc from t where dc <> r;
-DC           
--------------
+DC          
+------------
 ij> select dc from t where dc <> d;
-DC           
--------------
+DC          
+------------
 ij> select dc from t where dc <> dc;
-DC           
--------------
+DC          
+------------
 ij> --
 -- test a variety of inserts and updates
 --
@@ -982,65 +982,65 @@
 update t2 set dc = dc + 1.1;
 5 rows inserted/updated/deleted
 ij> select dc from t2;
-DC           
--------------
--8.90        
-1.10         
-11.10        
-1235.66      
-NULL         
+DC          
+------------
+-8.90       
+1.10        
+11.10       
+1235.66     
+NULL        
 ij> update t2 set dc = dc - 1.1;
 5 rows inserted/updated/deleted
 ij> select dc from t2;
-DC           
--------------
--10.00       
-0.00         
-10.00        
-1234.56      
-NULL         
+DC          
+------------
+-10.00      
+0.00        
+10.00       
+1234.56     
+NULL        
 ij> update t2 set dc = dc / 1.1;
 5 rows inserted/updated/deleted
 ij> select dc from t2;
-DC           
--------------
--9.09        
-0.00         
-9.09         
-1122.32      
-NULL         
+DC          
+------------
+-9.09       
+0.00        
+9.09        
+1122.32     
+NULL        
 ij> update t2 set dc = dc * 1.1;
 5 rows inserted/updated/deleted
 ij> select dc from t2;
-DC           
--------------
--9.99        
-0.00         
-9.99         
-1234.55      
-NULL         
+DC          
+------------
+-9.99       
+0.00        
+9.99        
+1234.55     
+NULL        
 ij> -- try some deletes
 delete from t2 where dc > 0;
 2 rows inserted/updated/deleted
 ij> select dc from t2;
-DC           
--------------
--9.99        
-0.00         
-NULL         
+DC          
+------------
+-9.99       
+0.00        
+NULL        
 ij> delete from t2 where dc = 0;
 1 row inserted/updated/deleted
 ij> select dc from t2;
-DC           
--------------
--9.99        
-NULL         
+DC          
+------------
+-9.99       
+NULL        
 ij> delete from t2 where dc < 0;
 1 row inserted/updated/deleted
 ij> select dc from t2;
-DC           
--------------
-NULL         
+DC          
+------------
+NULL        
 ij> drop table t2;
 0 rows inserted/updated/deleted
 ij> drop table t;
@@ -1074,33 +1074,33 @@
 ij> insert into t values ('a', 9.123, 'Z');
 1 row inserted/updated/deleted
 ij> select * from t;
-C1  |D                      |C2  
----------------------------------
-a   |1.1230                 |Z   
-a   |11111.1230             |Z   
-a   |11111111.1230          |Z   
-a   |6.1230                 |Z   
-a   |666.1230               |Z   
-a   |0.6000                 |Z   
-a   |0.0000                 |Z   
-a   |666666.1230            |Z   
-a   |99999999999999.1230    |Z   
-a   |9.1230                 |Z   
+C1  |D                     |C2  
+--------------------------------
+a   |1.1230                |Z   
+a   |11111.1230            |Z   
+a   |11111111.1230         |Z   
+a   |6.1230                |Z   
+a   |666.1230              |Z   
+a   |0.6000                |Z   
+a   |0.0000                |Z   
+a   |666666.1230           |Z   
+a   |99999999999999.1230   |Z   
+a   |9.1230                |Z   
 ij> update t set d = d + .0007;
 10 rows inserted/updated/deleted
 ij> select * from t;
-C1  |D                      |C2  
----------------------------------
-a   |1.1237                 |Z   
-a   |11111.1237             |Z   
-a   |11111111.1237          |Z   
-a   |6.1237                 |Z   
-a   |666.1237               |Z   
-a   |0.6007                 |Z   
-a   |0.0007                 |Z   
-a   |666666.1237            |Z   
-a   |99999999999999.1237    |Z   
-a   |9.1237                 |Z   
+C1  |D                     |C2  
+--------------------------------
+a   |1.1237                |Z   
+a   |11111.1237            |Z   
+a   |11111111.1237         |Z   
+a   |6.1237                |Z   
+a   |666.1237              |Z   
+a   |0.6007                |Z   
+a   |0.0007                |Z   
+a   |666666.1237           |Z   
+a   |99999999999999.1237   |Z   
+a   |9.1237                |Z   
 ij> drop table tmp;
 ERROR 42Y55: 'DROP TABLE' cannot be performed on 'TMP' because it does not exist.
 ij> drop table bad;
@@ -2444,87 +2444,87 @@
 ij> insert into tiger values (0.00000001234);
 1 row inserted/updated/deleted
 ij> select d from tiger order by 1;
-D              
----------------
-0.00000001234  
-0.00000001234  
-0.00000012340  
-0.00000123400  
-0.00001234000  
-0.00012340000  
-0.00123400000  
-0.00123400000  
-0.01234000000  
-0.12340000000  
-1.23400000000  
+D             
+--------------
+0.00000001234 
+0.00000001234 
+0.00000012340 
+0.00000123400 
+0.00001234000 
+0.00012340000 
+0.00123400000 
+0.00123400000 
+0.01234000000 
+0.12340000000 
+1.23400000000 
 ij> -- =====================================================
 -- some formatting tests
 values cast ('1e+0' as DECIMAL(6,2));
-1        
----------
-ERROR 22018: Invalid character string format for type DECIMAL.
+1       
+--------
+1.00    
 ij> values cast ('+-1e+1' as DECIMAL(6,2));
-1        
----------
+1       
+--------
 ERROR 22018: Invalid character string format for type DECIMAL.
 ij> values cast ('-1e+1' as DECIMAL(6,2));
-1        
----------
-ERROR 22018: Invalid character string format for type DECIMAL.
+1       
+--------
+-10.00  
 ij> values cast ('-1e-1' as DECIMAL(6,2));
-1        
----------
--0.10    
+1       
+--------
+-0.10   
 ij> values cast ('-1e-+1' as DECIMAL(6,2));
-1        
----------
+1       
+--------
 ERROR 22018: Invalid character string format for type DECIMAL.
 ij> values cast ('-1e--1' as DECIMAL(6,2));
-1        
----------
+1       
+--------
 ERROR 22018: Invalid character string format for type DECIMAL.
 ij> values cast ('-1e+-1' as DECIMAL(6,2));
-1        
----------
+1       
+--------
 ERROR 22018: Invalid character string format for type DECIMAL.
 ij> values cast ('-1e+-1' as DECIMAL(6,2));
-1        
----------
+1       
+--------
 ERROR 22018: Invalid character string format for type DECIMAL.
 ij> values cast ('1.0e' as DECIMAL(6,2));
-1        
----------
+1       
+--------
 ERROR 22018: Invalid character string format for type DECIMAL.
 ij> values cast ('1.0e+' as DECIMAL(6,2));
-1        
----------
+1       
+--------
 ERROR 22018: Invalid character string format for type DECIMAL.
 ij> values cast ('1.0e-' as DECIMAL(6,2));
-1        
----------
+1       
+--------
 ERROR 22018: Invalid character string format for type DECIMAL.
 ij> values cast ('1.0ee' as DECIMAL(6,2));
-1        
----------
+1       
+--------
 ERROR 22018: Invalid character string format for type DECIMAL.
 ij> values cast ('123.' as DECIMAL(6,2));
-1        
----------
-123.00   
+1       
+--------
+123.00  
 ij> values cast ('1e' as DECIMAL(6,2));
-1        
----------
+1       
+--------
 ERROR 22018: Invalid character string format for type DECIMAL.
 ij> values cast ('1e1.0' as DECIMAL(6,2));
-1        
----------
+1       
+--------
 ERROR 22018: Invalid character string format for type DECIMAL.
 ij> values cast ('.3' as DECIMAL(6,2));
-1        
----------
-0.30     
+1       
+--------
+0.30    
 ij> values cast ('' as DECIMAL(6,2));
-1        
----------
+1       
+--------
 ERROR 22018: Invalid character string format for type DECIMAL.
 ij> 

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/j9_foundation/autoGeneratedJdbc30.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/j9_foundation/autoGeneratedJdbc30.out?rev=439377&r1=439376&r2=439377&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/j9_foundation/autoGeneratedJdbc30.out (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/j9_foundation/autoGeneratedJdbc30.out Fri Sep  1 10:05:02 2006
@@ -12,88 +12,88 @@
  there was no prior one-row insert into a table with autogenerated key
 	 1
 	 -
-	{3}
+	{null}
 Now try the same test again but this time with Statement.executeUpdate. It should behave the same
 	 1
 	 -
-	{6}
+	{null}
 Now try the same test again but this time with PreparedStatement.execute. It should behave the same
 	 1
 	 -
-	{9}
+	{null}
 Now try the same test again but this time with PreparedStatement.executeUpdate. It should behave the same
 	 1
 	 -
-	{12}
+	{null}
 Test 4 - request for generated keys after doing an insert into a table with no auto generated keys
  And there has been no one-row insert into a table with auto-generated keys yet.
 We should get a resultset with one row of NULL value from getGeneratedKeys
 	 1
 	 -
-	{12}
+	{null}
 Now try the same test again but this time with Statement.executeUpdate. It should behave the same
 	 1
 	 -
-	{12}
+	{null}
 Now try the same test again but this time with PreparedStatement.execute. It should behave the same
 	 1
 	 -
-	{12}
+	{null}
 Now try the same test again but this time with PreparedStatement.executeUpdate. It should behave the same
 	 1
 	 -
-	{12}
+	{null}
 Test 5a - request for generated keys after doing a one-row insert(using a subquery) into a table with autogenerated key using a subquery with auto generated keys
 Even though this is a one-row insert but since insert has a sub-select, get generated keys will return one row of NULL value
 	 1
 	 -
-	{6}
+	{null}
 Now try the same test again but this time with Statement.executeUpdate. It should behave the same
 	 1
 	 -
-	{12}
+	{null}
 Now try the same test again but this time with PreparedStatement.execute. It should behave the same
 	 1
 	 -
-	{18}
+	{null}
 Now try the same test again but this time with PreparedStatement.executeUpdate. It should behave the same
 	 1
 	 -
-	{24}
+	{null}
 Test 5b - request for generated keys after doing a one-row insert(using a subquery) into a table with autogenerated key using a subquery with auto generated keys
 Even though this is a one-row insert but since insert has a sub-select, get generated keys will return one row of NULL value
 	 1
 	 -
-	{0}
+	{null}
 Now try the same test again but this time with Statement.executeUpdate. It should behave the same
 	 1
 	 -
-	{0}
+	{null}
 Now try the same test again but this time with PreparedStatement.execute. It should behave the same
 	 1
 	 -
-	{0}
+	{null}
 Now try the same test again but this time with PreparedStatement.executeUpdate. It should behave the same
 	 1
 	 -
-	{0}
+	{null}
 Test 5c - request for generated keys after doing a one-row insert(using a subquery) into a table with autogenerated key using a subquery with auto generated keys
 Even though this is a one-row insert but since insert has a sub-select, get generated keys will return one row of NULL value
 	 1
 	 -
-	{25}
+	{null}
 Now try the same test again but this time with Statement.executeUpdate. It should behave the same
 	 1
 	 -
-	{26}
+	{null}
 Now try the same test again but this time with PreparedStatement.execute. It should behave the same
 	 1
 	 -
-	{27}
+	{null}
 Now try the same test again but this time with PreparedStatement.executeUpdate. It should behave the same
 	 1
 	 -
-	{28}
+	{null}
 Test 6 - request for generated keys after doing a one-row insert into a table with auto generated keys
 We should get a resultset with one row of non-NULL value
 	 1
@@ -115,37 +115,37 @@
  This time we will get a row of non-NULL value because there has been a prior one-row insert into table with auto-generated key 
 	 1
 	 -
-	{15}
+	{32}
 Now try the same test again but this time with Statement.executeUpdate. It should behave the same
 	 1
 	 -
-	{18}
+	{32}
 Now try the same test again but this time with PreparedStatement.execute. It should behave the same
 	 1
 	 -
-	{21}
+	{32}
 Now try the same test again but this time with PreparedStatement.executeUpdate. It should behave the same
 	 1
 	 -
-	{24}
+	{32}
 Test 8 - create a new statement and request for generated keys on it after doing an insert into 
  a table with no auto generated keys
 We should get a resultset with one row of non-NULL value
 	 1
 	 -
-	{24}
+	{32}
 Now try the same test again but this time with Statement.executeUpdate. It should behave the same
 	 1
 	 -
-	{24}
+	{32}
 Now try the same test again but this time with PreparedStatement.execute. It should behave the same
 	 1
 	 -
-	{24}
+	{32}
 Now try the same test again but this time with PreparedStatement.executeUpdate. It should behave the same
 	 1
 	 -
-	{24}
+	{32}
 Test 9 - request for generated keys on a statement which does a update 
 We should get a resultset with no rows from getGeneratedKeys because we executed a non-insert sql
 <NULL>
@@ -169,37 +169,37 @@
 expected to see resultset with one row of NULL value but instead get one row of non-NULL value from getGeneratedKeys
 	 1
 	 -
-	{24}
+	{32}
 Now try the same test again but this time with Statement.executeUpdate. It should behave the same
 	 1
 	 -
-	{24}
+	{32}
 Now try the same test again but this time with PreparedStatement.execute. It should behave the same
 	 1
 	 -
-	{24}
+	{32}
 Now try the same test again but this time with PreparedStatement.executeUpdate. It should behave the same
 	 1
 	 -
-	{24}
+	{32}
 Test 12 - do a rollback and request for generated keys on a statement which does insert into a table with 
  no auto generated keys (previous transaction had a one-row insert on a table with auto-generated keys)
 had expected to see resultset with one row of NULL value but instead get one row of non-NULL value from getGeneratedKeys
 	 1
 	 -
-	{24}
+	{32}
 Now try the same test again but this time with Statement.executeUpdate. It should behave the same
 	 1
 	 -
-	{24}
+	{32}
 Now try the same test again but this time with PreparedStatement.execute. It should behave the same
 	 1
 	 -
-	{24}
+	{32}
 Now try the same test again but this time with PreparedStatement.executeUpdate. It should behave the same
 	 1
 	 -
-	{24}
+	{32}
 Test 13 - try savepoint rollback and see what happens to auto generated keys resultset
 Inside the savepoint unit, issue a one-row insert into a table with auto generated keys
 We should get a resultset with one row of non-NULL value

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/j9_foundation/floattypes.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/j9_foundation/floattypes.out?rev=439377&r1=439376&r2=439377&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/j9_foundation/floattypes.out (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/j9_foundation/floattypes.out Fri Sep  1 10:05:02 2006
@@ -50,13 +50,13 @@
 ------
 1     
 ij> values cast (1.1 as dec(5,3));
-1       
---------
-1.100   
+1      
+-------
+1.100  
 ij> values cast (1.1 as numeric(5,3));
-1       
---------
-1.100   
+1      
+-------
+1.100  
 ij> -- cast to all valid types
 values cast (1.1 as int);
 1          
@@ -393,15 +393,15 @@
 1.0                   
 1.0                   
 ij> select cast(d as dec(10,2)) from tmp;
-1            
--------------
-1.00         
-1.00         
+1           
+------------
+1.00        
+1.00        
 ij> select cast(d as dec(10,8)) from tmp;
-1            
--------------
-1.00000000   
-1.00000000   
+1           
+------------
+1.00000000  
+1.00000000  
 ij> drop table tmp;
 0 rows inserted/updated/deleted
 ij> drop table t;
@@ -440,12 +440,12 @@
 						 );
 1 row inserted/updated/deleted
 ij> select dc from t;
-DC           
--------------
-NULL         
-10.00        
--10.00       
-0.00         
+DC          
+------------
+NULL        
+10.00       
+-10.00      
+0.00        
 ij> select dc + i, dc + s, dc + r, dc + dc from t;
 1               |2             |3            |4             
 ------------------------------------------------------------
@@ -484,11 +484,11 @@
 0.0                   |0.0                   
 ij> -- test null/null, constant/null, null/constant
 select dc, i / dc, 10 / dc, dc / 10e0 from t;
-DC           |2                                 |3                                 |4                     
-----------------------------------------------------------------------------------------------------------
-NULL         |NULL                              |NULL                              |NULL                  
-10.00        |1.0000000000000000000             |1.0000000000000000000             |1.0                   
--10.00       |1.0000000000000000000             |-1.0000000000000000000            |-1.0                  
+DC          |2                                 |3                                 |4                     
+---------------------------------------------------------------------------------------------------------
+NULL        |NULL                              |NULL                              |NULL                  
+10.00       |1.0000000000000000000             |1.0000000000000000000             |1.0                   
+-10.00      |1.0000000000000000000             |-1.0000000000000000000            |-1.0                  
 ERROR 22012: Attempt to divide by zero.
 ij> -- test for divide by 0
 select dc / i from t;
@@ -507,20 +507,20 @@
 1.0                   |1.0                   
 ij> -- test positive/negative, negative/positive and negative/negative
 select dc, dc / -dc, (-dc) / dc, (-dc) / -dc from t;
-DC           |2                                 |3                                 |4                                 
-----------------------------------------------------------------------------------------------------------------------
-NULL         |NULL                              |NULL                              |NULL                              
-10.00        |-1.000000000000000000000          |-1.000000000000000000000          |1.000000000000000000000           
--10.00       |-1.000000000000000000000          |-1.000000000000000000000          |1.000000000000000000000           
+DC          |2                                 |3                                 |4                                 
+---------------------------------------------------------------------------------------------------------------------
+NULL        |NULL                              |NULL                              |NULL                              
+10.00       |-1.000000000000000000000          |-1.000000000000000000000          |1.000000000000000000000           
+-10.00      |-1.000000000000000000000          |-1.000000000000000000000          |1.000000000000000000000           
 ERROR 22012: Attempt to divide by zero.
 ij> -- test some "more complex" expressions
 select dc, dc + 10e0, dc - (10 - 20e0), dc - 10, dc - (20 - 10) from t;
-DC           |2                     |3                     |4               |5               
----------------------------------------------------------------------------------------------
-NULL         |NULL                  |NULL                  |NULL            |NULL            
-10.00        |20.0                  |20.0                  |0.00            |0.00            
--10.00       |0.0                   |0.0                   |-20.00          |-20.00          
-0.00         |10.0                  |10.0                  |-10.00          |-10.00          
+DC          |2                     |3                     |4               |5               
+--------------------------------------------------------------------------------------------
+NULL        |NULL                  |NULL                  |NULL            |NULL            
+10.00       |20.0                  |20.0                  |0.00            |0.00            
+-10.00      |0.0                   |0.0                   |-20.00          |-20.00          
+0.00        |10.0                  |10.0                  |-10.00          |-10.00          
 ij> -- make sure we get the right scale/precision during arithmetic
 values (9.0 + 9.0);
 1     
@@ -621,9 +621,9 @@
 --		 cast(1.7e308 as dec(2147483647))));
 --
 values cast(1 as dec(31, 20));
-1                                 
-----------------------------------
-1.00000000000000000000            
+1                                
+---------------------------------
+1.00000000000000000000           
 ij> -- test the arithmetic operators on a type we know they don't work on
 create table w (x dec, y long varchar);
 0 rows inserted/updated/deleted
@@ -651,314 +651,314 @@
 1 row inserted/updated/deleted
 ij> -- test =
 select dc from t where dc is null;
-DC           
--------------
-NULL         
+DC          
+------------
+NULL        
 ij> select dc from t where dc = 10;
-DC           
--------------
-10.00        
+DC          
+------------
+10.00       
 ij> select dc from t where dc = -10;
-DC           
--------------
--10.00       
+DC          
+------------
+-10.00      
 ij> select dc from t where dc = 0;
-DC           
--------------
-0.00         
+DC          
+------------
+0.00        
 ij> select dc from t where dc = 1234.45;
-DC           
--------------
+DC          
+------------
 ij> select dc from t where dc = i;
-DC           
--------------
-10.00        
--10.00       
-0.00         
+DC          
+------------
+10.00       
+-10.00      
+0.00        
 ij> select dc from t where dc = l;
-DC           
--------------
-10.00        
--10.00       
-0.00         
+DC          
+------------
+10.00       
+-10.00      
+0.00        
 ij> select dc from t where dc = s;
-DC           
--------------
-10.00        
--10.00       
-0.00         
+DC          
+------------
+10.00       
+-10.00      
+0.00        
 ij> select dc from t where dc = r;
-DC           
--------------
-10.00        
--10.00       
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+-10.00      
+0.00        
+1234.56     
 ij> select dc from t where dc = d;
-DC           
--------------
-10.00        
--10.00       
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+-10.00      
+0.00        
+1234.56     
 ij> select dc from t where dc = dc;
-DC           
--------------
-10.00        
--10.00       
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+-10.00      
+0.00        
+1234.56     
 ij> -- test >
 select dc from t where dc > 10;
-DC           
--------------
-1234.56      
+DC          
+------------
+1234.56     
 ij> select dc from t where dc > -10;
-DC           
--------------
-10.00        
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+0.00        
+1234.56     
 ij> select dc from t where dc > 0;
-DC           
--------------
-10.00        
-1234.56      
+DC          
+------------
+10.00       
+1234.56     
 ij> select dc from t where dc > 1234.45;
-DC           
--------------
-1234.56      
+DC          
+------------
+1234.56     
 ij> select dc from t where dc > i;
-DC           
--------------
-1234.56      
+DC          
+------------
+1234.56     
 ij> select dc from t where dc > l;
-DC           
--------------
-1234.56      
+DC          
+------------
+1234.56     
 ij> select dc from t where dc > s;
-DC           
--------------
-1234.56      
+DC          
+------------
+1234.56     
 ij> select dc from t where dc > r;
-DC           
--------------
+DC          
+------------
 ij> select dc from t where dc > d;
-DC           
--------------
+DC          
+------------
 ij> select dc from t where dc > dc;
-DC           
--------------
+DC          
+------------
 ij> -- test >=
 select dc from t where dc >= 10;
-DC           
--------------
-10.00        
-1234.56      
+DC          
+------------
+10.00       
+1234.56     
 ij> select dc from t where dc >= -10;
-DC           
--------------
-10.00        
--10.00       
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+-10.00      
+0.00        
+1234.56     
 ij> select dc from t where dc >= 0;
-DC           
--------------
-10.00        
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+0.00        
+1234.56     
 ij> select dc from t where dc >= 1234.45;
-DC           
--------------
-1234.56      
+DC          
+------------
+1234.56     
 ij> select dc from t where dc >= i;
-DC           
--------------
-10.00        
--10.00       
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+-10.00      
+0.00        
+1234.56     
 ij> select dc from t where dc >= l;
-DC           
--------------
-10.00        
--10.00       
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+-10.00      
+0.00        
+1234.56     
 ij> select dc from t where dc >= s;
-DC           
--------------
-10.00        
--10.00       
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+-10.00      
+0.00        
+1234.56     
 ij> select dc from t where dc >= r;
-DC           
--------------
-10.00        
--10.00       
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+-10.00      
+0.00        
+1234.56     
 ij> select dc from t where dc >= d;
-DC           
--------------
-10.00        
--10.00       
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+-10.00      
+0.00        
+1234.56     
 ij> select dc from t where dc >= dc;
-DC           
--------------
-10.00        
--10.00       
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+-10.00      
+0.00        
+1234.56     
 ij> -- test <
 select dc from t where dc < 10;
-DC           
--------------
--10.00       
-0.00         
+DC          
+------------
+-10.00      
+0.00        
 ij> select dc from t where dc < -10;
-DC           
--------------
+DC          
+------------
 ij> select dc from t where dc < 0;
-DC           
--------------
--10.00       
+DC          
+------------
+-10.00      
 ij> select dc from t where dc < 1234.45;
-DC           
--------------
-10.00        
--10.00       
-0.00         
+DC          
+------------
+10.00       
+-10.00      
+0.00        
 ij> select dc from t where dc < i;
-DC           
--------------
+DC          
+------------
 ij> select dc from t where dc < l;
-DC           
--------------
+DC          
+------------
 ij> select dc from t where dc < s;
-DC           
--------------
+DC          
+------------
 ij> select dc from t where dc < r;
-DC           
--------------
+DC          
+------------
 ij> select dc from t where dc < d;
-DC           
--------------
+DC          
+------------
 ij> select dc from t where dc < dc;
-DC           
--------------
+DC          
+------------
 ij> -- test <=
 select dc from t where dc <= 10;
-DC           
--------------
-10.00        
--10.00       
-0.00         
+DC          
+------------
+10.00       
+-10.00      
+0.00        
 ij> select dc from t where dc <= -10;
-DC           
--------------
--10.00       
+DC          
+------------
+-10.00      
 ij> select dc from t where dc <= 0;
-DC           
--------------
--10.00       
-0.00         
+DC          
+------------
+-10.00      
+0.00        
 ij> select dc from t where dc <= 1234.45;
-DC           
--------------
-10.00        
--10.00       
-0.00         
+DC          
+------------
+10.00       
+-10.00      
+0.00        
 ij> select dc from t where dc <= i;
-DC           
--------------
-10.00        
--10.00       
-0.00         
+DC          
+------------
+10.00       
+-10.00      
+0.00        
 ij> select dc from t where dc <= l;
-DC           
--------------
-10.00        
--10.00       
-0.00         
+DC          
+------------
+10.00       
+-10.00      
+0.00        
 ij> select dc from t where dc <= s;
-DC           
--------------
-10.00        
--10.00       
-0.00         
+DC          
+------------
+10.00       
+-10.00      
+0.00        
 ij> select dc from t where dc <= r;
-DC           
--------------
-10.00        
--10.00       
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+-10.00      
+0.00        
+1234.56     
 ij> select dc from t where dc <= d;
-DC           
--------------
-10.00        
--10.00       
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+-10.00      
+0.00        
+1234.56     
 ij> select dc from t where dc <= dc;
-DC           
--------------
-10.00        
--10.00       
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+-10.00      
+0.00        
+1234.56     
 ij> -- test <>
 select dc from t where dc <> 10;
-DC           
--------------
--10.00       
-0.00         
-1234.56      
+DC          
+------------
+-10.00      
+0.00        
+1234.56     
 ij> select dc from t where dc <> -10;
-DC           
--------------
-10.00        
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+0.00        
+1234.56     
 ij> select dc from t where dc <> 0;
-DC           
--------------
-10.00        
--10.00       
-1234.56      
+DC          
+------------
+10.00       
+-10.00      
+1234.56     
 ij> select dc from t where dc <> 1234.45;
-DC           
--------------
-10.00        
--10.00       
-0.00         
-1234.56      
+DC          
+------------
+10.00       
+-10.00      
+0.00        
+1234.56     
 ij> select dc from t where dc <> i;
-DC           
--------------
-1234.56      
+DC          
+------------
+1234.56     
 ij> select dc from t where dc <> l;
-DC           
--------------
-1234.56      
+DC          
+------------
+1234.56     
 ij> select dc from t where dc <> s;
-DC           
--------------
-1234.56      
+DC          
+------------
+1234.56     
 ij> select dc from t where dc <> r;
-DC           
--------------
+DC          
+------------
 ij> select dc from t where dc <> d;
-DC           
--------------
+DC          
+------------
 ij> select dc from t where dc <> dc;
-DC           
--------------
+DC          
+------------
 ij> --
 -- test a variety of inserts and updates
 --
@@ -982,65 +982,65 @@
 update t2 set dc = dc + 1.1;
 5 rows inserted/updated/deleted
 ij> select dc from t2;
-DC           
--------------
--8.90        
-1.10         
-11.10        
-1235.66      
-NULL         
+DC          
+------------
+-8.90       
+1.10        
+11.10       
+1235.66     
+NULL        
 ij> update t2 set dc = dc - 1.1;
 5 rows inserted/updated/deleted
 ij> select dc from t2;
-DC           
--------------
--10.00       
-0.00         
-10.00        
-1234.56      
-NULL         
+DC          
+------------
+-10.00      
+0.00        
+10.00       
+1234.56     
+NULL        
 ij> update t2 set dc = dc / 1.1;
 5 rows inserted/updated/deleted
 ij> select dc from t2;
-DC           
--------------
--9.09        
-0.00         
-9.09         
-1122.32      
-NULL         
+DC          
+------------
+-9.09       
+0.00        
+9.09        
+1122.32     
+NULL        
 ij> update t2 set dc = dc * 1.1;
 5 rows inserted/updated/deleted
 ij> select dc from t2;
-DC           
--------------
--9.99        
-0.00         
-9.99         
-1234.55      
-NULL         
+DC          
+------------
+-9.99       
+0.00        
+9.99        
+1234.55     
+NULL        
 ij> -- try some deletes
 delete from t2 where dc > 0;
 2 rows inserted/updated/deleted
 ij> select dc from t2;
-DC           
--------------
--9.99        
-0.00         
-NULL         
+DC          
+------------
+-9.99       
+0.00        
+NULL        
 ij> delete from t2 where dc = 0;
 1 row inserted/updated/deleted
 ij> select dc from t2;
-DC           
--------------
--9.99        
-NULL         
+DC          
+------------
+-9.99       
+NULL        
 ij> delete from t2 where dc < 0;
 1 row inserted/updated/deleted
 ij> select dc from t2;
-DC           
--------------
-NULL         
+DC          
+------------
+NULL        
 ij> drop table t2;
 0 rows inserted/updated/deleted
 ij> drop table t;
@@ -1074,33 +1074,33 @@
 ij> insert into t values ('a', 9.123, 'Z');
 1 row inserted/updated/deleted
 ij> select * from t;
-C1  |D                      |C2  
----------------------------------
-a   |1.1230                 |Z   
-a   |11111.1230             |Z   
-a   |11111111.1230          |Z   
-a   |6.1230                 |Z   
-a   |666.1230               |Z   
-a   |0.6000                 |Z   
-a   |0.0000                 |Z   
-a   |666666.1230            |Z   
-a   |99999999999999.1230    |Z   
-a   |9.1230                 |Z   
+C1  |D                     |C2  
+--------------------------------
+a   |1.1230                |Z   
+a   |11111.1230            |Z   
+a   |11111111.1230         |Z   
+a   |6.1230                |Z   
+a   |666.1230              |Z   
+a   |0.6000                |Z   
+a   |0.0000                |Z   
+a   |666666.1230           |Z   
+a   |99999999999999.1230   |Z   
+a   |9.1230                |Z   
 ij> update t set d = d + .0007;
 10 rows inserted/updated/deleted
 ij> select * from t;
-C1  |D                      |C2  
----------------------------------
-a   |1.1237                 |Z   
-a   |11111.1237             |Z   
-a   |11111111.1237          |Z   
-a   |6.1237                 |Z   
-a   |666.1237               |Z   
-a   |0.6007                 |Z   
-a   |0.0007                 |Z   
-a   |666666.1237            |Z   
-a   |99999999999999.1237    |Z   
-a   |9.1237                 |Z   
+C1  |D                     |C2  
+--------------------------------
+a   |1.1237                |Z   
+a   |11111.1237            |Z   
+a   |11111111.1237         |Z   
+a   |6.1237                |Z   
+a   |666.1237              |Z   
+a   |0.6007                |Z   
+a   |0.0007                |Z   
+a   |666666.1237           |Z   
+a   |99999999999999.1237   |Z   
+a   |9.1237                |Z   
 ij> drop table tmp;
 ERROR 42Y55: 'DROP TABLE' cannot be performed on 'TMP' because it does not exist.
 ij> drop table bad;
@@ -2444,87 +2444,87 @@
 ij> insert into tiger values (0.00000001234);
 1 row inserted/updated/deleted
 ij> select d from tiger order by 1;
-D              
----------------
-0.00000001234  
-0.00000001234  
-0.00000012340  
-0.00000123400  
-0.00001234000  
-0.00012340000  
-0.00123400000  
-0.00123400000  
-0.01234000000  
-0.12340000000  
-1.23400000000  
+D             
+--------------
+0.00000001234 
+0.00000001234 
+0.00000012340 
+0.00000123400 
+0.00001234000 
+0.00012340000 
+0.00123400000 
+0.00123400000 
+0.01234000000 
+0.12340000000 
+1.23400000000 
 ij> -- =====================================================
 -- some formatting tests
 values cast ('1e+0' as DECIMAL(6,2));
-1        
----------
-1.00     
+1       
+--------
+1.00    
 ij> values cast ('+-1e+1' as DECIMAL(6,2));
-1        
----------
+1       
+--------
 ERROR 22018: Invalid character string format for type DECIMAL.
 ij> values cast ('-1e+1' as DECIMAL(6,2));
-1        
----------
--10.00   
+1       
+--------
+-10.00  
 ij> values cast ('-1e-1' as DECIMAL(6,2));
-1        
----------
--0.10    
+1       
+--------
+-0.10   
 ij> values cast ('-1e-+1' as DECIMAL(6,2));
-1        
----------
+1       
+--------
 ERROR 22018: Invalid character string format for type DECIMAL.
 ij> values cast ('-1e--1' as DECIMAL(6,2));
-1        
----------
+1       
+--------
 ERROR 22018: Invalid character string format for type DECIMAL.
 ij> values cast ('-1e+-1' as DECIMAL(6,2));
-1        
----------
+1       
+--------
 ERROR 22018: Invalid character string format for type DECIMAL.
 ij> values cast ('-1e+-1' as DECIMAL(6,2));
-1        
----------
+1       
+--------
 ERROR 22018: Invalid character string format for type DECIMAL.
 ij> values cast ('1.0e' as DECIMAL(6,2));
-1        
----------
+1       
+--------
 ERROR 22018: Invalid character string format for type DECIMAL.
 ij> values cast ('1.0e+' as DECIMAL(6,2));
-1        
----------
+1       
+--------
 ERROR 22018: Invalid character string format for type DECIMAL.
 ij> values cast ('1.0e-' as DECIMAL(6,2));
-1        
----------
+1       
+--------
 ERROR 22018: Invalid character string format for type DECIMAL.
 ij> values cast ('1.0ee' as DECIMAL(6,2));
-1        
----------
+1       
+--------
 ERROR 22018: Invalid character string format for type DECIMAL.
 ij> values cast ('123.' as DECIMAL(6,2));
-1        
----------
-123.00   
+1       
+--------
+123.00  
 ij> values cast ('1e' as DECIMAL(6,2));
-1        
----------
+1       
+--------
 ERROR 22018: Invalid character string format for type DECIMAL.
 ij> values cast ('1e1.0' as DECIMAL(6,2));
-1        
----------
+1       
+--------
 ERROR 22018: Invalid character string format for type DECIMAL.
 ij> values cast ('.3' as DECIMAL(6,2));
-1        
----------
-0.30     
+1       
+--------
+0.30    
 ij> values cast ('' as DECIMAL(6,2));
-1        
----------
+1       
+--------
 ERROR 22018: Invalid character string format for type DECIMAL.
 ij> 



Mime
View raw message