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