List:Internals« Previous MessageNext Message »
From:jon Date:July 30 2005 7:47am
Subject:bk commit - mysqldoc@docsrva tree (jon:1.3141)
View as plain text  
Below is the list of changes that have just been committed into a local
mysqldoc repository of jon. When jon does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://www.mysql.com/doc/I/n/Installing_source_tree.html

ChangeSet
  1.3141 05/07/30 17:47:33 jon@stripped +4 -0
  Added/updated triggers examples/explanations.
  
  Sync refman-5.0.

  refman/sql-syntax.xml
    1.26 05/07/30 17:47:31 jon@stripped +30 -14
    Amended SHOW TRIGGERS example and explanation.

  refman/information-schema.xml
    1.11 05/07/30 17:47:31 jon@stripped +31 -2
    Added example.

  refman-5.0/sql-syntax.xml
    1.31 05/07/30 17:47:30 jon@stripped +31 -15
    Sync.

  refman-5.0/information-schema.xml
    1.11 05/07/30 17:47:30 jon@stripped +29 -2
    Sync.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jon
# Host:	gigan.
# Root:	/home/jon/bk/mysqldoc

--- 1.10/refman-5.0/information-schema.xml	2005-07-30 15:07:40 +10:00
+++ 1.11/refman-5.0/information-schema.xml	2005-07-30 17:47:30 +10:00
@@ -3243,12 +3243,39 @@
               <literal>ACTION_CONDITION</literal>,
               <literal>ACTION_REFERENCE_OLD_TABLE</literal>,
               <literal>ACTION_REFERENCE_NEW_TABLE</literal>, and
-              <literal>CREATED</literal> (displayed for this column as 
-              <literal>0</literal>).
+              <literal>CREATED</literal>.
             </para>
           </listitem>
 
         </itemizedlist>
+      </para>
+      
+      <para>
+        Example, using the <literal>ins_sum</literal> trigger defined in
+        <xref linkend="using-triggers"/>:
+
+<programlisting>
+mysql> SELECT * FROM INFORMATION_SCHEMA.TRIGGERS\G
+*************************** 1. row ***************************
+           TRIGGER_CATALOG: NULL
+            TRIGGER_SCHEMA: test
+              TRIGGER_NAME: ins_sum
+        EVENT_MANIPULATION: INSERT
+      EVENT_OBJECT_CATALOG: NULL
+       EVENT_OBJECT_SCHEMA: test
+        EVENT_OBJECT_TABLE: account
+              ACTION_ORDER: 0
+          ACTION_CONDITION: NULL
+          ACTION_STATEMENT:  SET @sum = @sum + NEW.amount
+        ACTION_ORIENTATION: ROW
+             ACTION_TIMING: BEFORE
+ACTION_REFERENCE_OLD_TABLE: NULL
+ACTION_REFERENCE_NEW_TABLE: NULL
+  ACTION_REFERENCE_OLD_ROW: OLD
+  ACTION_REFERENCE_NEW_ROW: NEW
+                   CREATED: NULL
+1 row in set (1.54 sec)
+</programlisting>
       </para>
 
       <para>

--- 1.30/refman-5.0/sql-syntax.xml	2005-07-30 15:39:28 +10:00
+++ 1.31/refman-5.0/sql-syntax.xml	2005-07-30 17:47:30 +10:00
@@ -14663,30 +14663,47 @@
         </indexterm>
 
         <para>
+<programlisting>
+SHOW TRIGGERS [FROM <replaceable>db_name</replaceable>] [LIKE <replaceable>expr</replaceable>]
+</programlisting>
+        </para>
+
+        <para>
           <literal>SHOW TRIGGERS</literal> lists the triggers currently
           defined on the MySQL server. It was implemented in MySQL
           5.0.10.
         </para>
-        
+
         <para>
-          Syntax:
+          For the trigger <literal>ins_sum</literal> as defined in 
+          <xref linkend="using-triggers"/>, the output of this statement 
+          is as shown here:
+
 <programlisting>
-SHOW TRIGGERS [FROM <replaceable>db_name</replaceable>] [LIKE <replaceable>expr</replaceable>]
+mysql&gt; SHOW TRIGGERS LIKE 'acc%';
++---------+--------+---------+-------------------------------+--------+---------+
+| Trigger | Event  | Table   | Statement                     | Timing | Created |
++---------+--------+---------+-------------------------------+--------+---------+
+| ins_sum | INSERT | account |  SET @sum = @sum + NEW.amount | BEFORE | NULL    |
++---------+--------+---------+-------------------------------+--------+---------+
 </programlisting>
         </para>
-
+        
         <para>
-          The output of this statement resembles the following:
-
+          <emphasis role="bold">Note</emphasis>: When using a 
+          <literal>LIKE</literal> clause with <literal>SHOW 
+          TRIGGERS</literal>, the expression to be matched
+          (<replaceable>expr</replaceable>) is compared with the name 
+          of the table on which the trigger is declared, and not with 
+          the name of the trigger:
+          
 <programlisting>
-mysql&gt; SHOW TRIGGERS;
-+---------+--------+-------+-------------+--------+---------+
-| Trigger | Event  | Table | Statement   | Timing | Created |
-+---------+--------+-------+-------------+--------+---------+
-| tn      | INSERT | t5    |  set @n = 5 | BEFORE | NULL    |
-+---------+--------+-------+-------------+--------+---------+
+mysql&gt; SHOW TRIGGERS LIKE 'ins%';
+Empty set (0.01 sec)
 </programlisting>
