Bug #60000 17.4.1.8. Replication of Invoked Features: all examples use unimplemented constr
Submitted: 7 Feb 2011 21:27 Modified: 28 Jun 2011 18:17
Reporter: Dan Lukes Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S1 (Critical)
Version:5.5.8, 5.5.10 OS:Any
Assigned to: Paul DuBois CPU Architecture:Any

[7 Feb 2011 21:27] Dan Lukes
Description:
http://dev.mysql.com/doc/refman/5.5/en/replication-features-invoked.html

... show several examples using PREPARE together with ALTER TABLE

Nice examples, but referring unimplemented non working feature.

ALTER TABLE can't be used in prepared statements now.

See:
http://dev.mysql.com/doc/refman/5.5/en/sql-syntax-prepared-statements.html
http://forge.mysql.com/worklog/task.php?id=2871

 or try it:
ERROR 1295 (HY000): This command is not supported in the prepared statement protocol yet

How to repeat:
PREPARE x FROM "ALTER EVENT y DISABLE";

Suggested fix:
Remove most of page content - from sentence:
"You can do this with a stored procedure, such as the one shown here:"
... to end of page because the content is confusing.
[8 Feb 2011 4:13] Valeriy Kravchuk
Sorry, but I do not see any ALTER TABLE at http://dev.mysql.com/doc/refman/5.5/en/replication-features-invoked.html. I see ALTER EVENT used in examples. Please, check.
[8 Feb 2011 4:21] Valeriy Kravchuk
But indeed, ALTER EVENT does not work this way:

macbook-pro:5.5 openxs$ bin/mysql -uroot test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.5.10-debug Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> PREPARE x FROM "ALTER EVENT y DISABLE";
ERROR 1295 (HY000): This command is not supported in the prepared statement protocol yet
mysql> SET @str = "ALTER EVENT y DISABLE";
Query OK, 0 rows affected (0.00 sec)
mysql>  PREPARE stmt FROM @str;
ERROR 1295 (HY000): This command is not supported in the prepared statement protocol yet

So, procedures will compile but will not really work if some events are defined.
[10 Feb 2011 4:15] Dan Lukes
Mea culpa.

I'm so sorry, ALTER EVENT should be mentioned on report, not ALTER TABLE, of course.
[28 Jun 2011 18:17] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.