List:Commits« Previous MessageNext Message »
From:jon Date:December 4 2006 1:06pm
Subject:svn commit - mysqldoc@docsrva: r4102 - in trunk: refman-5.0 refman-5.1
View as plain text  
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 @@
 <programlisting>
 RENAME TABLE <replaceable>current_db.tbl_name</replaceable> TO <replaceable>other_db.tbl_name;</replaceable>
 </programlisting>
+      
+      <para>
+        Beginning with MySQL 5.0.2, if there are any triggers associated
+        with a table which is moved to a different database using
+        <literal>RENAME TABLE</literal>, then the statement fails with
+        the error <errortext>Trigger in wrong schema</errortext>.
+      </para>
 
       <para>
         As of MySQL 5.0.14, <literal>RENAME TABLE</literal> 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 @@
 <programlisting>
 RENAME TABLE <replaceable>current_db.tbl_name</replaceable> TO <replaceable>other_db.tbl_name;</replaceable>
 </programlisting>
+      
+      <para>
+        If there are any triggers associated with a table which is moved
+        to a different database using <literal>RENAME TABLE</literal>,
+        then the statement fails with the error <errortext>Trigger in
+          wrong schema</errortext>.
+      </para>
 
       <para>
         <literal>RENAME TABLE</literal> also works for views, as long as


Thread
svn commit - mysqldoc@docsrva: r4102 - in trunk: refman-5.0 refman-5.1jon4 Dec