List:Commits« Previous MessageNext Message »
From:paul Date:February 27 2008 3:45pm
Subject:svn commit - mysqldoc@docsrva: r10041 - in trunk: . it/refman-5.1 pt/refman-5.1 refman-4.1 refman-5.0 refman-5.1 refman-6.0
View as plain text  
Author: paul
Date: 2008-02-27 15:45:00 +0100 (Wed, 27 Feb 2008)
New Revision: 10041

Log:
 r29560@frost:  paul | 2008-02-27 08:45:08 -0600
 Better description of DATE_ADD() return value.
 (Bug#24525)


Modified:
   trunk/it/refman-5.1/functions-core.xml
   trunk/pt/refman-5.1/functions-core.xml
   trunk/refman-4.1/functions-core.xml
   trunk/refman-5.0/functions-core.xml
   trunk/refman-5.1/functions-core.xml
   trunk/refman-6.0/functions-core.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:29558
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:29691
   + 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:35828
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:29560
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:29691


Modified: trunk/it/refman-5.1/functions-core.xml
===================================================================
--- trunk/it/refman-5.1/functions-core.xml	2008-02-27 13:41:00 UTC (rev 10040)
+++ trunk/it/refman-5.1/functions-core.xml	2008-02-27 14:45:00 UTC (rev 10041)
Changed blocks: 2, Lines Added: 42, Lines Deleted: 10; 2875 bytes

@@ -7826,16 +7826,16 @@
         <remark role="help-description-begin"/>
 
         <para>
-          These functions perform date arithmetic.
-          <replaceable>date</replaceable> is a
-          <literal>DATETIME</literal> or <literal>DATE</literal>
value
-          specifying the starting date. <replaceable>expr</replaceable>
-          is an expression specifying the interval value to be added or
-          subtracted from the starting date.
-          <replaceable>expr</replaceable> is a string; it may start with
-          a <quote><literal>-</literal></quote> for negative
intervals.
-          <replaceable>unit</replaceable> is a keyword indicating the
-          units in which the expression should be interpreted.
+          These functions perform date arithmetic. The
+          <replaceable>date</replaceable> argument specifies the
+          starting date or datetime value.
+          <replaceable>expr</replaceable> is an expression specifying
+          the interval value to be added or subtracted from the starting
+          date. <replaceable>expr</replaceable> is a string; it may
+          start with a <quote><literal>-</literal></quote> for
negative
+          intervals. <replaceable>unit</replaceable> is a keyword
+          indicating the units in which the expression should be
+          interpreted.
         </para>
 
         <remark role="help-description-end"/>

@@ -7948,6 +7948,38 @@
         </informaltable>
 
         <para>
+          The return value depends on the arguments:
+        </para>
+
+        <itemizedlist>
+
+          <listitem>
+            <para>
+              <literal>DATETIME</literal> if the first argument is a
+              <literal>DATETIME</literal> (or
+              <literal>TIMESTAMP</literal>) value, or if the first
+              argument is a <literal>DATE</literal> and the
+              <replaceable>unit</replaceable> value uses
+              <literal>HOURS</literal>,
<literal>MINUTES</literal>, or
+              <literal>SECONDS</literal>.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              String otherwise.
+            </para>
+          </listitem>
+
+        </itemizedlist>
+
+        <para>
+          To ensure that the result is <literal>DATETIME</literal>, you
+          can use <function role="sql">CAST()</function> to convert the
+          first argument to <literal>DATETIME</literal>.
+        </para>
+
+        <para>
           MySQL allows any punctuation delimiter in the
           <replaceable>expr</replaceable> format. Those shown in the
           table are the suggested delimiters. If the


Modified: trunk/pt/refman-5.1/functions-core.xml
===================================================================
--- trunk/pt/refman-5.1/functions-core.xml	2008-02-27 13:41:00 UTC (rev 10040)
+++ trunk/pt/refman-5.1/functions-core.xml	2008-02-27 14:45:00 UTC (rev 10041)
Changed blocks: 2, Lines Added: 42, Lines Deleted: 10; 2875 bytes

@@ -7826,16 +7826,16 @@
         <remark role="help-description-begin"/>
 
         <para>
-          These functions perform date arithmetic.
-          <replaceable>date</replaceable> is a
-          <literal>DATETIME</literal> or <literal>DATE</literal>
value
-          specifying the starting date. <replaceable>expr</replaceable>
-          is an expression specifying the interval value to be added or
-          subtracted from the starting date.
-          <replaceable>expr</replaceable> is a string; it may start with
-          a <quote><literal>-</literal></quote> for negative
intervals.
-          <replaceable>unit</replaceable> is a keyword indicating the
-          units in which the expression should be interpreted.
+          These functions perform date arithmetic. The
+          <replaceable>date</replaceable> argument specifies the
+          starting date or datetime value.
+          <replaceable>expr</replaceable> is an expression specifying
+          the interval value to be added or subtracted from the starting
+          date. <replaceable>expr</replaceable> is a string; it may
+          start with a <quote><literal>-</literal></quote> for
negative
+          intervals. <replaceable>unit</replaceable> is a keyword
+          indicating the units in which the expression should be
+          interpreted.
         </para>
 
         <remark role="help-description-end"/>

@@ -7948,6 +7948,38 @@
         </informaltable>
 
         <para>
+          The return value depends on the arguments:
+        </para>
+
+        <itemizedlist>
+
+          <listitem>
+            <para>
+              <literal>DATETIME</literal> if the first argument is a
+              <literal>DATETIME</literal> (or
+              <literal>TIMESTAMP</literal>) value, or if the first
+              argument is a <literal>DATE</literal> and the
+              <replaceable>unit</replaceable> value uses
+              <literal>HOURS</literal>,
<literal>MINUTES</literal>, or
+              <literal>SECONDS</literal>.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              String otherwise.
+            </para>
+          </listitem>
+
+        </itemizedlist>
+
+        <para>
+          To ensure that the result is <literal>DATETIME</literal>, you
+          can use <function role="sql">CAST()</function> to convert the
+          first argument to <literal>DATETIME</literal>.
+        </para>
+
+        <para>
           MySQL allows any punctuation delimiter in the
           <replaceable>expr</replaceable> format. Those shown in the
           table are the suggested delimiters. If the


Modified: trunk/refman-4.1/functions-core.xml
===================================================================
--- trunk/refman-4.1/functions-core.xml	2008-02-27 13:41:00 UTC (rev 10040)
+++ trunk/refman-4.1/functions-core.xml	2008-02-27 14:45:00 UTC (rev 10041)
Changed blocks: 1, Lines Added: 10, Lines Deleted: 10; 1648 bytes

@@ -7667,16 +7667,16 @@
         <remark role="help-description-begin"/>
 
         <para>
-          These functions perform date arithmetic.
-          <replaceable>date</replaceable> is a
-          <literal>DATETIME</literal> or <literal>DATE</literal>
value
-          specifying the starting date. <replaceable>expr</replaceable>
-          is an expression specifying the interval value to be added or
-          subtracted from the starting date.
-          <replaceable>expr</replaceable> is a string; it may start with
-          a <quote><literal>-</literal></quote> for negative
intervals.
-          <replaceable>unit</replaceable> is a keyword indicating the
-          units in which the expression should be interpreted.
+          These functions perform date arithmetic. The
+          <replaceable>date</replaceable> argument specifies the
+          starting date or datetime value.
+          <replaceable>expr</replaceable> is an expression specifying
+          the interval value to be added or subtracted from the starting
+          date. <replaceable>expr</replaceable> is a string; it may
+          start with a <quote><literal>-</literal></quote> for
negative
+          intervals. <replaceable>unit</replaceable> is a keyword
+          indicating the units in which the expression should be
+          interpreted.
         </para>
 
         <remark role="help-description-end"/>


Modified: trunk/refman-5.0/functions-core.xml
===================================================================
--- trunk/refman-5.0/functions-core.xml	2008-02-27 13:41:00 UTC (rev 10040)
+++ trunk/refman-5.0/functions-core.xml	2008-02-27 14:45:00 UTC (rev 10041)
Changed blocks: 2, Lines Added: 42, Lines Deleted: 10; 2857 bytes

@@ -7861,16 +7861,16 @@
         <remark role="help-description-begin"/>
 
         <para>
-          These functions perform date arithmetic.
-          <replaceable>date</replaceable> is a
-          <literal>DATETIME</literal> or <literal>DATE</literal>
value
-          specifying the starting date. <replaceable>expr</replaceable>
-          is an expression specifying the interval value to be added or
-          subtracted from the starting date.
-          <replaceable>expr</replaceable> is a string; it may start with
-          a <quote><literal>-</literal></quote> for negative
intervals.
-          <replaceable>unit</replaceable> is a keyword indicating the
-          units in which the expression should be interpreted.
+          These functions perform date arithmetic. The
+          <replaceable>date</replaceable> argument specifies the
+          starting date or datetime value.
+          <replaceable>expr</replaceable> is an expression specifying
+          the interval value to be added or subtracted from the starting
+          date. <replaceable>expr</replaceable> is a string; it may
+          start with a <quote><literal>-</literal></quote> for
negative
+          intervals. <replaceable>unit</replaceable> is a keyword
+          indicating the units in which the expression should be
+          interpreted.
         </para>
 
         <remark role="help-description-end"/>

@@ -7989,6 +7989,38 @@
         </para>
 
         <para>
+          The return value depends on the arguments:
+        </para>
+
+        <itemizedlist>
+
+          <listitem>
+            <para>
+              <literal>DATETIME</literal> if the first argument is a
+              <literal>DATETIME</literal> (or
+              <literal>TIMESTAMP</literal>) value, or if the first
+              argument is a <literal>DATE</literal> and the
+              <replaceable>unit</replaceable> value uses
+              <literal>HOURS</literal>,
<literal>MINUTES</literal>, or
+              <literal>SECONDS</literal>.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              String otherwise.
+            </para>
+          </listitem>
+
+        </itemizedlist>
+
+        <para>
+          To ensure that the result is <literal>DATETIME</literal>, you
+          can use <function role="sql">CAST()</function> to convert the
+          first argument to <literal>DATETIME</literal>.
+        </para>
+
+        <para>
           MySQL allows any punctuation delimiter in the
           <replaceable>expr</replaceable> format. Those shown in the
           table are the suggested delimiters. If the


Modified: trunk/refman-5.1/functions-core.xml
===================================================================
--- trunk/refman-5.1/functions-core.xml	2008-02-27 13:41:00 UTC (rev 10040)
+++ trunk/refman-5.1/functions-core.xml	2008-02-27 14:45:00 UTC (rev 10041)
Changed blocks: 2, Lines Added: 42, Lines Deleted: 10; 2866 bytes

@@ -7826,16 +7826,16 @@
         <remark role="help-description-begin"/>
 
         <para>
-          These functions perform date arithmetic.
-          <replaceable>date</replaceable> is a
-          <literal>DATETIME</literal> or <literal>DATE</literal>
value
-          specifying the starting date. <replaceable>expr</replaceable>
-          is an expression specifying the interval value to be added or
-          subtracted from the starting date.
-          <replaceable>expr</replaceable> is a string; it may start with
-          a <quote><literal>-</literal></quote> for negative
intervals.
-          <replaceable>unit</replaceable> is a keyword indicating the
-          units in which the expression should be interpreted.
+          These functions perform date arithmetic. The
+          <replaceable>date</replaceable> argument specifies the
+          starting date or datetime value.
+          <replaceable>expr</replaceable> is an expression specifying
+          the interval value to be added or subtracted from the starting
+          date. <replaceable>expr</replaceable> is a string; it may
+          start with a <quote><literal>-</literal></quote> for
negative
+          intervals. <replaceable>unit</replaceable> is a keyword
+          indicating the units in which the expression should be
+          interpreted.
         </para>
 
         <remark role="help-description-end"/>

@@ -7948,6 +7948,38 @@
         </informaltable>
 
         <para>
+          The return value depends on the arguments:
+        </para>
+
+        <itemizedlist>
+
+          <listitem>
+            <para>
+              <literal>DATETIME</literal> if the first argument is a
+              <literal>DATETIME</literal> (or
+              <literal>TIMESTAMP</literal>) value, or if the first
+              argument is a <literal>DATE</literal> and the
+              <replaceable>unit</replaceable> value uses
+              <literal>HOURS</literal>,
<literal>MINUTES</literal>, or
+              <literal>SECONDS</literal>.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              String otherwise.
+            </para>
+          </listitem>
+
+        </itemizedlist>
+
+        <para>
+          To ensure that the result is <literal>DATETIME</literal>, you
+          can use <function role="sql">CAST()</function> to convert the
+          first argument to <literal>DATETIME</literal>.
+        </para>
+
+        <para>
           MySQL allows any punctuation delimiter in the
           <replaceable>expr</replaceable> format. Those shown in the
           table are the suggested delimiters. If the


Modified: trunk/refman-6.0/functions-core.xml
===================================================================
--- trunk/refman-6.0/functions-core.xml	2008-02-27 13:41:00 UTC (rev 10040)
+++ trunk/refman-6.0/functions-core.xml	2008-02-27 14:45:00 UTC (rev 10041)
Changed blocks: 2, Lines Added: 42, Lines Deleted: 10; 2866 bytes

@@ -8252,16 +8252,16 @@
         <remark role="help-description-begin"/>
 
         <para>
-          These functions perform date arithmetic.
-          <replaceable>date</replaceable> is a
-          <literal>DATETIME</literal> or <literal>DATE</literal>
value
-          specifying the starting date. <replaceable>expr</replaceable>
-          is an expression specifying the interval value to be added or
-          subtracted from the starting date.
-          <replaceable>expr</replaceable> is a string; it may start with
-          a <quote><literal>-</literal></quote> for negative
intervals.
-          <replaceable>unit</replaceable> is a keyword indicating the
-          units in which the expression should be interpreted.
+          These functions perform date arithmetic. The
+          <replaceable>date</replaceable> argument specifies the
+          starting date or datetime value.
+          <replaceable>expr</replaceable> is an expression specifying
+          the interval value to be added or subtracted from the starting
+          date. <replaceable>expr</replaceable> is a string; it may
+          start with a <quote><literal>-</literal></quote> for
negative
+          intervals. <replaceable>unit</replaceable> is a keyword
+          indicating the units in which the expression should be
+          interpreted.
         </para>
 
         <remark role="help-description-end"/>

@@ -8374,6 +8374,38 @@
         </informaltable>
 
         <para>
+          The return value depends on the arguments:
+        </para>
+
+        <itemizedlist>
+
+          <listitem>
+            <para>
+              <literal>DATETIME</literal> if the first argument is a
+              <literal>DATETIME</literal> (or
+              <literal>TIMESTAMP</literal>) value, or if the first
+              argument is a <literal>DATE</literal> and the
+              <replaceable>unit</replaceable> value uses
+              <literal>HOURS</literal>,
<literal>MINUTES</literal>, or
+              <literal>SECONDS</literal>.
+            </para>
+          </listitem>
+
+          <listitem>
+            <para>
+              String otherwise.
+            </para>
+          </listitem>
+
+        </itemizedlist>
+
+        <para>
+          To ensure that the result is <literal>DATETIME</literal>, you
+          can use <function role="sql">CAST()</function> to convert the
+          first argument to <literal>DATETIME</literal>.
+        </para>
+
+        <para>
           MySQL allows any punctuation delimiter in the
           <replaceable>expr</replaceable> format. Those shown in the
           table are the suggested delimiters. If the


Thread
svn commit - mysqldoc@docsrva: r10041 - in trunk: . it/refman-5.1 pt/refman-5.1 refman-4.1 refman-5.0 refman-5.1 refman-6.0paul27 Feb