Author: paul
Date: 2006-09-26 21:20:11 +0200 (Tue, 26 Sep 2006)
New Revision: 3465
Log:
r14057@polar: paul | 2006-09-26 13:55:32 -0500
The value of LAST_INSERT_ID() is not affected by the current statement.
Modified:
trunk/refman-4.1/functions.xml
trunk/refman-5.0/functions.xml
trunk/refman-5.1/functions.xml
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:14051
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:8616
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:10466
+ 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:14057
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:8616
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:10466
Modified: trunk/refman-4.1/functions.xml
===================================================================
--- trunk/refman-4.1/functions.xml 2006-09-26 18:23:39 UTC (rev 3464)
+++ trunk/refman-4.1/functions.xml 2006-09-26 19:20:11 UTC (rev 3465)
Changed blocks: 1, Lines Added: 17, Lines Deleted: 3; 1738 bytes
@@ -13216,9 +13216,23 @@
Returns the <emphasis>first</emphasis> automatically
generated value that was set for an
<literal>AUTO_INCREMENT</literal> column by the
- <emphasis>most recent</emphasis> <literal>INSERT</literal>
- or <literal>UPDATE</literal> statement to affect such a
- column.
+ <emphasis>most recently executed</emphasis>
+ <literal>INSERT</literal> or <literal>UPDATE</literal>
+ statement to affect such a column. The currently executing
+ statement does not affect the value of
+ <literal>LAST_INSERT_ID()</literal>. Suppose that you
+ generate an <literal>AUTO_INCREMENT</literal> value with one
+ statement, and then refer to
+ <literal>LAST_INSERT_ID()</literal> in a multiple-row
+ <literal>INSERT</literal> statement that inserts rows into a
+ table with its own <literal>AUTO_INCREMENT</literal> column.
+ The value of <literal>LAST_INSERT_ID()</literal> will remain
+ stable in the second statement; its value for the second and
+ later rows is not affected by the earlier row insertions.
+ (However, if you mix references to
+ <literal>LAST_INSERT_ID()</literal> and
+ <literal>LAST_INSERT_ID(<replaceable>expr</replaceable>)</literal>,
+ the effect is undefined.)
</para>
<remark role="help-description-end"/>
Modified: trunk/refman-5.0/functions.xml
===================================================================
--- trunk/refman-5.0/functions.xml 2006-09-26 18:23:39 UTC (rev 3464)
+++ trunk/refman-5.0/functions.xml 2006-09-26 19:20:11 UTC (rev 3465)
Changed blocks: 1, Lines Added: 17, Lines Deleted: 3; 1738 bytes
@@ -13308,9 +13308,23 @@
Returns the <emphasis>first</emphasis> automatically
generated value that was set for an
<literal>AUTO_INCREMENT</literal> column by the
- <emphasis>most recent</emphasis> <literal>INSERT</literal>
- or <literal>UPDATE</literal> statement to affect such a
- column.
+ <emphasis>most recently executed</emphasis>
+ <literal>INSERT</literal> or <literal>UPDATE</literal>
+ statement to affect such a column. The currently executing
+ statement does not affect the value of
+ <literal>LAST_INSERT_ID()</literal>. Suppose that you
+ generate an <literal>AUTO_INCREMENT</literal> value with one
+ statement, and then refer to
+ <literal>LAST_INSERT_ID()</literal> in a multiple-row
+ <literal>INSERT</literal> statement that inserts rows into a
+ table with its own <literal>AUTO_INCREMENT</literal> column.
+ The value of <literal>LAST_INSERT_ID()</literal> will remain
+ stable in the second statement; its value for the second and
+ later rows is not affected by the earlier row insertions.
+ (However, if you mix references to
+ <literal>LAST_INSERT_ID()</literal> and
+ <literal>LAST_INSERT_ID(<replaceable>expr</replaceable>)</literal>,
+ the effect is undefined.)
</para>
<remark role="help-description-end"/>
Modified: trunk/refman-5.1/functions.xml
===================================================================
--- trunk/refman-5.1/functions.xml 2006-09-26 18:23:39 UTC (rev 3464)
+++ trunk/refman-5.1/functions.xml 2006-09-26 19:20:11 UTC (rev 3465)
Changed blocks: 1, Lines Added: 17, Lines Deleted: 3; 1738 bytes
@@ -13845,9 +13845,23 @@
Returns the <emphasis>first</emphasis> automatically
generated value that was set for an
<literal>AUTO_INCREMENT</literal> column by the
- <emphasis>most recent</emphasis> <literal>INSERT</literal>
- or <literal>UPDATE</literal> statement to affect such a
- column.
+ <emphasis>most recently executed</emphasis>
+ <literal>INSERT</literal> or <literal>UPDATE</literal>
+ statement to affect such a column. The currently executing
+ statement does not affect the value of
+ <literal>LAST_INSERT_ID()</literal>. Suppose that you
+ generate an <literal>AUTO_INCREMENT</literal> value with one
+ statement, and then refer to
+ <literal>LAST_INSERT_ID()</literal> in a multiple-row
+ <literal>INSERT</literal> statement that inserts rows into a
+ table with its own <literal>AUTO_INCREMENT</literal> column.
+ The value of <literal>LAST_INSERT_ID()</literal> will remain
+ stable in the second statement; its value for the second and
+ later rows is not affected by the earlier row insertions.
+ (However, if you mix references to
+ <literal>LAST_INSERT_ID()</literal> and
+ <literal>LAST_INSERT_ID(<replaceable>expr</replaceable>)</literal>,
+ the effect is undefined.)
</para>
<remark role="help-description-end"/>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r3465 - in trunk: . refman-4.1 refman-5.0 refman-5.1 | paul | 26 Sep |