Author: paul
Date: 2008-03-17 17:12:25 +0100 (Mon, 17 Mar 2008)
New Revision: 10272
Log:
r30056@frost: paul | 2008-03-17 08:44:48 -0500
Try to make clearer that ON DUPLICATE KEY UPDATE returns 2 rather then 1
if the row is updated rather than inserted.
Mention that you can get the affected-rows count for INSERT with ROW_COUNT().
Modified:
trunk/it/refman-5.1/sql-syntax.xml
trunk/pt/refman-5.1/sql-syntax.xml
trunk/refman-4.1/sql-syntax.xml
trunk/refman-5.0/sql-syntax.xml
trunk/refman-5.1/sql-syntax.xml
trunk/refman-6.0/sql-syntax.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:30021
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:30059
+ 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:35828
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:30056
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:30059
Modified: trunk/it/refman-5.1/sql-syntax.xml
===================================================================
--- trunk/it/refman-5.1/sql-syntax.xml 2008-03-17 15:49:39 UTC (rev 10271)
+++ trunk/it/refman-5.1/sql-syntax.xml 2008-03-17 16:12:25 UTC (rev 10272)
Changed blocks: 7, Lines Added: 34, Lines Deleted: 7; 3509 bytes
@@ -123,6 +123,14 @@
</para>
<para>
+ You can see what character sets and collations are available
+ using, respectively, the <literal>SHOW CHARACTER SET</literal>
+ and <literal>SHOW COLLATION</literal> statements. See
+ <xref linkend="show-character-set"/>, and
+ <xref linkend="show-collation"/>, for more information.
+ </para>
+
+ <para>
The database name can be omitted from the first syntax, in which
case the statement applies to the default database.
</para>
@@ -4129,6 +4137,16 @@
is found, MyISAM always returns an error. It will not
overwrite a file in the specified directory.
</para>
+
+ <important>
+ <para>
+ Beginning with MySQL 5.1.24, you cannot use the MySQL data
+ directory with <literal>DATA DIRECTORY</literal> or
+ <literal>INDEX DIRECTORY</literal>. This includes
+ partitioned tables and individual table partitions. (See
+ Bug #32167.)
+ </para>
+ </important>
</listitem>
<listitem>
@@ -6915,10 +6933,11 @@
</programlisting>
<para>
- The rows-affected value for an <literal>INSERT</literal> can be
- obtained using the
+ The affected-rows value for an <literal>INSERT</literal> can be
+ obtained using the <function role="sql">ROW_COUNT()</function>
+ function (see <xref linkend="information-functions"/>), or the
<function role="capi">mysql_affected_rows()</function> C API
- function. See <xref linkend="mysql-affected-rows"/>.
+ function (see <xref linkend="mysql-affected-rows"/>).
</para>
<para>
@@ -7177,7 +7196,9 @@
and a row is inserted that would cause a duplicate value in
a <literal>UNIQUE</literal> index or <literal>PRIMARY
KEY</literal>, an <literal>UPDATE</literal> of the old row
- is performed. See <xref linkend="insert-on-duplicate"/>.
+ is performed. The affected-rows value per row is 1 if the
+ row is inserted as a new row and 2 if an existing row is
+ updated. See <xref linkend="insert-on-duplicate"/>.
</para>
</listitem>
@@ -7672,8 +7693,9 @@
</programlisting>
<para>
- The rows-affected value is 1 if the row is inserted as a new
- record and 2 if an existing record is updated.
+ With <literal>ON DUPLICATE KEY UPDATE</literal>, the
+ affected-rows value per row is 1 if the row is inserted as a
+ new row and 2 if an existing row is updated.
</para>
<para>
@@ -7694,6 +7716,11 @@
</para>
<para>
+ The <literal>ON DUPLICATE KEY UPDATE</literal> clause can
+ contain multiple column assignments, separated by commas.
+ </para>
+
+ <para>
You can use the
<function
role="sql">VALUES(<replaceable>col_name</replaceable>)</function>
function in the <literal>UPDATE</literal> clause to refer to
@@ -22054,7 +22081,7 @@
<para>
<literal>SHOW OPEN TABLES</literal> returns the following
- fields:
+ columns:
</para>
<itemizedlist>
Modified: trunk/pt/refman-5.1/sql-syntax.xml
===================================================================
--- trunk/pt/refman-5.1/sql-syntax.xml 2008-03-17 15:49:39 UTC (rev 10271)
+++ trunk/pt/refman-5.1/sql-syntax.xml 2008-03-17 16:12:25 UTC (rev 10272)
Changed blocks: 7, Lines Added: 34, Lines Deleted: 7; 3509 bytes
@@ -123,6 +123,14 @@
</para>
<para>
+ You can see what character sets and collations are available
+ using, respectively, the <literal>SHOW CHARACTER SET</literal>
+ and <literal>SHOW COLLATION</literal> statements. See
+ <xref linkend="show-character-set"/>, and
+ <xref linkend="show-collation"/>, for more information.
+ </para>
+
+ <para>
The database name can be omitted from the first syntax, in which
case the statement applies to the default database.
</para>
@@ -4129,6 +4137,16 @@
is found, MyISAM always returns an error. It will not
overwrite a file in the specified directory.
</para>
+
+ <important>
+ <para>
+ Beginning with MySQL 5.1.24, you cannot use the MySQL data
+ directory with <literal>DATA DIRECTORY</literal> or
+ <literal>INDEX DIRECTORY</literal>. This includes
+ partitioned tables and individual table partitions. (See
+ Bug #32167.)
+ </para>
+ </important>
</listitem>
<listitem>
@@ -6915,10 +6933,11 @@
</programlisting>
<para>
- The rows-affected value for an <literal>INSERT</literal> can be
- obtained using the
+ The affected-rows value for an <literal>INSERT</literal> can be
+ obtained using the <function role="sql">ROW_COUNT()</function>
+ function (see <xref linkend="information-functions"/>), or the
<function role="capi">mysql_affected_rows()</function> C API
- function. See <xref linkend="mysql-affected-rows"/>.
+ function (see <xref linkend="mysql-affected-rows"/>).
</para>
<para>
@@ -7177,7 +7196,9 @@
and a row is inserted that would cause a duplicate value in
a <literal>UNIQUE</literal> index or <literal>PRIMARY
KEY</literal>, an <literal>UPDATE</literal> of the old row
- is performed. See <xref linkend="insert-on-duplicate"/>.
+ is performed. The affected-rows value per row is 1 if the
+ row is inserted as a new row and 2 if an existing row is
+ updated. See <xref linkend="insert-on-duplicate"/>.
</para>
</listitem>
@@ -7672,8 +7693,9 @@
</programlisting>
<para>
- The rows-affected value is 1 if the row is inserted as a new
- record and 2 if an existing record is updated.
+ With <literal>ON DUPLICATE KEY UPDATE</literal>, the
+ affected-rows value per row is 1 if the row is inserted as a
+ new row and 2 if an existing row is updated.
</para>
<para>
@@ -7694,6 +7716,11 @@
</para>
<para>
+ The <literal>ON DUPLICATE KEY UPDATE</literal> clause can
+ contain multiple column assignments, separated by commas.
+ </para>
+
+ <para>
You can use the
<function
role="sql">VALUES(<replaceable>col_name</replaceable>)</function>
function in the <literal>UPDATE</literal> clause to refer to
@@ -22054,7 +22081,7 @@
<para>
<literal>SHOW OPEN TABLES</literal> returns the following
- fields:
+ columns:
</para>
<itemizedlist>
Modified: trunk/refman-4.1/sql-syntax.xml
===================================================================
--- trunk/refman-4.1/sql-syntax.xml 2008-03-17 15:49:39 UTC (rev 10271)
+++ trunk/refman-4.1/sql-syntax.xml 2008-03-17 16:12:25 UTC (rev 10272)
Changed blocks: 5, Lines Added: 19, Lines Deleted: 11; 2825 bytes
@@ -4574,10 +4574,10 @@
</programlisting>
<para>
- The rows-affected value for an <literal>INSERT</literal> can be
+ The affected-rows value for an <literal>INSERT</literal> can be
obtained using the
<function role="capi">mysql_affected_rows()</function> C API
- function. See <xref linkend="mysql-affected-rows"/>.
+ function (see <xref linkend="mysql-affected-rows"/>).
</para>
<para>
@@ -4797,9 +4797,11 @@
and a row is inserted that would cause a duplicate value in
a <literal>UNIQUE</literal> index or <literal>PRIMARY
KEY</literal>, an <literal>UPDATE</literal> of the old row
- is performed. See <xref linkend="insert-on-duplicate"/>.
- <literal>ON DUPLICATE KEY UPDATE</literal> was added in
- MySQL 4.1.0.
+ is performed. is performed. The affected-rows value per row
+ is 1 if the row is inserted as a new row and 2 if an
+ existing row is updated. See
+ <xref linkend="insert-on-duplicate"/>. <literal>ON DUPLICATE
+ KEY UPDATE</literal> was added in MySQL 4.1.0.
</para>
</listitem>
@@ -5298,8 +5300,9 @@
</programlisting>
<para>
- The rows-affected value is 1 if the row is inserted as a new
- record and 2 if an existing record is updated.
+ With <literal>ON DUPLICATE KEY UPDATE</literal>, the
+ affected-rows value per row is 1 if the row is inserted as a
+ new row and 2 if an existing row is updated.
</para>
<para>
@@ -5320,6 +5323,11 @@
</para>
<para>
+ The <literal>ON DUPLICATE KEY UPDATE</literal> clause can
+ contain multiple column assignments, separated by commas.
+ </para>
+
+ <para>
As of MySQL 4.1.1, you can use the
<function
role="sql">VALUES(<replaceable>col_name</replaceable>)</function>
function in the <literal>UPDATE</literal> clause to refer to
@@ -16765,12 +16773,12 @@
<literal>SHOW OPEN TABLES</literal> was added in MySQL
3.23.33.
</para>
-
+
<note>
<para>
- It is not possible to guarantee the order in which the tables are
- displayed in this output of this statement from one invokation to
- the next.
+ It is not possible to guarantee the order in which the
+ tables are displayed in this output of this statement from
+ one invokation to the next.
</para>
</note>
Modified: trunk/refman-5.0/sql-syntax.xml
===================================================================
--- trunk/refman-5.0/sql-syntax.xml 2008-03-17 15:49:39 UTC (rev 10271)
+++ trunk/refman-5.0/sql-syntax.xml 2008-03-17 16:12:25 UTC (rev 10272)
Changed blocks: 4, Lines Added: 15, Lines Deleted: 6; 2188 bytes
@@ -4595,10 +4595,11 @@
</programlisting>
<para>
- The rows-affected value for an <literal>INSERT</literal> can be
- obtained using the
+ The affected-rows value for an <literal>INSERT</literal> can be
+ obtained using the <function role="sql">ROW_COUNT()</function>
+ function (see <xref linkend="information-functions"/>), or the
<function role="capi">mysql_affected_rows()</function> C API
- function. See <xref linkend="mysql-affected-rows"/>.
+ function (see <xref linkend="mysql-affected-rows"/>).
</para>
<para>
@@ -4837,7 +4838,9 @@
and a row is inserted that would cause a duplicate value in
a <literal>UNIQUE</literal> index or <literal>PRIMARY
KEY</literal>, an <literal>UPDATE</literal> of the old row
- is performed. See <xref linkend="insert-on-duplicate"/>.
+ is performed. The affected-rows value per row is 1 if the
+ row is inserted as a new row and 2 if an existing row is
+ updated. See <xref linkend="insert-on-duplicate"/>.
</para>
</listitem>
@@ -5330,8 +5333,9 @@
</programlisting>
<para>
- The rows-affected value is 1 if the row is inserted as a new
- record and 2 if an existing record is updated.
+ With <literal>ON DUPLICATE KEY UPDATE</literal>, the
+ affected-rows value per row is 1 if the row is inserted as a
+ new row and 2 if an existing row is updated.
</para>
<para>
@@ -5352,6 +5356,11 @@
</para>
<para>
+ The <literal>ON DUPLICATE KEY UPDATE</literal> clause can
+ contain multiple column assignments, separated by commas.
+ </para>
+
+ <para>
You can use the
<function
role="sql">VALUES(<replaceable>col_name</replaceable>)</function>
function in the <literal>UPDATE</literal> clause to refer to
Modified: trunk/refman-5.1/sql-syntax.xml
===================================================================
--- trunk/refman-5.1/sql-syntax.xml 2008-03-17 15:49:39 UTC (rev 10271)
+++ trunk/refman-5.1/sql-syntax.xml 2008-03-17 16:12:25 UTC (rev 10272)
Changed blocks: 4, Lines Added: 15, Lines Deleted: 6; 2188 bytes
@@ -6933,10 +6933,11 @@
</programlisting>
<para>
- The rows-affected value for an <literal>INSERT</literal> can be
- obtained using the
+ The affected-rows value for an <literal>INSERT</literal> can be
+ obtained using the <function role="sql">ROW_COUNT()</function>
+ function (see <xref linkend="information-functions"/>), or the
<function role="capi">mysql_affected_rows()</function> C API
- function. See <xref linkend="mysql-affected-rows"/>.
+ function (see <xref linkend="mysql-affected-rows"/>).
</para>
<para>
@@ -7195,7 +7196,9 @@
and a row is inserted that would cause a duplicate value in
a <literal>UNIQUE</literal> index or <literal>PRIMARY
KEY</literal>, an <literal>UPDATE</literal> of the old row
- is performed. See <xref linkend="insert-on-duplicate"/>.
+ is performed. The affected-rows value per row is 1 if the
+ row is inserted as a new row and 2 if an existing row is
+ updated. See <xref linkend="insert-on-duplicate"/>.
</para>
</listitem>
@@ -7690,8 +7693,9 @@
</programlisting>
<para>
- The rows-affected value is 1 if the row is inserted as a new
- record and 2 if an existing record is updated.
+ With <literal>ON DUPLICATE KEY UPDATE</literal>, the
+ affected-rows value per row is 1 if the row is inserted as a
+ new row and 2 if an existing row is updated.
</para>
<para>
@@ -7712,6 +7716,11 @@
</para>
<para>
+ The <literal>ON DUPLICATE KEY UPDATE</literal> clause can
+ contain multiple column assignments, separated by commas.
+ </para>
+
+ <para>
You can use the
<function
role="sql">VALUES(<replaceable>col_name</replaceable>)</function>
function in the <literal>UPDATE</literal> clause to refer to
Modified: trunk/refman-6.0/sql-syntax.xml
===================================================================
--- trunk/refman-6.0/sql-syntax.xml 2008-03-17 15:49:39 UTC (rev 10271)
+++ trunk/refman-6.0/sql-syntax.xml 2008-03-17 16:12:25 UTC (rev 10272)
Changed blocks: 4, Lines Added: 15, Lines Deleted: 6; 2188 bytes
@@ -6799,10 +6799,11 @@
</programlisting>
<para>
- The rows-affected value for an <literal>INSERT</literal> can be
- obtained using the
+ The affected-rows value for an <literal>INSERT</literal> can be
+ obtained using the <function role="sql">ROW_COUNT()</function>
+ function (see <xref linkend="information-functions"/>), or the
<function role="capi">mysql_affected_rows()</function> C API
- function. See <xref linkend="mysql-affected-rows"/>.
+ function (see <xref linkend="mysql-affected-rows"/>).
</para>
<para>
@@ -7061,7 +7062,9 @@
and a row is inserted that would cause a duplicate value in
a <literal>UNIQUE</literal> index or <literal>PRIMARY
KEY</literal>, an <literal>UPDATE</literal> of the old row
- is performed. See <xref linkend="insert-on-duplicate"/>.
+ is performed. The affected-rows value per row is 1 if the
+ row is inserted as a new row and 2 if an existing row is
+ updated. See <xref linkend="insert-on-duplicate"/>.
</para>
</listitem>
@@ -7556,8 +7559,9 @@
</programlisting>
<para>
- The rows-affected value is 1 if the row is inserted as a new
- record and 2 if an existing record is updated.
+ With <literal>ON DUPLICATE KEY UPDATE</literal>, the
+ affected-rows value per row is 1 if the row is inserted as a
+ new row and 2 if an existing row is updated.
</para>
<para>
@@ -7578,6 +7582,11 @@
</para>
<para>
+ The <literal>ON DUPLICATE KEY UPDATE</literal> clause can
+ contain multiple column assignments, separated by commas.
+ </para>
+
+ <para>
You can use the
<function
role="sql">VALUES(<replaceable>col_name</replaceable>)</function>
function in the <literal>UPDATE</literal> clause to refer to
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r10272 - in trunk: . it/refman-5.1 pt/refman-5.1 refman-4.1 refman-5.0 refman-5.1 refman-6.0 | paul | 17 Mar |