2 messages in com.mysql.lists.javaRe: Bug in connector/J
FromSent OnAttachments
Lorcha .03 Jan 2003 00:37 
mmat...@thematthews.org03 Jan 2003 07:24 
Subject:Re: Bug in connector/J
From:mmat...@thematthews.org (mmat@thematthews.org)
Date:01/03/2003 07:24:35 AM
List:com.mysql.lists.java

Hi, All.

I hope this is the correct place to post this. After scouring the mysql webpage, this is the best place I could find to submit.

Summary: Statement.execute() method in Connector/J deviates slightly from the JDBC spec.

Version tested: mysql-connector-java-3.0.3-beta with mysql-standard-4.0.6-gamma-pc-linux-i686

Details: According to my reading of the documentation for the Statement.execute() method (available at http://java.sun.com/j2se/1.4.1/docs/api/java/sql/PreparedStatement.html#execute()), this method returns a boolean that should be true if there is a ResultSet, and false if the result is an update count or there are no results. However, when I execute any SELECT statement that returns no rows, the execute() method in Connector/J returns true.

Unless I am reading the docs incorrectly, it looks like that method ought to return false when the SELECT returns no rows.

Thanks for your attention! -Paul

Thanks for your bug report. I will check into it over the weekend.

In the future, you should send bug reports for _any_ MySQL product to bu@lists.mysql.com.

-Mark