import java.sql.SQLException;
import java.sql.Statement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Date;
import java.util.*;
import javax.sql.*;

public class Bug14609 extends testsuite.BaseTestCase {


	public Bug14609(String name) {
		super(name);
	}

	public void setUp() throws Exception {
                dbUrl = "jdbc:mysql://localhost:3306/test?user=root";
		super.setUp();
	}

	public void testPound14609() throws SQLException {
           System.out.println("START");


           String sql = "SELECT * FROM myTable WHERE "
                + "businessId = ? "
                + "AND fromDate <= ? "
                + "AND toDate >= ?";
           PreparedStatement pst = conn.prepareStatement(sql,
                         ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
           pst.setObject(1, new Integer(1));
           pst.setDate(2, new java.sql.Date(105,11,17));
           pst.setDate(3, new java.sql.Date(105,11,17));
           ResultSet rs = pst.executeQuery(); 
 
           System.out.println("END");
        }

	public static void main(String args[]) throws Exception {
		junit.textui.TestRunner.run(Bug14609.class);
	}

}
