List:Commits« Previous MessageNext Message »
From:jon Date:August 14 2008 12:04pm
Subject:svn commit - mysqldoc@docsrva: r11558 - in trunk: dynamic-docs/changelog refman-5.0
View as plain text  
Author: jstephens
Date: 2008-08-14 14:04:29 +0200 (Thu, 14 Aug 2008)
New Revision: 11558

Log:

Noted incomaptible change in DATE/DATETIME comparison in 4.1->5.0
upgrade section; made example used there and in corresponding changelog
entry more obvious

(Thanks, Victoria!)



Modified:
   trunk/dynamic-docs/changelog/mysqld.xml
   trunk/refman-5.0/installing-cs-core.xml


Modified: trunk/dynamic-docs/changelog/mysqld.xml
===================================================================
--- trunk/dynamic-docs/changelog/mysqld.xml	2008-08-14 07:42:34 UTC (rev 11557)
+++ trunk/dynamic-docs/changelog/mysqld.xml	2008-08-14 12:04:29 UTC (rev 11558)
Changed blocks: 1, Lines Added: 4, Lines Deleted: 4; 1001 bytes

@@ -131553,10 +131553,10 @@
         <literal>DATE</literal> value is coerced to the
         <literal>DATETIME</literal> type by adding the time portion as
         <literal>00:00:00</literal>. To mimic the old behavior, use the
-        <function role="sql">CAST()</function> function to cause the
-        comparison operands to be treated as previously. For example:
-        <literal>SELECT <replaceable>date_col</replaceable> = CAST(NOW()
-        AS DATE);</literal>.
+        <function role="sql">CAST()</function> function as shown in this
+        example: <literal>SELECT <replaceable>date_col</replaceable> =
+        CAST(NOW() AS DATE) FROM
+        <replaceable>table</replaceable>;</literal>.
       </para>
 
     </message>


Modified: trunk/refman-5.0/installing-cs-core.xml
===================================================================
--- trunk/refman-5.0/installing-cs-core.xml	2008-08-14 07:42:34 UTC (rev 11557)
+++ trunk/refman-5.0/installing-cs-core.xml	2008-08-14 12:04:29 UTC (rev 11558)
Changed blocks: 1, Lines Added: 18, Lines Deleted: 0; 1458 bytes

@@ -13521,6 +13521,24 @@
 
         <listitem>
           <para>
+            <emphasis role="bold">Incompatible change</emphasis>:
+            Beginning with MySQL 5.0.42, when a <literal>DATE</literal>
+            value is compared with a <literal>DATETIME</literal> value,
+            the <literal>DATE</literal> value is coerced to the
+            <literal>DATETIME</literal> type by adding the time portion
+            as <literal>00:00:00</literal>. Previously, the time portion
+            of the <literal>DATETIME</literal> value was ignored, or the
+            comparison could be performed as a string comparison. To
+            mimic the old behavior, use the
+            <function role="sql">CAST()</function> function as shonw in
+            this example: <literal>SELECT
+            <replaceable>date_col</replaceable> = CAST(NOW() AS DATE)
+            FROM <replaceable>table</replaceable>;</literal>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
             As of MySQL 5.0.25, the <literal>lc_time_names</literal>
             system variable specifies the locale that controls the
             language used to display day and month names and


Thread
svn commit - mysqldoc@docsrva: r11558 - in trunk: dynamic-docs/changelog refman-5.0jon14 Aug