From: jon Date: December 4 2006 1:06pm Subject: svn commit - mysqldoc@docsrva: r4102 - in trunk: refman-5.0 refman-5.1 List-Archive: http://lists.mysql.com/commits/16380 Message-Id: <200612041306.kB4D67QC026936@docsrva.mysql.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Author: jstephens Date: 2006-12-04 14:06:06 +0100 (Mon, 04 Dec 2006) New Revision: 4102 Log: You can't use RENAME TABLE to move a table to a different database if there are any triggers associated with it (Thanks, Simon G!) Modified: trunk/refman-5.0/sql-syntax.xml trunk/refman-5.1/sql-syntax.xml Modified: trunk/refman-5.0/sql-syntax.xml =================================================================== --- trunk/refman-5.0/sql-syntax.xml 2006-12-04 05:57:43 UTC (rev 4101) +++ trunk/refman-5.0/sql-syntax.xml 2006-12-04 13:06:06 UTC (rev 4102) Changed blocks: 1, Lines Added: 7, Lines Deleted: 0; 809 bytes @@ -3275,6 +3275,13 @@ RENAME TABLE current_db.tbl_name TO other_db.tbl_name; + + + Beginning with MySQL 5.0.2, if there are any triggers associated + with a table which is moved to a different database using + RENAME TABLE, then the statement fails with + the error Trigger in wrong schema. + As of MySQL 5.0.14, RENAME TABLE also works Modified: trunk/refman-5.1/sql-syntax.xml =================================================================== --- trunk/refman-5.1/sql-syntax.xml 2006-12-04 05:57:43 UTC (rev 4101) +++ trunk/refman-5.1/sql-syntax.xml 2006-12-04 13:06:06 UTC (rev 4102) Changed blocks: 1, Lines Added: 7, Lines Deleted: 0; 785 bytes @@ -4693,6 +4693,13 @@ RENAME TABLE current_db.tbl_name TO other_db.tbl_name; + + + If there are any triggers associated with a table which is moved + to a different database using RENAME TABLE, + then the statement fails with the error Trigger in + wrong schema. + RENAME TABLE also works for views, as long as