Re: "This command is not supported in the prepared statement protocol yet"
No, I'll certainly not use DDL statements repeatedly in my application - with the exception of our CREATE UNIQUE KEY benchmark ;-). I'll have to explain the context of the code that fails.
Our application has an abstract database interface with drivers for a number of RDBMS. This means, the interface has methods for open/close/prepare/bind/execute/fetchrow.. It's a bit like Perl-DBI, but for C++. So the DB driver doesn't know anything about the SQL statement it has to prepare/execute. This leads to the situation that each statement is prepared - even if it is executed only once. I believe this is generally no problem, for it works with all other supported database drivers like Oracle, DB/2 and MaxDB.
I have implemented a workaround for this "error": when this error occurs I simply call mysql_real_query instead of a later mysql_stmt_execute. Not very elegant, but it works.
Do you have any idea, when DDL statements will be available in mysql? Can you be more precise with "further versions"? I think it's strange that CREATE TABLE can be prepared, while CREATE INDEX cannot. In my opinion there has to be at least a remark in the documentation of mysql_stmt_prepare/execute, that there are statements that don't work with it.
Andreas
Subject
Written By
Posted
November 02, 2004 04:28AM
November 02, 2004 06:14AM
November 02, 2004 10:53AM
Re: "This command is not supported in the prepared statement protocol yet"
November 03, 2004 05:21AM
November 03, 2004 03:31PM
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.