List:Commits« Previous MessageNext Message »
From:paul Date:February 22 2006 6:05pm
Subject:svn commit - mysqldoc@docsrva: r1425 - in trunk: . refman-5.0 refman-5.1 refman-common
View as plain text  
Author: paul
Date: 2006-02-22 19:05:24 +0100 (Wed, 22 Feb 2006)
New Revision: 1425

Log:
 r8040@frost:  paul | 2006-02-22 12:04:52 -0600
 Update to store function logging description. (Bug#14769)


Modified:
   trunk/
   trunk/refman-5.0/stored-procedures.xml
   trunk/refman-5.1/stored-procedures.xml
   trunk/refman-common/news-5.0.xml
   trunk/refman-common/news-5.1.xml


Property changes on: trunk
___________________________________________________________________
Name: svk:merge
   - b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:8037
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:3504
   + b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:8040
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:3504

Modified: trunk/refman-5.0/stored-procedures.xml
===================================================================
--- trunk/refman-5.0/stored-procedures.xml	2006-02-22 16:18:05 UTC (rev 1424)
+++ trunk/refman-5.0/stored-procedures.xml	2006-02-22 18:05:24 UTC (rev 1425)
@@ -2313,16 +2313,16 @@
         <para>
           MySQL 5.0.12: For stored functions, when a function invocation
           that changes data occurs within a non-logged statement such as
-          <literal>SELECT</literal>, the server logs a
-          <literal>DO</literal> statement that invokes the function so
-          that the function gets executed during data recovery or
-          replication to slave servers. For stored procedures, the
-          server does not log <literal>CALL</literal> statements.
-          Instead, it logs individual statements within a procedure that
-          are executed as a result of a <literal>CALL</literal>. This
-          eliminates problems that may occur when a procedure would
-          follow a different execution path on a slave than on the
-          master.
+          <literal>SELECT</literal>, the server logs a <literal>DO
+          <replaceable>func_name</replaceable>()</literal> statement
+          that invokes the function so that the function gets executed
+          during data recovery or replication to slave servers. For
+          stored procedures, the server does not log
+          <literal>CALL</literal> statements. Instead, it logs
+          individual statements within a procedure that are executed as
+          a result of a <literal>CALL</literal>. This eliminates
+          problems that may occur when a procedure would follow a
+          different execution path on a slave than on the master.
         </para>
       </listitem>
 
@@ -2336,6 +2336,16 @@
         </para>
       </listitem>
 
+      <listitem>
+        <para>
+          MySQL 5.0.17: Logging of stored functions as <literal>DO
+          <replaceable>func_name</replaceable>()</literal> statements
+          (per the changes made in 5.0.12) are logged as <literal>SELECT
+          <replaceable>func_name</replaceable>()</literal> statements
+          instead for better control over error checking.
+        </para>
+      </listitem>
+
     </itemizedlist>
 
     <para>
@@ -2919,6 +2929,15 @@
           occurs, that is the expected result and replication continues.
           Otherwise, replication stops.
         </para>
+
+        <para>
+          Note: See later in this section for changes made in MySQL
+          5.0.19: These logged <literal>DO
+          <replaceable>func_name</replaceable>()</literal> statements
+          are logged as <literal>SELECT
+          <replaceable>func_name</replaceable>()</literal> statements
+          instead.
+        </para>
       </listitem>
 
       <listitem>
@@ -3112,6 +3131,20 @@
       to routines in general are re-worded.
     </para>
 
+    <para>
+      <emphasis role="bold">Routine logging changes in MySQL
+      5.0.19:</emphasis> In 5.0.12, a change was introduced to log a
+      stored function invocation as <literal>DO
+      <replaceable>func_name</replaceable>()</literal> if the invocation
+      changes data and occurs within a non-logged statement, or if the
+      function invokes a stored procedure that produces an error. In
+      5.0.19, these invocations are logged as <literal>SELECT
+      <replaceable>func_name</replaceable>()</literal> instead. The
+      change to <literal>SELECT</literal> was made because use of
+      <literal>DO</literal> was found to yield insufficient control over
+      error code checking.
+    </para>
+
   </section>
 
 </chapter>

Modified: trunk/refman-5.1/stored-procedures.xml
===================================================================
--- trunk/refman-5.1/stored-procedures.xml	2006-02-22 16:18:05 UTC (rev 1424)
+++ trunk/refman-5.1/stored-procedures.xml	2006-02-22 18:05:24 UTC (rev 1425)
@@ -2316,14 +2316,14 @@
       <listitem>
         <para>
           A stored function invocation is logged as a
-          <literal>DO</literal> statement if the function changes data
-          and occurs within a statement that would not otherwise be
+          <literal>SELECT</literal> statement if the function changes
+          data and occurs within a statement that would not otherwise be
           logged. This prevents non-replication of data changes that
           result from use of stored functions in non-logged statements.
           For example, <literal>SELECT</literal> statements are not
           written to the binary log, but a <literal>SELECT</literal>
           might invoke a stored function that makes changes. To handle
-          this, a <literal>DO
+          this, a <literal>SELECT
           <replaceable>func_name</replaceable>()</literal> statement is
           written to the binary log when the given function makes a
           change. Suppose that the following statements are executed on
@@ -2348,24 +2348,34 @@
           When the <literal>SELECT</literal> statement executes, the
           function <literal>f1()</literal> is invoked three times. Two
           of those invocations insert a row, and MySQL logs a
-          <literal>DO</literal> statement for each of them. That is,
+          <literal>SELECT</literal> statement for each of them. That is,
           MySQL writes the following statements to the binary log:
         </para>
 
 <programlisting>
-DO f1(1);
-DO f1(2);
+SELECT f1(1);
+SELECT f1(2);
 </programlisting>
 
         <para>
-          The server also logs a <literal>DO</literal> statement for a
-          stored function invocation when the function invokes a stored
-          procedure that causes an error. In this case, the server
-          writes the <literal>DO</literal> statement to the log along
-          with the expected error code. On the slave, if the same error
-          occurs, that is the expected result and replication continues.
-          Otherwise, replication stops.
+          The server also logs a <literal>SELECT</literal> statement for
+          a stored function invocation when the function invokes a
+          stored procedure that causes an error. In this case, the
+          server writes the <literal>SELECT</literal> statement to the
+          log along with the expected error code. On the slave, if the
+          same error occurs, that is the expected result and replication
+          continues. Otherwise, replication stops.
         </para>
+
+        <para>
+          Note: Before MySQL 5.1.7, you will see these <literal>SELECT
+          <replaceable>func_name</replaceable>()</literal> statements
+          logged as <literal>DO
+          <replaceable>func_name</replaceable>()</literal>. The change
+          to <literal>SELECT</literal> was made because use of
+          <literal>DO</literal> was found to yield insufficient control
+          over error code checking.
+        </para>
       </listitem>
 
       <listitem>

Modified: trunk/refman-common/news-5.0.xml
===================================================================
--- trunk/refman-common/news-5.0.xml	2006-02-22 16:18:05 UTC (rev 1424)
+++ trunk/refman-common/news-5.0.xml	2006-02-22 18:05:24 UTC (rev 1425)
@@ -325,6 +325,22 @@
 
       <listitem>
         <para>
+          Previously, a stored function invocation was written to the
+          binary log as <literal>DO
+          <replaceable>func_name</replaceable>()</literal> if the
+          invocation changes data and occurs within a non-logged
+          statement, or if the function invokes a stored procedure that
+          produces an error. These invocations now are logged as
+          <literal>SELECT
+          <replaceable>func_name</replaceable>()</literal> instead for
+          better control over error code checking (slave servers could
+          stop due to detecting a different error than occurred on the
+          master). (Bug #14769)
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
           MySQL server dropped client connection for certain SELECT
           statements against views defined that used
           <literal>MERGE</literal> algorithm. (Bug #16260)

Modified: trunk/refman-common/news-5.1.xml
===================================================================
--- trunk/refman-common/news-5.1.xml	2006-02-22 16:18:05 UTC (rev 1424)
+++ trunk/refman-common/news-5.1.xml	2006-02-22 18:05:24 UTC (rev 1425)
@@ -186,6 +186,22 @@
 
       <listitem>
         <para>
+          Previously, a stored function invocation was written to the
+          binary log as <literal>DO
+          <replaceable>func_name</replaceable>()</literal> if the
+          invocation changes data and occurs within a non-logged
+          statement, or if the function invokes a stored procedure that
+          produces an error. These invocations now are logged as
+          <literal>SELECT
+          <replaceable>func_name</replaceable>()</literal> instead for
+          better control over error code checking (slave servers could
+          stop due to detecting a different error than occurred on the
+          master). (Bug #14769)
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
           Querying the <literal>INFORMATION_SCHEMA.partitions</literal>
           table on a non-max server caused a server crash. (Bug #16591)
         </para>

Thread
svn commit - mysqldoc@docsrva: r1425 - in trunk: . refman-5.0 refman-5.1 refman-commonpaul22 Feb