R Lenard wrote:
> Mark Matthews wrote:
> > If you know that you won't be gaining
> anything
> > from the use of server-side prepared
> statements,
> > or if you know you have statements that
> aren't
> > supported (the list is at
> >
>
http://dev.mysql.com/doc/mysql/en/C_API_Prepared_s
>
> > tatements.html , I'll add that to the
> Connector/J
> > docs so that it's easier to find), then just
> turn
> > off server-side prepared statements with the
> > 'useServerPrepStmts=false' flag.
>
> Then there's a bug ??
>
> From that URL ..
>
> The following statements can be used as prepared
> statements: CREATE TABLE, DELETE, DO, INSERT,
> REPLACE, SELECT, SET, UPDATE, and most SHOW,
> statements. Other statements are not yet
> supported.
>
> My example is a REPLACE.
Yes, but the error message is from the server, and the JDBC driver does nothing but pass your query on as a string during the prepare phase.
So, it's not a bug with the driver, it's a shortcoming of the version of the server you're running. I just tried this with the latest released version of MySQL-4.1 (4.1.8) and it seems to work. What version of the server are you using?
Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html