GRANT/CREATE PROCEDURE fails Prepare

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
upscene

GRANT/CREATE PROCEDURE fails Prepare

Post by upscene » Mon 02 Jan 2006 10:55

Hi,

When issueing a GRANT or CREATE PROCEDURE statement and doing a Prepare, this fails with error:
#HY000This command is not supported in the prepared statement protocol yet

Given generic code (that is: ALL statements are prepared), perhaps this should be silently ignored?

I'm using MySQL 5.

--
Martijn Tonies
Upscene Productions

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Tue 03 Jan 2006 16:00

This is MySQL server error message. We can't advise any solution to avoid this problem.

upscene

Post by upscene » Wed 04 Jan 2006 10:32

How about just ignoring it silently?

For example, how does it work on MySQL 4, which, I believe, doesn't have the prepare protocol yet?
--
Martijn Tonies
Upscene Productions

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Wed 04 Jan 2006 14:41

In our opinion it isn't good way to silent ignore user code.

upscene

Post by upscene » Wed 04 Jan 2006 15:31

I guess that depends on your way of seeing the "prepare".

For MySQL 4, a Delphi-side "prepare" doesn't do a thing cause it doesn't support the MySQL native Prepare Protocol, right?

So for statements that not (yet) support a MySQL server-side prepare, why not ignore the error as well?

--
Martijn Tonies
Upscene Productions

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Thu 05 Jan 2006 09:44

We do not think there are major advantages of this approach. We will remain consistent with existing functionality.

upscene

Post by upscene » Thu 05 Jan 2006 13:36

Well, for one thing, it avoids people have to check if their code runs against 4.1 (and calling Prepare as always) or running against 4.0 (and NOT calling Prepare). Or - as I got a confirmation by e-mail earlier - will it ignore the Prepare when running against 4.0.

Another "plus": people don't have to check the statement type and can call Prepare always, even though MySQL itself doesn't support it for that particular statment type.

--
Martijn Tonies
Upscene Productions

Post Reply