Bug #17474 Incorrect arguments to mysql_stmt_execute (1210), JDBC, AMD64
Submitted: 16 Feb 2006 15:42 Modified: 27 Mar 2006 13:05
Reporter: Raimund Jacob Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:Debian 4.1.15 OS:Linux (Debian on AMD64)
Assigned to: CPU Architecture:Any

[16 Feb 2006 15:42] Raimund Jacob
Description:
I upgraded my workstation from Debian on ia32 to Debian on AMD64, basically taking the entire installation with me. My application is JDBC and my databases were transfered with mysqldump.

<cj> heh
<cj> sup?
<Raimi> the 3.1.12 jdbc driver doesnt support batch-inserts on my amd64 workstation here... mysql 4.1.15
<cj> and how do you suppose *I* can help? :)
<Raimi> java.sql.BatchUpdateException: Incorrect arguments to mysql_stmt_execute
<cj> heh, sounds like a #mysql problem to me
<cj> I'm asking internally
<cj> Raimi: did you find any bugs filed on the subject?
<Raimi> the same app/db work on 4.0/4.1 on ia32
<Raimi> i cannot find anything with that search form
<Raimi> i'll try again
<Raimi> http://bugs.mysql.com/bug.php?id=16894
<Raimi> is the only one
<Raimi> dunno if that is related
<Raimi> i'm writing a TEXT field with ps.setString()
<Raimi> with our without batch operation
<Raimi> the problem might be totally different since that bug indicates it's just a bad error message
<cj> Raimi: submit a new bug and I'll have it looked at.  pasting our irc log should be fine

i analyzed further: It does not matter wether i use batch-insert or a simple insert on a PreparedStatement. With ethereal I can see that the server returns error code 1210 and the above message.

How to repeat:
connect with jdbc to the instance on amd64, perform an insert with a PreparedStatement. Columns are:

oid	-5	bigint
keycol	12	varchar
valcol	-1	text
 
ps.executeUpdate() or ps.executeBatch() throw an exception with the above text.
performing the equivalent operations with the mysql cli works...

Suggested fix:
make it work, quick :) i'm not aware of any other change than my platform.
[16 Feb 2006 16:48] Raimund Jacob
As suggested, I used the
  useServerPrepStmts=false
property to the jdbc driver and that worked around the problem. shall i compile my own mysql 4.1[.15] and see if it's a debian breakage?
[19 Feb 2006 11:45] Valeriy Kravchuk
Thank you for a problem report. Please, try to install MySQL's binaries of 4.1.18 and try to repeat the problem with it. Inform about the results.
[20 Mar 2006 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[24 Mar 2006 16:16] Raimund Jacob
Sorry for not reporting back, i was quite busy.

I set up a little playground and can confirm that this bug does not exist on installations as downloaded from mysql in these files:

mysql-standard-4.0.26-unknown-linux-gnu-x86_64-glibc23.tar.gz
mysql-standard-4.1.18-unknown-linux-gnu-x86_64-glibc23.tar.gz
mysql-standard-5.0.19-linux-x86_64-glibc23.tar.gz
mysql-5.1.7-beta-linux-x86_64-glibc23.tar.gz

so it seems the problem originally is a Debian (perhaps also Ubuntu) one. I don't know if it was reported or fixed there, though.

Thanks for taking the time to investigate,
    Raimund
[27 Mar 2006 13:05] Valeriy Kravchuk
So, I am closing this bug report as the bug is not in MySQL code.

Please, check links in bug #8555 for possible reasons (glibc issues) and fixes for Debian and Ubuntu.