Author: paul
Date: 2006-01-18 00:30:44 +0100 (Wed, 18 Jan 2006)
New Revision: 882
Log:
r6324@frost: paul | 2006-01-17 17:20:20 -0600
Add upgrade info from 5.0 manual that 5.1 manual needs but was missing.
Modified:
trunk/
trunk/refman-5.1/installing.xml
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:6322
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:2265
+ b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:6324
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:2265
Modified: trunk/refman-5.1/installing.xml
===================================================================
--- trunk/refman-5.1/installing.xml 2006-01-17 22:31:51 UTC (rev 881)
+++ trunk/refman-5.1/installing.xml 2006-01-17 23:30:44 UTC (rev 882)
@@ -12055,6 +12055,98 @@
<listitem>
<para>
+ <emphasis role="bold">Incompatible change:</emphasis> The
+ namespace for triggers has changed in MySQL 5.0.10.
+ Previously, trigger names had to be unique per table. Now
+ they must be unique within the schema (database). An
+ implication of this change is that <literal>DROP
+ TRIGGER</literal> syntax now uses a schema name instead of a
+ table name (schema name is optional and, if omitted, the
+ current schema will be used).
+ </para>
+
+ <para>
+ When upgrading from a previous version of MySQL 5 to MySQL
+ 5.0.10 or newer, you must drop all triggers and re-create
+ them or <literal>DROP TRIGGER</literal> will not work after
+ the upgrade. Here is a suggested procedure for doing this:
+ </para>
+
+ <orderedlist>
+
+ <listitem>
+ <para>
+ Upgrade to MySQL 5.0.10 or later to be able to access
+ trigger information in the
+ <literal>INFORMATION_SCHEMA.TRIGGERS</literal> table.
+ (It should work even for pre-5.0.10 triggers.)
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Dump all trigger definitions using the following
+ <literal>SELECT</literal> statement:
+ </para>
+
+<programlisting>
+SELECT CONCAT('CREATE TRIGGER ', t.TRIGGER_SCHEMA, '.', t.TRIGGER_NAME,
+ ' ', t.ACTION_TIMING, ' ', t.EVENT_MANIPULATION, ' ON ',
+ t.EVENT_OBJECT_SCHEMA, '.', t.EVENT_OBJECT_TABLE,
+ ' FOR EACH ROW ', t.ACTION_STATEMENT, '//' )
+INTO OUTFILE '/tmp/triggers.sql'
+FROM INFORMATION_SCHEMA.TRIGGERS AS t;
+</programlisting>
+
+ <para>
+ The statement uses <literal>INTO OUTFILE</literal>, so
+ you must have the <literal>FILE</literal> privilege. The
+ file will be created on the server host; use a different
+ filename if you like. To be 100% safe, inspect the
+ trigger definitions in the
+ <filename>triggers.sql</filename> file, and perhaps make
+ a backup of the file.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Stop the server and drop all triggers by removing all
+ <filename>.TRG</filename> files in your database
+ directories. Change location to your data directory and
+ issue this command:
+ </para>
+
+<programlisting>
+shell> <userinput>rm */*.TRG</userinput>
+</programlisting>
+ </listitem>
+
+ <listitem>
+ <para>
+ Start the server and re-create all triggers using the
+ <filename>triggers.sql</filename> file: For example in
+ my case it was:
+ </para>
+
+<programlisting>
+mysql> <userinput>delimiter // ;</userinput>
+mysql> <userinput>source /tmp/triggers.sql //</userinput>
+</programlisting>
+ </listitem>
+
+ <listitem>
+ <para>
+ Check that all triggers were successfully created using
+ the <filename>SHOW TRIGGERS</filename> statement.
+ </para>
+ </listitem>
+
+ </orderedlist>
+ </listitem>
+
+ <listitem>
+ <para>
Some keywords are reserved in MySQL ¤t-series; that
were not reserved in MySQL &previous-series;. See
<xref linkend="reserved-words"/>.
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r882 - in trunk: . refman-5.1 | paul | 18 Jan |