From: Date: February 22 2006 7:05pm
Subject: svn commit - mysqldoc@docsrva: r1425 - in trunk: . refman-5.0 refman-5.1 refman-common
List-Archive: http://lists.mysql.com/commits/3035
Message-Id: <200602221805.k1MI5PKP032331@docsrva.mysql.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
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 @@
MySQL 5.0.12: For stored functions, when a function invocation
that changes data occurs within a non-logged statement such as
- SELECT, the server logs a
- DO 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 CALL statements.
- Instead, it logs individual statements within a procedure that
- are executed as a result of a CALL. This
- eliminates problems that may occur when a procedure would
- follow a different execution path on a slave than on the
- master.
+ SELECT, the server logs a DO
+ func_name() 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
+ CALL statements. Instead, it logs
+ individual statements within a procedure that are executed as
+ a result of a CALL. This eliminates
+ problems that may occur when a procedure would follow a
+ different execution path on a slave than on the master.
@@ -2336,6 +2336,16 @@
+
+
+ MySQL 5.0.17: Logging of stored functions as DO
+ func_name() statements
+ (per the changes made in 5.0.12) are logged as SELECT
+ func_name() statements
+ instead for better control over error checking.
+
+
+
@@ -2919,6 +2929,15 @@
occurs, that is the expected result and replication continues.
Otherwise, replication stops.
+
+
+ Note: See later in this section for changes made in MySQL
+ 5.0.19: These logged DO
+ func_name() statements
+ are logged as SELECT
+ func_name() statements
+ instead.
+
@@ -3112,6 +3131,20 @@
to routines in general are re-worded.
+
+ Routine logging changes in MySQL
+ 5.0.19: In 5.0.12, a change was introduced to log a
+ stored function invocation as DO
+ func_name() 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 SELECT
+ func_name() instead. The
+ change to SELECT was made because use of
+ DO was found to yield insufficient control over
+ error code checking.
+
+
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 @@
A stored function invocation is logged as a
- DO statement if the function changes data
- and occurs within a statement that would not otherwise be
+ SELECT 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, SELECT statements are not
written to the binary log, but a SELECT
might invoke a stored function that makes changes. To handle
- this, a DO
+ this, a SELECT
func_name() 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 SELECT statement executes, the
function f1() is invoked three times. Two
of those invocations insert a row, and MySQL logs a
- DO statement for each of them. That is,
+ SELECT statement for each of them. That is,
MySQL writes the following statements to the binary log:
-DO f1(1);
-DO f1(2);
+SELECT f1(1);
+SELECT f1(2);
- The server also logs a DO statement for a
- stored function invocation when the function invokes a stored
- procedure that causes an error. In this case, the server
- writes the DO 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 SELECT statement for
+ a stored function invocation when the function invokes a
+ stored procedure that causes an error. In this case, the
+ server writes the SELECT 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.
+
+
+ Note: Before MySQL 5.1.7, you will see these SELECT
+ func_name() statements
+ logged as DO
+ func_name(). The change
+ to SELECT was made because use of
+ DO was found to yield insufficient control
+ over error code checking.
+
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 @@
+ Previously, a stored function invocation was written to the
+ binary log as DO
+ func_name() 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
+ SELECT
+ func_name() 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)
+
+
+
+
+
MySQL server dropped client connection for certain SELECT
statements against views defined that used
MERGE 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 @@
+ Previously, a stored function invocation was written to the
+ binary log as DO
+ func_name() 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
+ SELECT
+ func_name() 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)
+
+
+
+
+
Querying the INFORMATION_SCHEMA.partitions
table on a non-max server caused a server crash. (Bug #16591)