Re: Select Using PreparedStatement returns erroneous data
Posted by: Mark Matthews
Date: August 19, 2005 04:38PM

Leslie Lowry wrote:
> I have run the test against a few versions of both
> the Connector/J driver and the database server. I
> have tested with 3.1.7 and 3.1.10 of the driver
> and I have tested versions 4.0.2, 4.1.7, and
> 4.1.13 of the server. I have determined that
> there is a conflict on the issue of using a select
> query in a prepared statement when driver version
> 3.1.10 is used with either version 4.1.7 or 4.1.13
> of the database server. I have found two
> situations which allow the select query to be used
> with the prepared statement with accurate
> results.
>
>
>
> 1) Either versions 3.1.7 or 3.1.10 of Connector/J
> and version 4.0.2 of the server.
> 2) Driver version 3.1.7 and either version 4.1.7
> or 4.1.13 of the server.
>
>
>
> The operating systems I have used have been Red
> Hat Linux with kernel version 2.4.20 and Mac OS X
> Panther. The results are the same for both
> environments.

Leslie,

I now noticed that you're using UNSIGNED values. Please try a nightly snapshot of 3.1 from http://downloads.mysql.com/snapshots.php#connector-j as it has a bugfix that has been in there for a while that deals specifically with UNSIGNED and prepared statements (it's problematic because Java doesn't actually have an unsigned type).

I believe this will fix your problem.

-Mark

Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.