Author: paul
Date: 2008-03-05 18:13:22 +0100 (Wed, 05 Mar 2008)
New Revision: 10134
Log:
r29732@frost: paul | 2008-03-05 10:19:07 -0600
Add section for RETURN statement. Use it to point out explicitly
that RETURN is not allowd in stored procedures, triggers, events.
Fix a CREATE FUNCTION example that had no RETURN statement.
Modified:
trunk/it/refman-5.1/stored-procedures.xml
trunk/pt/refman-5.1/stored-procedures.xml
trunk/refman-5.0/stored-procedures.xml
trunk/refman-5.1/stored-procedures.xml
trunk/refman-6.0/stored-procedures.xml
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:35828
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:29718
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:29889
+ 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:35828
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:29732
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:29889
Modified: trunk/it/refman-5.1/stored-procedures.xml
===================================================================
--- trunk/it/refman-5.1/stored-procedures.xml 2008-03-05 16:25:31 UTC (rev 10133)
+++ trunk/it/refman-5.1/stored-procedures.xml 2008-03-05 17:13:22 UTC (rev 10134)
Changed blocks: 3, Lines Added: 44, Lines Deleted: 3; 2026 bytes
@@ -1921,9 +1921,9 @@
<para>
The <literal>IF</literal>, <literal>CASE</literal>,
- <literal>LOOP</literal>, <literal>WHILE</literal>,
- <literal>REPEAT</literal>, <literal>ITERATE</literal>, and
- <literal>LEAVE</literal> constructs are fully implemented.
+ <literal>ITERATE</literal>, <literal>LEAVE</literal>
+ <literal>LOOP</literal>, <literal>WHILE</literal>, and
+ <literal>REPEAT</literal> constructs are fully implemented.
</para>
<para>
@@ -2372,6 +2372,46 @@
</section>
+ <section id="return-statement">
+
+ <title><literal>RETURN</literal> Statement Syntax</title>
+
+ <indexterm>
+ <primary>RETURN</primary>
+ </indexterm>
+
+ <remark role="help-topic" condition="RETURN"/>
+
+ <remark role="help-keywords">
+ RETURN
+ </remark>
+
+ <remark role="help-syntax"/>
+
+<programlisting>
+RETURN <replaceable>expr</replaceable>
+</programlisting>
+
+ <remark role="help-description-begin"/>
+
+ <para>
+ The <literal>RETURN</literal> statement terminates execution of a
+ stored function and returns the value
+ <replaceable>expr</replaceable> to the function caller. There must
+ be at least one <literal>RETURN</literal> statement in a stored
+ function. There may be more than one if the function has multiple
+ exit points.
+ </para>
+
+ <para>
+ This statement is not used in stored procedures, triggers, or
+ events.
+ </para>
+
+ <remark role="help-description-end"/>
+
+ </section>
+
<section id="stored-procedure-last-insert-id">
<title>Stored Procedures, Functions, Triggers, and
@@ -2627,6 +2667,7 @@
IF (a < 3) THEN
INSERT INTO t2 VALUES (a);
END IF;
+ RETURN 0;
END;
CREATE TABLE t1 (a INT);
Modified: trunk/pt/refman-5.1/stored-procedures.xml
===================================================================
--- trunk/pt/refman-5.1/stored-procedures.xml 2008-03-05 16:25:31 UTC (rev 10133)
+++ trunk/pt/refman-5.1/stored-procedures.xml 2008-03-05 17:13:22 UTC (rev 10134)
Changed blocks: 3, Lines Added: 44, Lines Deleted: 3; 2026 bytes
@@ -1921,9 +1921,9 @@
<para>
The <literal>IF</literal>, <literal>CASE</literal>,
- <literal>LOOP</literal>, <literal>WHILE</literal>,
- <literal>REPEAT</literal>, <literal>ITERATE</literal>, and
- <literal>LEAVE</literal> constructs are fully implemented.
+ <literal>ITERATE</literal>, <literal>LEAVE</literal>
+ <literal>LOOP</literal>, <literal>WHILE</literal>, and
+ <literal>REPEAT</literal> constructs are fully implemented.
</para>
<para>
@@ -2372,6 +2372,46 @@
</section>
+ <section id="return-statement">
+
+ <title><literal>RETURN</literal> Statement Syntax</title>
+
+ <indexterm>
+ <primary>RETURN</primary>
+ </indexterm>
+
+ <remark role="help-topic" condition="RETURN"/>
+
+ <remark role="help-keywords">
+ RETURN
+ </remark>
+
+ <remark role="help-syntax"/>
+
+<programlisting>
+RETURN <replaceable>expr</replaceable>
+</programlisting>
+
+ <remark role="help-description-begin"/>
+
+ <para>
+ The <literal>RETURN</literal> statement terminates execution of a
+ stored function and returns the value
+ <replaceable>expr</replaceable> to the function caller. There must
+ be at least one <literal>RETURN</literal> statement in a stored
+ function. There may be more than one if the function has multiple
+ exit points.
+ </para>
+
+ <para>
+ This statement is not used in stored procedures, triggers, or
+ events.
+ </para>
+
+ <remark role="help-description-end"/>
+
+ </section>
+
<section id="stored-procedure-last-insert-id">
<title>Stored Procedures, Functions, Triggers, and
@@ -2627,6 +2667,7 @@
IF (a < 3) THEN
INSERT INTO t2 VALUES (a);
END IF;
+ RETURN 0;
END;
CREATE TABLE t1 (a INT);
Modified: trunk/refman-5.0/stored-procedures.xml
===================================================================
--- trunk/refman-5.0/stored-procedures.xml 2008-03-05 16:25:31 UTC (rev 10133)
+++ trunk/refman-5.0/stored-procedures.xml 2008-03-05 17:13:22 UTC (rev 10134)
Changed blocks: 3, Lines Added: 43, Lines Deleted: 3; 2002 bytes
@@ -1963,9 +1963,9 @@
<para>
The <literal>IF</literal>, <literal>CASE</literal>,
- <literal>LOOP</literal>, <literal>WHILE</literal>,
- <literal>REPEAT</literal>, <literal>ITERATE</literal>, and
- <literal>LEAVE</literal> constructs are fully implemented.
+ <literal>ITERATE</literal>, <literal>LEAVE</literal>
+ <literal>LOOP</literal>, <literal>WHILE</literal>, and
+ <literal>REPEAT</literal> constructs are fully implemented.
</para>
<para>
@@ -2412,6 +2412,45 @@
</section>
+ <section id="return-statement">
+
+ <title><literal>RETURN</literal> Statement Syntax</title>
+
+ <indexterm>
+ <primary>RETURN</primary>
+ </indexterm>
+
+ <remark role="help-topic" condition="RETURN"/>
+
+ <remark role="help-keywords">
+ RETURN
+ </remark>
+
+ <remark role="help-syntax"/>
+
+<programlisting>
+RETURN <replaceable>expr</replaceable>
+</programlisting>
+
+ <remark role="help-description-begin"/>
+
+ <para>
+ The <literal>RETURN</literal> statement terminates execution of a
+ stored function and returns the value
+ <replaceable>expr</replaceable> to the function caller. There must
+ be at least one <literal>RETURN</literal> statement in a stored
+ function. There may be more than one if the function has multiple
+ exit points.
+ </para>
+
+ <para>
+ This statement is not used in stored procedures or triggers.
+ </para>
+
+ <remark role="help-description-end"/>
+
+ </section>
+
<section id="stored-procedure-last-insert-id">
<title>Stored Procedures, Functions, Triggers, and
@@ -3180,6 +3219,7 @@
IF (a < 3) THEN
INSERT INTO t2 VALUES (a);
END IF;
+ RETURN 0;
END;
CREATE TABLE t1 (a INT);
Modified: trunk/refman-5.1/stored-procedures.xml
===================================================================
--- trunk/refman-5.1/stored-procedures.xml 2008-03-05 16:25:31 UTC (rev 10133)
+++ trunk/refman-5.1/stored-procedures.xml 2008-03-05 17:13:22 UTC (rev 10134)
Changed blocks: 3, Lines Added: 44, Lines Deleted: 3; 2017 bytes
@@ -1921,9 +1921,9 @@
<para>
The <literal>IF</literal>, <literal>CASE</literal>,
- <literal>LOOP</literal>, <literal>WHILE</literal>,
- <literal>REPEAT</literal>, <literal>ITERATE</literal>, and
- <literal>LEAVE</literal> constructs are fully implemented.
+ <literal>ITERATE</literal>, <literal>LEAVE</literal>
+ <literal>LOOP</literal>, <literal>WHILE</literal>, and
+ <literal>REPEAT</literal> constructs are fully implemented.
</para>
<para>
@@ -2372,6 +2372,46 @@
</section>
+ <section id="return-statement">
+
+ <title><literal>RETURN</literal> Statement Syntax</title>
+
+ <indexterm>
+ <primary>RETURN</primary>
+ </indexterm>
+
+ <remark role="help-topic" condition="RETURN"/>
+
+ <remark role="help-keywords">
+ RETURN
+ </remark>
+
+ <remark role="help-syntax"/>
+
+<programlisting>
+RETURN <replaceable>expr</replaceable>
+</programlisting>
+
+ <remark role="help-description-begin"/>
+
+ <para>
+ The <literal>RETURN</literal> statement terminates execution of a
+ stored function and returns the value
+ <replaceable>expr</replaceable> to the function caller. There must
+ be at least one <literal>RETURN</literal> statement in a stored
+ function. There may be more than one if the function has multiple
+ exit points.
+ </para>
+
+ <para>
+ This statement is not used in stored procedures, triggers, or
+ events.
+ </para>
+
+ <remark role="help-description-end"/>
+
+ </section>
+
<section id="stored-procedure-last-insert-id">
<title>Stored Procedures, Functions, Triggers, and
@@ -2627,6 +2667,7 @@
IF (a < 3) THEN
INSERT INTO t2 VALUES (a);
END IF;
+ RETURN 0;
END;
CREATE TABLE t1 (a INT);
Modified: trunk/refman-6.0/stored-procedures.xml
===================================================================
--- trunk/refman-6.0/stored-procedures.xml 2008-03-05 16:25:31 UTC (rev 10133)
+++ trunk/refman-6.0/stored-procedures.xml 2008-03-05 17:13:22 UTC (rev 10134)
Changed blocks: 3, Lines Added: 44, Lines Deleted: 3; 2017 bytes
@@ -1899,9 +1899,9 @@
<para>
The <literal>IF</literal>, <literal>CASE</literal>,
- <literal>LOOP</literal>, <literal>WHILE</literal>,
- <literal>REPEAT</literal>, <literal>ITERATE</literal>, and
- <literal>LEAVE</literal> constructs are fully implemented.
+ <literal>ITERATE</literal>, <literal>LEAVE</literal>
+ <literal>LOOP</literal>, <literal>WHILE</literal>, and
+ <literal>REPEAT</literal> constructs are fully implemented.
</para>
<para>
@@ -2350,6 +2350,46 @@
</section>
+ <section id="return-statement">
+
+ <title><literal>RETURN</literal> Statement Syntax</title>
+
+ <indexterm>
+ <primary>RETURN</primary>
+ </indexterm>
+
+ <remark role="help-topic" condition="RETURN"/>
+
+ <remark role="help-keywords">
+ RETURN
+ </remark>
+
+ <remark role="help-syntax"/>
+
+<programlisting>
+RETURN <replaceable>expr</replaceable>
+</programlisting>
+
+ <remark role="help-description-begin"/>
+
+ <para>
+ The <literal>RETURN</literal> statement terminates execution of a
+ stored function and returns the value
+ <replaceable>expr</replaceable> to the function caller. There must
+ be at least one <literal>RETURN</literal> statement in a stored
+ function. There may be more than one if the function has multiple
+ exit points.
+ </para>
+
+ <para>
+ This statement is not used in stored procedures, triggers, or
+ events.
+ </para>
+
+ <remark role="help-description-end"/>
+
+ </section>
+
<section id="stored-procedure-last-insert-id">
<title>Stored Procedures, Functions, Triggers, and
@@ -2605,6 +2645,7 @@
IF (a < 3) THEN
INSERT INTO t2 VALUES (a);
END IF;
+ RETURN 0;
END;
CREATE TABLE t1 (a INT);
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r10134 - in trunk: . it/refman-5.1 pt/refman-5.1 refman-5.0 refman-5.1 refman-6.0 | paul | 5 Mar |