Author: jstephens
Date: 2009-02-23 19:52:23 +0100 (Mon, 23 Feb 2009)
New Revision: 13904
Log:
Reverted previous commit; Paul already handled this issue.
Modified:
trunk/refman-5.1/installing-core.xml
Modified: trunk/refman-5.1/installing-core.xml
===================================================================
--- trunk/refman-5.1/installing-core.xml 2009-02-23 18:46:40 UTC (rev 13903)
+++ trunk/refman-5.1/installing-core.xml 2009-02-23 18:52:23 UTC (rev 13904)
Changed blocks: 1, Lines Added: 0, Lines Deleted: 109; 4117 bytes
@@ -14286,115 +14286,6 @@
<listitem>
<para>
- <emphasis role="bold">Incompatible change</emphasis>: When
- using the default SQL server mode, MySQL 5.0 and 5.1
- handle <literal role="stmt">UPDATE</literal> statements
- differently when the update tries to set one or more
- <literal>NOT NULL</literal> columns to
- <literal>NULL</literal>. MySQL 5.0 allows you to update
- <literal>NOT NULL</literal> column values to the nearest
- equivalent <quote>empty</quote> value (usually 0 or an
- empty string); however, MySQL 5.1 rejects such statements.
- </para>
-
- <para>
- For example, suppose you create the following table on a
- MySQL 5.0 server and insert a row into it as shown here:
- </para>
-
-<programlisting>
-mysql> <userinput>SELECT VERSION();</userinput>
-+-----------+
-| VERSION() |
-+-----------+
-| 5.0.79 |
-+-----------+
-1 row in set (0.01 sec)
-
-mysq> <userinput>CREATE TABLE t1 (c1 INT NOT NULL);</userinput>
-Query OK, 0 rows affected (0.04 sec)
-mysql> <userinput>INSERT INTO t1 VALUES (1);</userinput>
-Query OK, 1 row affected (0.00 sec)
-</programlisting>
-
- <para>
- If you attempt to update a row to set a <literal>NOT
- NULL</literal> column to <literal>NULL</literal>, MySQL
- 5.0 allows the operation to proceed but sets the column
- value to the nearest equivalent <quote>empty</quote>
- value, albeit with a warning, as shown here:
- </para>
-
-<programlisting>
-mysql> <userinput>UPDATE t1 SET c1 = NULL WHERE c1 = 1;</userinput>
-Query OK, 1 row affected, 1 warning (0.00 sec)
-Rows matched: 1 Changed: 1 Warnings: 1
-
-mysql> <userinput>SHOW WARNINGS;</userinput>
-+---------+------+----------------------------+
-| Level | Code | Message |
-+---------+------+----------------------------+
-| Warning | 1048 | Column 'c1' cannot be null |
-+---------+------+----------------------------+
-1 row in set (0.00 sec)
-
-mysql> <userinput>SELECT * FROM t1;</userinput>
-+----+
-| c1 |
-+----+
-| 0 |
-+----+
-1 row in set (0.00 sec)
-</programlisting>
-
- <para>
- MySQL 5.0 shows the same behavior for multi-column updates
- as well.
- </para>
-
- <para>
- MySQL 5.1 does <emphasis>not</emphasis> allow such
- updates; these fail with an error, as shown here:
- </para>
-
-<programlisting>
-mysql> <userinput>SELECT VERSION();</userinput>
-+-----------+
-| version() |
-+-----------+
-| 5.1.32 |
-+-----------+
-1 row in set (0.00 sec)
-
-mysql> <userinput>CREATE TABLE t1 (c1 INT NOT NULL);</userinput>
-Query OK, 0 rows affected (0.05 sec)
-
-mysql> <userinput>INSERT INTO t1 VALUES (1);</userinput>
-Query OK, 1 row affected (0.00 sec)
-
-mysql> <userinput>UPDATE t1 SET c1 = NULL WHERE c1 = 1;</userinput>
-<errortext>ERROR 1048 (23000): Column 'c1' cannot be null</errortext>
-mysql> <userinput>SELECT * FROM t1;</userinput>
-+----+
-| c1 |
-+----+
-| 1 |
-+----+
-1 row in set (0.00 sec)
-</programlisting>
-
- <para>
- Applications that depend on the MySQL 5.0 behavior with
- regard to <literal>NULL</literal>, <literal>NOT
- NULL</literal>, and <literal role="stmt">UPDATE</literal>
- must be changed before migrating them to MySQL 5.1; there
- is no way to reproduce the MySQL 5.0 behavior in MySQL
- 5.1.
- </para>
- </listitem>
-
- <listitem>
- <para>
Some keywords are reserved in MySQL ¤t-series; that
were not reserved in MySQL &previous-series;. See
<xref linkend="reserved-words"/>.
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r13904 - trunk/refman-5.1 | jon.stephens | 23 Feb |