-
+        </para>
+        
+        <para>
           A brief explanation of the columns in the output of this
           statement is shown here:
 
@@ -14732,8 +14749,7 @@
             <listitem>
               <para>
                 <literal>Created</literal>: Currently this value of this 
-                column is always <literal>NULL</literal> (displayed as 
-                <literal>0</literal>).
+                column is always <literal>NULL</literal>.
               </para>
             </listitem>
 

--- 1.10/refman/information-schema.xml	2005-07-30 15:07:40 +10:00
+++ 1.11/refman/information-schema.xml	2005-07-30 17:47:31 +10:00
@@ -3232,12 +3232,41 @@
               <literal>ACTION_CONDITION</literal>,
               <literal>ACTION_REFERENCE_OLD_TABLE</literal>,
               <literal>ACTION_REFERENCE_NEW_TABLE</literal>, and
-              <literal>CREATED</literal> (displayed for this column as 
-              <literal>0</literal>).
+              <literal>CREATED</literal>.
             </para>
           </listitem>
           
         </itemizedlist>
+      </para>
+      
+
+      
+      <para>
+        Example, using the <literal>ins_sum</literal> trigger defined in
+        <xref linkend="using-triggers"/>:
+
+<programlisting>
+mysql> SELECT * FROM INFORMATION_SCHEMA.TRIGGERS\G
+*************************** 1. row ***************************
+           TRIGGER_CATALOG: NULL
+            TRIGGER_SCHEMA: test
+              TRIGGER_NAME: ins_sum
+        EVENT_MANIPULATION: INSERT
+      EVENT_OBJECT_CATALOG: NULL
+       EVENT_OBJECT_SCHEMA: test
+        EVENT_OBJECT_TABLE: account
+              ACTION_ORDER: 0
+          ACTION_CONDITION: NULL
+          ACTION_STATEMENT:  SET @sum = @sum + NEW.amount
+        ACTION_ORIENTATION: ROW
+             ACTION_TIMING: BEFORE
+ACTION_REFERENCE_OLD_TABLE: NULL
+ACTION_REFERENCE_NEW_TABLE: NULL
+  ACTION_REFERENCE_OLD_ROW: OLD
+  ACTION_REFERENCE_NEW_ROW: NEW
+                   CREATED: NULL
+1 row in set (1.54 sec)
+</programlisting>
       </para>
       
       <para>

--- 1.25/refman/sql-syntax.xml	2005-07-30 15:39:28 +10:00
+++ 1.26/refman/sql-syntax.xml	2005-07-30 17:47:31 +10:00
@@ -15081,32 +15081,49 @@
         <indexterm type="function">
           <primary>SHOW TRIGGERS</primary>
         </indexterm>
+        
+        <para>
+<programlisting>
+SHOW TRIGGERS [FROM <replaceable>db_name</replaceable>] [LIKE <replaceable>expr</replaceable>]
+</programlisting>
+        </para>
 
         <para>
           <literal>SHOW TRIGGERS</literal> lists the triggers currently
           defined on the MySQL server. It was implemented in MySQL
           5.0.10.
         </para>
-        
+
         <para>
-          Syntax:
+          For the trigger <literal>ins_sum</literal> as defined in 
+          <xref linkend="using-triggers"/>, the output of this statement 
+          is as shown here:
+
 <programlisting>
-SHOW TRIGGERS [FROM <replaceable>db_name</replaceable>] [LIKE <replaceable>expr</replaceable>]
+mysql&gt; SHOW TRIGGERS LIKE 'acc%';
++---------+--------+---------+-------------------------------+--------+---------+
+| Trigger | Event  | Table   | Statement                     | Timing | Created |
++---------+--------+---------+-------------------------------+--------+---------+
+| ins_sum | INSERT | account |  SET @sum = @sum + NEW.amount | BEFORE | NULL    |
++---------+--------+---------+-------------------------------+--------+---------+
 </programlisting>
         </para>
-
+        
         <para>
-          The output of this statement resembles the following:
-
+          <emphasis role="bold">Note</emphasis>: When using a 
+          <literal>LIKE</literal> clause with <literal>SHOW 
+          TRIGGERS</literal>, the expression to be matched
+          (<replaceable>expr</replaceable>) is compared with the name 
+          of the table on which the trigger is declared, and not with 
+          the name of the trigger:
+          
 <programlisting>
-mysql&gt; SHOW TRIGGERS;
-+---------+--------+-------+-------------+--------+---------+
-| Trigger | Event  | Table | Statement   | Timing | Created |
-+---------+--------+-------+-------------+--------+---------+
-| tn      | INSERT | t5    |  set @n = 5 | BEFORE | NULL    |
-+---------+--------+-------+-------------+--------+---------+
+mysql&gt; SHOW TRIGGERS LIKE 'ins%';
+Empty set (0.01 sec)
 </programlisting>
+        </para>
 
+        <para>
           A brief explanation of the columns in the output of this
           statement is shown here:
 
@@ -15152,8 +15169,7 @@
             <listitem>
               <para>
                 <literal>Created</literal>: Currently this value of this 
-                column is always <literal>NULL</literal> (displayed as 
-                <literal>0</literal>).
+                column is always <literal>NULL</literal>.
               </para>
             </listitem>
 
Thread
bk commit - mysqldoc@docsrva tree (jon:1.3141)jon30 Jul