Bug 195970 Two issues when evaluate a query inlcuding a subquery[07]
Description: Currently, when evaluating a query which includes a subquery, the query will be evaluated twice. The binding of query will pass to subquery twice. If user write a java script such as new Date() and i++. The result of query will be incorrect. Another issue: when write the report document, the binding of query will be written twice and the performance is not good to evalulate it twice.
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/ExprManagerUtil.java
{
		List nameList = this.getColumnNames( );
		for ( int i = 0; i < usedBindings.size( ); i++ )
		{
			IColumnBinding cb = (IColumnBinding) usedBindings.get( i );
			if ( useDefinedKeyWord( cb ) )
				continue;
			String name = ( (IColumnBinding) usedBindings.get( i ) ).getResultSetColumnName( );
			if ( !nameList.contains( name ) && baseQueryDefn != null )
			{
				String expr = findExpression( name,
						baseQueryDefn.getParentQuery( ) );
				if ( expr == null )
				{
					throw new DataException( ResourceConstants.COLUMN_BINDING_REFER_TO_INEXIST_COLUMN );
				}
				else if ( ExpressionUtil.hasAggregation( expr ) )
				{
					throw new DataException( ResourceConstants.COLUMN_BINDING_REFER_TO_AGGREGATION_COLUMN_BINDING_IN_PARENT_QUERY,
							bindingName );
				}
			}
		}
	}
	
	/**
	 * 
	 * @param columnBindingName
	 * @param queryDefn
	 * @return