Bug 182305 log does not contain SQL parameter values
I have SQL query with computed parameter and the query returns no results. I dont understand why so I turned on BIRT logging. I can see the query but it contains ?, not real value. This is useless for me, I need to find out, what exactly is sent to database machine. E.g. Parameters : org.eclipse.birt.data.engine.api.querydefn.ParameterDefinition@2ec7f1 InputParamBindings : InputParameterBinding(Name : param1, Position : -1, Expression : ScriptExpression(Text:new Date().getTime() - params[" days"] * 24 * 3600000)) ResultSetHints : org.eclipse.birt.data.engine.api.querydefn.ColumnDefinition@148d3a0, org.eclipse.birt.data.engine.api.querydefn.ColumnDefinition@3db223, org.eclipse.birt.data.engine.api.querydefn.ColumnDefinition@7a1e1c, org.eclipse.birt.data.engine.api.querydefn.ColumnDefinition@14ed400, org.eclipse.birt.data.engine.api.querydefn.ColumnDefinition@405a01, org.eclipse.birt.data.engine.api.querydefn.ColumnDefinition@d522dd ExtensionID : org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet QueryText : select * from table where start_time < ? order by id desc PrivateProperties : {} FINE: Statement.prepare( "select * from table where start_time < ? order by id desc" ) 13.4.2007 13:31:59 org.eclipse.birt.report.data.oda.jdbc.Statement getMetaData FINE: Statement.getMetaData( ) I want to see either: FINE: Statement.prepare( "select * from table where start_time < 12345 order by id desc" ) or: FINE: Statement.prepare( "select * from table where start_time < ? order by id desc" ); param 1 = 1234 Thanks
data/org.eclipse.birt.report.data.oda.jdbc/src/org/eclipse/birt/report/data/oda/jdbc/Statement.java
/*******************************************************************************
 * Copyright (c) 2004, 2007 Actuate Corporation.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http:www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *  Actuate Corporation  - initial API and implementation
 *******************************************************************************/
package org.eclipse.birt.report.data.oda.jdbc;
import java.math.BigDecimal;
import java.sql.Date;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Time;
import java.sql.Timestamp;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.eclipse.birt.report.data.oda.i18n.ResourceConstants;
import org.eclipse.datatools.connectivity.oda.IParameterMetaData;
import org.eclipse.datatools.connectivity.oda.IQuery;
import org.eclipse.datatools.connectivity.oda.IResultSet;
import org.eclipse.datatools.connectivity.oda.IResultSetMetaData;
import org.eclipse.datatools.connectivity.oda.OdaException;
import org.eclipse.datatools.connectivity.oda.SortSpec;