Below is the list of changes that have just been committed into a local
mysqldoc repository of paul. When paul does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://www.mysql.com/doc/I/n/Installing_source_tree.html
ChangeSet
1.3136 05/07/26 21:00:55 paul@stripped +3 -0
De-cruft.
refman/functions.xml
1.14 05/07/26 21:00:53 paul@stripped +53 -96
De-cruft.
refman-5.0/functions.xml
1.18 05/07/26 21:00:53 paul@stripped +196 -786
De-cruft.
refman-4.1/functions.xml
1.15 05/07/26 21:00:52 paul@stripped +53 -98
De-cruft.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: paul
# Host: frost.snake.net
# Root: /Volumes/frost2/MySQL/bk/mysqldoc
--- 1.14/refman-4.1/functions.xml 2005-07-26 19:44:05 -05:00
+++ 1.15/refman-4.1/functions.xml 2005-07-26 21:00:52 -05:00
@@ -1938,32 +1938,32 @@
<para>
The compressed string contents are stored the following way:
+ </para>
- <itemizedlist>
+ <itemizedlist>
- <listitem>
- <para>
- Empty strings are stored as empty strings.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ Empty strings are stored as empty strings.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Non-empty strings are stored as a four-byte length of the
+ uncompressed string (low byte first), followed by the
+ compressed string. If the string ends with space, an extra
+ '<literal>.</literal>' character is added to avoid
+ problems with endspace trimming should the result be
+ stored in a <literal>CHAR</literal> or
+ <literal>VARCHAR</literal> column. (Use of
+ <literal>CHAR</literal> or <literal>VARCHAR</literal> to
+ store compressed strings is not recommended. It is better
+ to use a <literal>BLOB</literal> column instead.)
+ </para>
+ </listitem>
- <listitem>
- <para>
- Non-empty strings are stored as a four-byte length of
- the uncompressed string (low byte first), followed by
- the compressed string. If the string ends with space, an
- extra '<literal>.</literal>' character is added to avoid
- problems with endspace trimming should the result be
- stored in a <literal>CHAR</literal> or
- <literal>VARCHAR</literal> column. (Use of
- <literal>CHAR</literal> or <literal>VARCHAR</literal> to
- store compressed strings is not recommended. It is
- better to use a <literal>BLOB</literal> column instead.)
- </para>
- </listitem>
-
- </itemizedlist>
- </para>
+ </itemizedlist>
<para>
<literal>COMPRESS()</literal> was added in MySQL 4.1.1.
@@ -5454,9 +5454,7 @@
<literal>ADDTIME(<replaceable>expr</replaceable>,<replaceable>expr2</replaceable>)</literal>
</para>
- <para>
<!-- TODO: DESCRIPTION. Depends on SAP/MySQL mode. -->
- </para>
<para>
<literal>ADDTIME()</literal> adds
@@ -5716,9 +5714,7 @@
<literal>DATEDIFF(<replaceable>expr</replaceable>,<replaceable>expr2</replaceable>)</literal>
</para>
- <para>
<!-- TODO: DESCRIPTION. Depends on SAP/MySQL mode. -->
- </para>
<para>
<literal>DATEDIFF()</literal> returns the number of days
@@ -6502,21 +6498,15 @@
Returns a format string. This function is useful in
combination with the <literal>DATE_FORMAT()</literal> and the
<literal>STR_TO_DATE()</literal> functions.
-
-<!-- Following is commented out because not yet implemented -->
- </para>
-
- <para>
-<!-- and when setting -->
</para>
- <para>
-<!-- the server variables @code{DATE_FORMAT}, @code{TIME_FORMAT}, and -->
- </para>
+<!--
+ Following is commented out because not yet implemented:
- <para>
-<!-- @code{DATETIME_FORMAT}. -->
- </para>
+ and when setting
+ the server variables @code{DATE_FORMAT}, @code{TIME_FORMAT}, and
+ @code{DATETIME_FORMAT}.
+-->
<para>
The three possible values for the first argument and the five
@@ -6608,13 +6598,12 @@
as for <literal>DATETIME</literal>.
</para>
-<!-- If the first argument of -->
-
-<!-- @code{GET_FORMAT()} is illegal or missing, or if the second argument -->
-
-<!-- is missing, the function returns an error. If the second argument is illegal, -->
-
-<!-- the function returns @code{NULL}. -->
+<!--
+ If the first argument of
+ @code{GET_FORMAT()} is illegal or missing, or if the second argument
+ is missing, the function returns an error. If the second argument is illegal,
+ the function returns @code{NULL}.
+-->
<!-- end_description_for_help_topic -->
@@ -6625,12 +6614,12 @@
-> '03.10.2003'
mysql> SELECT STR_TO_DATE('10.31.2003',GET_FORMAT(DATE,'USA'));
-> 2003-10-31
-<!-- Following is commented out because not yet implemented -->
-
-<!-- mysql> SET DATE_FORMAT=GET_FORMAT(DATE, 'USA'); SELECT '2003-10-31'; -->
-
-<!-- -> 10-31-2003 -->
+<!--
+ Following is commented out because not yet implemented
+mysql> SET DATE_FORMAT=GET_FORMAT(DATE, 'USA'); SELECT '2003-10-31';
+ -> 10-31-2003
+-->
</programlisting>
<para>
@@ -7151,9 +7140,7 @@
-> 3938
</programlisting>
- <para>
<!-- INSERT START -->
- </para>
<!-- description_for_help_topic STR_TO_DATE -->
@@ -7181,49 +7168,21 @@
the string contains only date or time parts.
</para>
- <para>
-<!-- NOT YET IMPLEMENTED START -->
- </para>
-
- <para>
-<!-- If @var{format_str} is not specified, values are expected to be in the -->
- </para>
+<!--
+ NOT YET IMPLEMENTED START
- <para>
-<!-- following format (for the specifiers used. (See the table in the -->
- </para>
-
- <para>
-<!-- @code{DATE_FORMAT()} function description.) -->
- </para>
+ If @var{format_str} is not specified, values are expected to be in the
+ following format (for the specifiers used. (See the table in the
+ @code{DATE_FORMAT()} function description.)
+ @multitable @columnfractions .20 .65
+ @item @strong{Type} @tab @strong{Format}
+ @item @code{DATE} @tab @code{'%Y-%m-%d'}
+ @item @code{TIME} @tab @code{'%h-%m-%s'}
+ @item @code{TIMESTAMP} @tab @code{'%Y-%m-%d %H:%i:%s'}
+ @end multitable
- <para>
-<!-- @multitable @columnfractions .20 .65 -->
- </para>
-
- <para>
-<!-- @item @strong{Type} @tab @strong{Format} -->
- </para>
-
- <para>
-<!-- @item @code{DATE} @tab @code{'%Y-%m-%d'} -->
- </para>
-
- <para>
-<!-- @item @code{TIME} @tab @code{'%h-%m-%s'} -->
- </para>
-
- <para>
-<!-- @item @code{TIMESTAMP} @tab @code{'%Y-%m-%d %H:%i:%s'} -->
- </para>
-
- <para>
-<!-- @end multitable -->
- </para>
-
- <para>
-<!-- NOT YET IMPLEMENTED STOP -->
- </para>
+ NOT YET IMPLEMENTED STOP
+-->
<para>
The date, time, or datetime values contained in
@@ -7356,9 +7315,7 @@
<literal>SUBTIME(<replaceable>expr</replaceable>,<replaceable>expr2</replaceable>)</literal>
</para>
- <para>
<!-- TODO: DESCRIPTION. Depends on SAP/MySQL mode. -->
- </para>
<para>
<literal>SUBTIME()</literal> subtracts
@@ -7454,9 +7411,7 @@
<literal>TIMEDIFF(<replaceable>expr</replaceable>,<replaceable>expr2</replaceable>)</literal>
</para>
- <para>
<!-- TODO: DESCRIPTION. Depends on SAP/MySQL mode. -->
- </para>
<para>
<literal>TIMEDIFF()</literal> returns the time between the
--- 1.17/refman-5.0/functions.xml 2005-07-26 19:44:06 -05:00
+++ 1.18/refman-5.0/functions.xml 2005-07-26 21:00:53 -05:00
@@ -392,13 +392,11 @@
if both operands are <literal>NULL</literal>, and 0 rather
than <literal>NULL</literal> if one operand
is<literal>NULL</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic <=> -->
- </para>
<programlisting>
mysql> SELECT 1 <=> 1, NULL <=> NULL, 1 <=> NULL;
@@ -407,9 +405,7 @@
-> 1, NULL, NULL
</programlisting>
- <para>
<!-- description_for_help_topic != <> -->
- </para>
<para>
<indexterm type="function">
@@ -827,13 +823,11 @@
<para>
Returns the first non-<literal>NULL</literal> value in the
list.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic COALESCE -->
- </para>
<programlisting>
mysql> SELECT COALESCE(NULL,1);
@@ -842,9 +836,7 @@
-> NULL
</programlisting>
- <para>
<!-- description_for_help_topic GREATEST -->
- </para>
<para>
<indexterm type="function">
@@ -877,9 +869,7 @@
-> 'C'
</programlisting>
- <para>
<!-- description_for_help_topic IN -->
- </para>
<para>
<indexterm type="function">
@@ -1337,13 +1327,11 @@
operand is <literal>NULL</literal>. For
non-<literal>NULL</literal> operands, evaluates to 1 if an
odd number of operands is non-zero, otherwise 0 is returned.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic XOR -->
- </para>
<programlisting>
mysql> SELECT 1 XOR 1;
@@ -1415,13 +1403,11 @@
result after <literal>ELSE</literal> is returned, or
<literal>NULL</literal> if there is no <literal>ELSE</literal>
part.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic CASE -->
- </para>
<programlisting>
mysql> SELECT CASE 1 WHEN 1 THEN 'one'
@@ -1443,9 +1429,7 @@
returned as a decimal, real, or integer value.
</para>
- <para>
<!-- description_for_help_topic IF -->
- </para>
<para>
<indexterm type="function">
@@ -1468,13 +1452,11 @@
<replaceable>expr3</replaceable>. <literal>IF()</literal>
returns a numeric or string value, depending on the context in
which it is used.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic IF -->
- </para>
<programlisting>
mysql> SELECT IF(1>2,2,3);
@@ -1553,9 +1535,7 @@
sensitive.
</para>
- <para>
<!-- description_for_help_topic IFNULL -->
- </para>
<para>
<indexterm type="concept">
@@ -1617,9 +1597,7 @@
column is <literal>CHAR(4)</literal>.
</para>
- <para>
<!-- description_for_help_topic NULLIF -->
- </para>
<para>
<indexterm type="function">
@@ -1713,13 +1691,11 @@
<literal>NULL</literal> if <replaceable>str</replaceable> is
<literal>NULL</literal>. <literal>ASCII()</literal> works for
characters with numeric values from 0 to 255.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic ASCII -->
- </para>
<programlisting>
mysql> SELECT ASCII('2');
@@ -1734,9 +1710,7 @@
See also the <literal>ORD()</literal> function.
</para>
- <para>
<!-- description_for_help_topic BIN -->
- </para>
<para>
<indexterm type="function">
@@ -1758,22 +1732,18 @@
<literal>CONV(<replaceable>N</replaceable>,10,2)</literal>.
Returns <literal>NULL</literal> if
<replaceable>N</replaceable> is <literal>NULL</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic BIN -->
- </para>
<programlisting>
mysql> SELECT BIN(12);
-> '1100'
</programlisting>
- <para>
<!-- description_for_help_topic BIT_LENGTH -->
- </para>
<para>
<indexterm type="function">
@@ -1790,13 +1760,11 @@
<para>
Returns the length of the string
<replaceable>str</replaceable> in bits.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic BIT_LENGTH -->
- </para>
<programlisting>
mysql> SELECT BIT_LENGTH('text');
@@ -1878,13 +1846,11 @@
<para>
<literal>CHARACTER_LENGTH()</literal> is a synonym for
<literal>CHAR_LENGTH()</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- description_for_help_topic COMPRESS -->
- </para>
<para>
<indexterm type="function">
@@ -1904,13 +1870,11 @@
<literal>zlib</literal>. Otherwise, the return value is always
<literal>NULL</literal>. The compressed string can be
uncompressed with <literal>UNCOMPRESS()</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic COMPRESS -->
- </para>
<programlisting>
mysql> SELECT LENGTH(COMPRESS(REPEAT('a',1000)));
@@ -1925,36 +1889,34 @@
<para>
The compressed string contents are stored the following way:
+ </para>
- <itemizedlist>
+ <itemizedlist>
- <listitem>
- <para>
- Empty strings are stored as empty strings.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ Empty strings are stored as empty strings.
+ </para>
+ </listitem>
- <listitem>
- <para>
- Non-empty strings are stored as a four-byte length of
- the uncompressed string (low byte first), followed by
- the compressed string. If the string ends with space, an
- extra '<literal>.</literal>' character is added to avoid
- problems with endspace trimming should the result be
- stored in a <literal>CHAR</literal> or
- <literal>VARCHAR</literal> column. (Use of
- <literal>CHAR</literal> or <literal>VARCHAR</literal> to
- store compressed strings is not recommended. It is
- better to use a <literal>BLOB</literal> column instead.)
- </para>
- </listitem>
+ <listitem>
+ <para>
+ Non-empty strings are stored as a four-byte length of the
+ uncompressed string (low byte first), followed by the
+ compressed string. If the string ends with space, an extra
+ '<literal>.</literal>' character is added to avoid
+ problems with endspace trimming should the result be
+ stored in a <literal>CHAR</literal> or
+ <literal>VARCHAR</literal> column. (Use of
+ <literal>CHAR</literal> or <literal>VARCHAR</literal> to
+ store compressed strings is not recommended. It is better
+ to use a <literal>BLOB</literal> column instead.)
+ </para>
+ </listitem>
- </itemizedlist>
- </para>
+ </itemizedlist>
- <para>
<!-- description_for_help_topic CONCAT -->
- </para>
<para>
<indexterm type="function">
@@ -1976,13 +1938,11 @@
non-binary string. If the arguments include any binary
strings, the result is a binary string. A numeric argument is
converted to its equivalent binary string form.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic CONCAT -->
- </para>
<programlisting>
mysql> SELECT CONCAT('My', 'S', 'QL');
@@ -1993,9 +1953,7 @@
-> '14.3'
</programlisting>
- <para>
<!-- description_for_help_topic CONCAT_WS -->
- </para>
<para>
<indexterm type="function">
@@ -2019,13 +1977,11 @@
separator is <literal>NULL</literal>, the result is
<literal>NULL</literal>. The function skips any
<literal>NULL</literal> values after the separator argument.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic CONCAT_WS -->
- </para>
<programlisting>
mysql> SELECT CONCAT_WS(',','First name','Second name','Last Name');
@@ -2040,9 +1996,7 @@
<literal>NULL</literal>s.)
</para>
- <para>
<!-- description_for_help_topic CONV -->
- </para>
<para>
<indexterm type="function">
@@ -2089,9 +2043,7 @@
-> '40'
</programlisting>
- <para>
<!-- description_for_help_topic ELT -->
- </para>
<para>
<indexterm type="function">
@@ -2115,13 +2067,11 @@
or greater than the number of arguments.
<literal>ELT()</literal> is the complement of
<literal>FIELD()</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic ELT -->
- </para>
<programlisting>
mysql> SELECT ELT(1, 'ej', 'Heja', 'hej', 'foo');
@@ -2130,9 +2080,7 @@
-> 'foo'
</programlisting>
- <para>
<!-- description_for_help_topic EXPORT_SET -->
- </para>
<para>
<indexterm type="function">
@@ -2158,13 +2106,11 @@
the comma character '<literal>,</literal>'). The number of
bits examined is given by
<replaceable>number_of_bits</replaceable> (defaults to 64).
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic EXPORT_SET -->
- </para>
<programlisting>
mysql> SELECT EXPORT_SET(5,'Y','N',',',4);
@@ -2209,13 +2155,11 @@
<literal>NULL</literal> fails equality comparison with any
value. <literal>FIELD()</literal> is the complement of
<literal>ELT()</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic FIELD -->
- </para>
<programlisting>
mysql> SELECT FIELD('ej', 'Hej', 'ej', 'Heja', 'hej', 'foo');
@@ -2256,13 +2200,11 @@
<literal>NULL</literal>. This function does not work properly
if the first argument contains a comma
('<literal>,</literal>') character.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic FIND_IN_SET -->
- </para>
<programlisting>
mysql> SELECT FIND_IN_SET('b','a,b,c,d');
@@ -2298,13 +2240,11 @@
<replaceable>N_OR_S</replaceable> characters, where each
character in <replaceable>N_OR_S</replaceable> is converted to
two hexadecimal digits.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic HEX -->
- </para>
<programlisting>
mysql> SELECT HEX(255);
@@ -2379,13 +2319,11 @@
<replaceable>str</replaceable>. This is the same as the
two-argument form of <literal>LOCATE()</literal>, except that
the order of the arguments is reversed.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic INSTR -->
- </para>
<programlisting>
mysql> SELECT INSTR('foobarbar', 'bar');
@@ -2416,13 +2354,11 @@
<para>
<literal>LCASE()</literal> is a synonym for
<literal>LOWER()</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- description_for_help_topic LEFT -->
- </para>
<para>
<indexterm type="function">
@@ -2439,13 +2375,11 @@
<para>
Returns the leftmost <replaceable>len</replaceable> characters
from the string <replaceable>str</replaceable>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic LEFT -->
- </para>
<programlisting>
mysql> SELECT LEFT('foobarbar', 5);
@@ -2539,9 +2473,7 @@
</para>
-->
- <para>
<!-- description_for_help_topic LOCATE -->
- </para>
<para>
<indexterm type="function">
@@ -2746,13 +2678,11 @@
<literal>MID(<replaceable>str</replaceable>,<replaceable>pos</replaceable>,<replaceable>len</replaceable>)</literal>
is a synonym for
<literal>SUBSTRING(<replaceable>str</replaceable>,<replaceable>pos</replaceable>,<replaceable>len</replaceable>)</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- description_for_help_topic OCT -->
- </para>
<para>
<indexterm type="function">
@@ -2867,13 +2797,11 @@
<literal>POSITION(<replaceable>substr</replaceable> IN
<replaceable>str</replaceable>)</literal> is a synonym for
<literal>LOCATE(<replaceable>substr</replaceable>,<replaceable>str</replaceable>)</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- description_for_help_topic QUOTE -->
- </para>
<para>
<indexterm type="function">
@@ -3094,13 +3022,11 @@
<para>
Returns the string <replaceable>str</replaceable> with
trailing space characters removed.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic RTRIM -->
- </para>
<programlisting>
mysql> SELECT RTRIM('barbar ');
@@ -3111,9 +3037,7 @@
This function is multi-byte safe.
</para>
- <para>
<!-- description_for_help_topic SOUNDEX -->
- </para>
<para>
<indexterm type="function">
@@ -3138,13 +3062,11 @@
<replaceable>str</replaceable> are ignored. All international
alphabetic characters outside the A-Z range are treated as
vowels.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic SOUNDEX -->
- </para>
<programlisting>
mysql> SELECT SOUNDEX('Hello');
@@ -3162,9 +3084,7 @@
duplicates first and then vowels.
</para>
- <para>
<!-- description_for_help_topic SOUNDS LIKE SOUNDS LIKE -->
- </para>
<para>
<indexterm type="function">
@@ -3183,13 +3103,11 @@
This is the same as
<literal>SOUNDEX(<replaceable>expr1</replaceable>) =
SOUNDEX(<replaceable>expr2</replaceable>)</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- description_for_help_topic SPACE -->
- </para>
<para>
<indexterm type="function">
@@ -3206,22 +3124,18 @@
<para>
Returns a string consisting of <replaceable>N</replaceable>
space characters.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic SPACE -->
- </para>
<programlisting>
mysql> SELECT SPACE(6);
-> ' '
</programlisting>
- <para>
<!-- description_for_help_topic SUBSTRING -->
- </para>
<para>
<indexterm type="function">
@@ -3260,9 +3174,9 @@
from the end of the string, rather than the beginning. A
negative value may be used for <replaceable>pos</replaceable>
in any of the forms of this function.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
<!-- example_for_help_topic SUBSTRING -->
@@ -3296,9 +3210,7 @@
<literal>SUBSTRING()</literal>.
</para>
- <para>
<!-- description_for_help_topic SUBSTRING_INDEX -->
- </para>
<para>
<indexterm type="function">
@@ -3322,13 +3234,11 @@
returned. If <replaceable>count</replaceable> is negative,
everything to the right of the final delimiter (counting from
the right) is returned.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic SUBSTRING_INDEX -->
- </para>
<programlisting>
mysql> SELECT SUBSTRING_INDEX('www.mysql.com', '.', 2);
@@ -3341,9 +3251,7 @@
This function is multi-byte safe.
</para>
- <para>
<!-- description_for_help_topic TRIM BOTH LEADING TRAILING FROM -->
- </para>
<para>
<indexterm type="function">
@@ -3369,13 +3277,11 @@
given, <literal>BOTH</literal> is assumed. If
<replaceable>remstr</replaceable> is optional and not
specified, spaces are removed.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic TRIM -->
- </para>
<programlisting>
mysql> SELECT TRIM(' bar ');
@@ -3392,9 +3298,7 @@
This function is multi-byte safe.
</para>
- <para>
<!-- description_for_help_topic UCASE -->
- </para>
<para>
<indexterm type="function">
@@ -3411,13 +3315,11 @@
<para>
<literal>UCASE()</literal> is a synonym for
<literal>UPPER()</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- description_for_help_topic UNCOMPRESS -->
- </para>
<para>
<indexterm type="function">
@@ -3438,13 +3340,11 @@
This function requires MySQL to have been compiled with a
compression library such as <literal>zlib</literal>.
Otherwise, the return value is always <literal>NULL</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic UNCOMPRESS -->
- </para>
<programlisting>
mysql> SELECT UNCOMPRESS(COMPRESS('any string'));
@@ -3453,9 +3353,7 @@
-> NULL
</programlisting>
- <para>
<!-- description_for_help_topic UNCOMPRESSED_LENGTH -->
- </para>
<para>
<indexterm type="function">
@@ -3471,22 +3369,18 @@
<para>
Returns the length of a compressed string before compression.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic UNCOMPRESSED_LENGTH -->
- </para>
<programlisting>
mysql> SELECT UNCOMPRESSED_LENGTH(COMPRESS(REPEAT('a',30)));
-> 30
</programlisting>
- <para>
<!-- description_for_help_topic UNHEX -->
- </para>
<para>
<indexterm type="function">
@@ -3507,13 +3401,11 @@
argument as a number and converts it to the character
represented by the number. The resulting characters are
returned as a binary string.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic UNHEX -->
- </para>
<programlisting>
mysql> SELECT UNHEX('4D7953514C');
@@ -3526,9 +3418,7 @@
-> '1267'
</programlisting>
- <para>
<!-- description_for_help_topic UPPER -->
- </para>
<para>
<indexterm type="function">
@@ -3546,13 +3436,11 @@
Returns the string <replaceable>str</replaceable> with all
characters changed to uppercase according to the current
character set mapping (the default is ISO-8859-1 Latin1).
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic UPPER -->
- </para>
<programlisting>
mysql> SELECT UPPER('Hej');
@@ -3679,13 +3567,9 @@
</tgroup>
</informaltable>
- <para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic LIKE -->
- </para>
<programlisting>
mysql> SELECT 'David!' LIKE 'David_';
@@ -3824,9 +3708,9 @@
This is the same as <literal>NOT
(<replaceable>expr</replaceable> REGEXP
<replaceable>pat</replaceable>)</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
<para>
<indexterm type="concept">
@@ -3845,9 +3729,9 @@
<indexterm type="function">
<primary>RLIKE</primary>
</indexterm>
+ </para>
<!-- description_for_help_topic RLIKE REGEXP -->
- </para>
</listitem>
<listitem>
@@ -3934,13 +3818,11 @@
<literal>STRCMP()</literal> returns 0 if the strings are
identical, -1 if the first argument is smaller than the
second according to the current sort order, and 1 otherwise.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic STRCMP -->
- </para>
<programlisting>
mysql> SELECT STRCMP('text', 'text2');
@@ -4018,22 +3900,18 @@
<para>
Addition:
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic + -->
- </para>
<programlisting>
mysql> SELECT 3+5;
-> 8
</programlisting>
- <para>
<!-- description_for_help_topic - binary -->
- </para>
<para>
<indexterm type="function">
@@ -4053,22 +3931,18 @@
<para>
Subtraction:
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic - binary -->
- </para>
<programlisting>
mysql> SELECT 3-5;
-> -2
</programlisting>
- <para>
<!-- description_for_help_topic - unary -->
- </para>
<para>
<indexterm type="function">
@@ -4093,13 +3967,11 @@
<para>
Unary minus. Changes the sign of the argument.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic - unary -->
- </para>
<programlisting>
mysql> SELECT - 2;
@@ -4114,9 +3986,7 @@
equal to -2^63 or less.
</para>
- <para>
<!-- description_for_help_topic * -->
- </para>
<para>
<indexterm type="function">
@@ -4136,13 +4006,11 @@
<para>
Multiplication:
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic * -->
- </para>
<programlisting>
mysql> SELECT 3*5;
@@ -4160,9 +4028,7 @@
<xref linkend="numeric-types"/>.)
</para>
- <para>
<!-- description_for_help_topic / -->
- </para>
<para>
<indexterm type="function">
@@ -4182,13 +4048,11 @@
<para>
Division:
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic / -->
- </para>
<programlisting>
mysql> SELECT 3/5;
@@ -4220,20 +4084,18 @@
<listitem>
<para>
<literal>DIV</literal>
+ </para>
<!-- description_for_help_topic DIV FLOOR BIGINT -->
- </para>
<para>
Integer division. Similar to <literal>FLOOR()</literal> but
safe with <literal>BIGINT</literal> values.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic DIV -->
- </para>
<programlisting>
mysql> SELECT 5 DIV 2;
@@ -4278,13 +4140,11 @@
<para>
Returns the absolute value of <replaceable>X</replaceable>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic ABS -->
- </para>
<programlisting>
mysql> SELECT ABS(2);
@@ -4298,9 +4158,7 @@
values.
</para>
- <para>
<!-- description_for_help_topic ACOS -->
- </para>
<para>
<indexterm type="function">
@@ -4319,13 +4177,11 @@
is, the value whose cosine is <replaceable>X</replaceable>.
Returns <literal>NULL</literal> if
<replaceable>X</replaceable> is not in the range -1 to 1.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic ACOS -->
- </para>
<!-- Output from 5.0.7-beta -->
@@ -4338,9 +4194,7 @@
-> 1.5707963267949
</programlisting>
- <para>
<!-- description_for_help_topic ASIN -->
- </para>
<para>
<indexterm type="function">
@@ -4359,13 +4213,11 @@
is, the value whose sine is <replaceable>X</replaceable>.
Returns <literal>NULL</literal> if
<replaceable>X</replaceable> is not in the range -1 to 1.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic ASIN -->
- </para>
<!-- Output from 5.0.7-beta -->
@@ -4376,9 +4228,7 @@
-> 0
</programlisting>
- <para>
<!-- description_for_help_topic ATAN -->
- </para>
<para>
<indexterm type="function">
@@ -4395,13 +4245,11 @@
<para>
Returns the arctangent of <replaceable>X</replaceable>, that
is, the value whose tangent is <replaceable>X</replaceable>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic ATAN -->
- </para>
<!-- Output from 5.0.7-beta -->
@@ -4412,9 +4260,7 @@
-> -1.1071487177941
</programlisting>
- <para>
<!-- description_for_help_topic ATAN2 -->
- </para>
<para>
<indexterm type="function">
@@ -4438,13 +4284,11 @@
<replaceable>X</replaceable></literal>, except that the
signs of both arguments are used to determine the quadrant
of the result.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic ATAN2 -->
- </para>
<!-- Output from 5.0.7-beta -->
@@ -4455,9 +4299,7 @@
-> 1.5707963267949
</programlisting>
- <para>
<!-- description_for_help_topic CEILING CEIL -->
- </para>
<para>
<indexterm type="function">
@@ -4475,13 +4317,11 @@
<para>
Returns the smallest integer value not less than
<replaceable>X</replaceable>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic CEILING -->
- </para>
<programlisting>
mysql> SELECT CEILING(1.23);
@@ -4495,9 +4335,7 @@
value is converted to a <literal>BIGINT</literal>.
</para>
- <para>
<!-- description_for_help_topic COS -->
- </para>
<para>
<indexterm type="function">
@@ -4514,13 +4352,11 @@
<para>
Returns the cosine of <replaceable>X</replaceable>, where
<replaceable>X</replaceable> is given in radians.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic COS -->
- </para>
<!-- Output from 5.0.7-beta -->
@@ -4529,9 +4365,7 @@
-> -1
</programlisting>
- <para>
<!-- description_for_help_topic COT -->
- </para>
<para>
<indexterm type="function">
@@ -4547,13 +4381,11 @@
<para>
Returns the cotangent of <replaceable>X</replaceable>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic COT -->
- </para>
<!-- Output from 5.0.7-beta -->
@@ -4564,9 +4396,7 @@
-> NULL
</programlisting>
- <para>
<!-- description_for_help_topic CRC32 -->
- </para>
<para>
<indexterm type="function">
@@ -4586,13 +4416,11 @@
if the argument is <literal>NULL</literal>. The argument is
expected to be a string and (if possible) is treated as one
if it is not.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic CRC32 -->
- </para>
<programlisting>
mysql> SELECT CRC32('MySQL');
@@ -4601,9 +4429,7 @@
-> 2501908538
</programlisting>
- <para>
<!-- description_for_help_topic DEGREES -->
- </para>
<para>
<indexterm type="function">
@@ -4620,13 +4446,11 @@
<para>
Returns the argument <replaceable>X</replaceable>, converted
from radians to degrees.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic DEGREES -->
- </para>
<!-- Output from 5.0.7-beta -->
@@ -4655,13 +4479,11 @@
Returns the value of <literal>e</literal> (the base of
natural logarithms) raised to the power of
<replaceable>X</replaceable>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic EXP -->
- </para>
<!-- Output from 5.0.7-beta -->
@@ -4689,13 +4511,11 @@
<para>
Returns the largest integer value not greater than
<replaceable>X</replaceable>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic FLOOR -->
- </para>
<programlisting>
mysql> SELECT FLOOR(1.23);
@@ -4709,9 +4529,7 @@
<literal>BIGINT</literal>.
</para>
- <para>
<!-- description_for_help_topic LN -->
- </para>
<para>
<indexterm type="function">
@@ -4730,13 +4548,11 @@
<replaceable>X</replaceable>, that is, the logarithm of
<replaceable>X</replaceable> to the base
<replaceable>e</replaceable>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic LN -->
- </para>
<programlisting>
mysql> SELECT LN(2);
@@ -4750,9 +4566,7 @@
<literal>LOG(<replaceable>X</replaceable>)</literal>.
</para>
- <para>
<!-- description_for_help_topic LOG -->
- </para>
<para>
<indexterm type="function">
@@ -4770,13 +4584,11 @@
<para>
If called with one parameter, this function returns the
natural logarithm of <replaceable>X</replaceable>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic LOG -->
- </para>
<programlisting>
mysql> SELECT LOG(2);
@@ -4804,9 +4616,7 @@
/ LOG(<replaceable>B</replaceable>)</literal>.
</para>
- <para>
<!-- description_for_help_topic LOG2 -->
- </para>
<para>
<indexterm type="function">
@@ -4823,13 +4633,11 @@
<para>
Returns the base-2 logarithm of
<literal><replaceable>X</replaceable></literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic LOG2 -->
- </para>
<programlisting>
mysql> SELECT LOG2(65536);
@@ -4846,9 +4654,7 @@
LOG(2)</literal>.
</para>
- <para>
<!-- description_for_help_topic LOG10 -->
- </para>
<para>
<indexterm type="function">
@@ -4865,13 +4671,11 @@
<para>
Returns the base-10 logarithm of
<replaceable>X</replaceable>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic LOG10 -->
- </para>
<!-- Output from 5.0.7-beta -->
@@ -4890,9 +4694,7 @@
<literal>LOG(10,<replaceable>X</replaceable>)</literal>.
</para>
- <para>
<!-- description_for_help_topic % MOD -->
- </para>
<para>
<indexterm type="function">
@@ -4930,13 +4732,11 @@
Modulo operation. Returns the remainder of
<replaceable>N</replaceable> divided by
<replaceable>M</replaceable>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic % -->
- </para>
<programlisting>
mysql> SELECT MOD(234, 10);
@@ -4983,9 +4783,9 @@
Returns the value of π (pi). The default number of
decimals displayed is seven, but MySQL internally uses the
full double-precision value.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
<!-- example_for_help_topic PI -->
@@ -5019,13 +4819,11 @@
<para>
Returns the value of <replaceable>X</replaceable> raised to
the power of <replaceable>Y</replaceable>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic POWER -->
- </para>
<!-- Changed following to match what's produced in 5.0.7-beta -->
@@ -5054,13 +4852,11 @@
Returns the argument <replaceable>X</replaceable>, converted
from degrees to radians. (Note that π radians equals 180
degrees.)
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic RADIANS -->
- </para>
<!-- Output as of 5.0.7-beta -->
@@ -5089,13 +4885,11 @@
1.0. If an integer argument <replaceable>N</replaceable> is
specified, it is used as the seed value, which produces a
repeatable sequence.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic RAND -->
- </para>
<programlisting>
mysql> SELECT RAND();
@@ -5154,9 +4948,7 @@
the same MySQL version.
</para>
- <para>
<!-- description_for_help_topic ROUND -->
- </para>
<para>
<indexterm type="function">
@@ -5179,13 +4971,11 @@
<replaceable>D</replaceable> can be negative in order to
round <replaceable>D</replaceable> digits left of the
decimal point of the value <replaceable>X</replaceable>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic ROUND -->
- </para>
<programlisting>
mysql> SELECT ROUND(-1.23);
@@ -5272,9 +5062,7 @@
For more information, see <xref linkend="precision-math"/>.
</para>
- <para>
<!-- description_for_help_topic SIGN -->
- </para>
<para>
<indexterm type="function">
@@ -5293,13 +5081,11 @@
<literal>0</literal>, or <literal>1</literal>, depending on
whether <replaceable>X</replaceable> is negative, zero, or
positive.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic SIGN -->
- </para>
<programlisting>
mysql> SELECT SIGN(-32);
@@ -5310,9 +5096,7 @@
-> 1
</programlisting>
- <para>
<!-- description_for_help_topic SIN -->
- </para>
<para>
<indexterm type="function">
@@ -5329,13 +5113,11 @@
<para>
Returns the sine of <replaceable>X</replaceable>, where
<replaceable>X</replaceable> is given in radians.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic SIN -->
- </para>
<programlisting>
mysql> SELECT SIN(PI());
@@ -5344,9 +5126,7 @@
-> 0
</programlisting>
- <para>
<!-- description_for_help_topic SQRT -->
- </para>
<para>
<indexterm type="function">
@@ -5363,13 +5143,11 @@
<para>
Returns the square root of a non-negative number
<replaceable>X</replaceable>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic SQRT -->
- </para>
<!-- Output shown is from 5.0.7-beta. -->
@@ -5387,9 +5165,7 @@
-> NULL
</programlisting>
- <para>
<!-- description_for_help_topic TAN -->
- </para>
<para>
<indexterm type="function">
@@ -5406,13 +5182,11 @@
<para>
Returns the tangent of <replaceable>X</replaceable>, where
<replaceable>X</replaceable> is given in radians.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic TAN -->
- </para>
<!-- Output from 5.0.7-beta -->
@@ -5423,9 +5197,7 @@
-> 1.5574077246549
</programlisting>
- <para>
<!-- description_for_help_topic TRUNCATE -->
- </para>
<para>
<indexterm type="function">
@@ -5447,13 +5219,11 @@
be negative in order to truncate (make zero)
<replaceable>D</replaceable> digits left of the decimal
point of the value <replaceable>X</replaceable>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic TRUNCATE -->
- </para>
<programlisting>
mysql> SELECT TRUNCATE(1.223,1);
@@ -5645,9 +5415,7 @@
<literal>ADDTIME(<replaceable>expr</replaceable>,<replaceable>expr2</replaceable>)</literal>
</para>
- <para>
<!-- TODO: DESCRIPTION. Depends on SAP/MySQL mode. -->
- </para>
<para>
<literal>ADDTIME()</literal> adds
@@ -5656,13 +5424,11 @@
<replaceable>expr</replaceable> is a time or datetime
expression, and <replaceable>expr2</replaceable> is a time
expression.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic ADDTIME -->
- </para>
<!-- Output from 5.0.7-beta -->
@@ -5696,9 +5462,9 @@
value. Time zones may be specified as described in
<xref linkend="time-zone-support"/>. This function returns
<literal>NULL</literal> if the arguments are invalid.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
<para>
If the value falls out of the supported range of the
@@ -5708,9 +5474,7 @@
<xref linkend="date-and-time-type-overview"/>.
</para>
- <para>
<!-- example_for_help_topic CONVERT_TZ -->
- </para>
<programlisting>
mysql> SELECT CONVERT_TZ('2004-01-01 12:00:00','GMT','MET');
@@ -5727,9 +5491,7 @@
for instructions.
</para>
- <para>
<!-- description_for_help_topic CURDATE -->
- </para>
<para>
<indexterm type="function">
@@ -5748,13 +5510,11 @@
<literal>'YYYY-MM-DD'</literal> or <literal>YYYYMMDD</literal>
format, depending on whether the function is used in a string
or numeric context.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic CURDATE -->
- </para>
<programlisting>
mysql> SELECT CURDATE();
@@ -5763,9 +5523,7 @@
-> 19971215
</programlisting>
- <para>
<!-- description_for_help_topic CURRENT_DATE -->
- </para>
<para>
<indexterm type="function">
@@ -5784,13 +5542,11 @@
<literal>CURRENT_DATE</literal> and
<literal>CURRENT_DATE()</literal> are synonyms for
<literal>CURDATE()</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- description_for_help_topic CURTIME -->
- </para>
<para>
<indexterm type="function">
@@ -5809,13 +5565,11 @@
<literal>'HH:MM:SS'</literal> or <literal>HHMMSS</literal>
format, depending on whether the function is used in a string
or numeric context.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic CURTIME -->
- </para>
<programlisting>
mysql> SELECT CURTIME();
@@ -5843,13 +5597,11 @@
<literal>CURRENT_TIME</literal> and
<literal>CURRENT_TIME()</literal> are synonyms for
<literal>CURTIME()</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- description_for_help_topic CURRENT_TIMESTAMP -->
- </para>
<para>
<indexterm type="function">
@@ -5867,13 +5619,11 @@
<para>
<literal>CURRENT_TIMESTAMP()</literal> are synonyms for
<literal>NOW()</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- description_for_help_topic DATE function DATE -->
- </para>
<para>
<indexterm type="function">
@@ -5890,22 +5640,18 @@
<para>
Extracts the date part of the date or datetime expression
<replaceable>expr</replaceable>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic DATE function -->
- </para>
<programlisting>
mysql> SELECT DATE('2003-12-31 01:02:03');
-> '2003-12-31'
</programlisting>
- <para>
<!-- description_for_help_topic DATEDIFF -->
- </para>
<para>
<indexterm type="function">
@@ -5919,9 +5665,7 @@
<literal>DATEDIFF(<replaceable>expr</replaceable>,<replaceable>expr2</replaceable>)</literal>
</para>
- <para>
<!-- TODO: DESCRIPTION. Depends on SAP/MySQL mode. -->
- </para>
<para>
<literal>DATEDIFF()</literal> returns the number of days
@@ -5931,13 +5675,11 @@
<replaceable>expr2</replaceable> are date or date-and-time
expressions. Only the date parts of the values are used in the
calculation.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic DATEDIFF -->
- </para>
<programlisting>
mysql> SELECT DATEDIFF('1997-12-31 23:59:59','1997-12-30');
@@ -5946,9 +5688,7 @@
-> -31
</programlisting>
- <para>
<!-- description_for_help_topic DATE OPERATIONS DATE DATE_ADD DATE_SUB SECOND MINUTE HOUR DAY MONTH YEAR MINUTE_SECOND HOUR_MINUTE DAY_HOUR YEAR_MONTH HOUR_SECOND DAY_MINUTE DAY_SECOND INTERVAL -->
- </para>
<para>
<indexterm type="function">
@@ -5982,9 +5722,9 @@
a '<literal>-</literal>' for negative intervals.
<replaceable>type</replaceable> is a keyword indicating how
the expression should be interpreted.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
<para>
The <literal>INTERVAL</literal> keyword and the
@@ -6121,9 +5861,7 @@
or datetime value from an interval. (See examples below.)
</para>
- <para>
<!-- example_for_help_topic DATE OPERATIONS -->
- </para>
<programlisting>
mysql> SELECT '1997-12-31 23:59:59' + INTERVAL 1 SECOND;
@@ -6199,9 +5937,7 @@
-> '1998-02-28'
</programlisting>
- <para>
<!-- description_for_help_topic DATE_FORMAT -->
- </para>
<para>
<indexterm type="function">
@@ -6388,13 +6124,11 @@
Ranges for the month and day specifiers begin with zero due to
the fact that MySQL allows the storing of incomplete dates
such as <literal>'2004-00-00'</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic DATE_FORMAT -->
- </para>
<programlisting>
mysql> SELECT DATE_FORMAT('1997-10-04 22:23:00', '%W %M %Y');
@@ -6411,9 +6145,7 @@
-> '1998 52'
</programlisting>
- <para>
<!-- description_for_help_topic DAY -->
- </para>
<para>
<indexterm type="function">
@@ -6430,13 +6162,11 @@
<para>
<literal>DAY()</literal> is a synonym for
<literal>DAYOFMONTH()</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- description_for_help_topic DAYNAME -->
- </para>
<para>
<indexterm type="function">
@@ -6453,13 +6183,11 @@
<para>
Returns the name of the weekday for
<replaceable>date</replaceable>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic DAYNAME -->
- </para>
<programlisting>
mysql> SELECT DAYNAME('1998-02-05');
@@ -6484,22 +6212,18 @@
Returns the day of the month for
<replaceable>date</replaceable>, in the range
<literal>1</literal> to <literal>31</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic DAYOFMONTH -->
- </para>
<programlisting>
mysql> SELECT DAYOFMONTH('1998-02-03');
-> 3
</programlisting>
- <para>
<!-- description_for_help_topic DAYOFWEEK -->
- </para>
<para>
<indexterm type="function">
@@ -6517,22 +6241,18 @@
Returns the weekday index for <replaceable>date</replaceable>
(1 = Sunday, 2 = Monday, ..., 7 = Saturday). These index
values correspond to the ODBC standard.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic DAYOFWEEK -->
- </para>
<programlisting>
mysql> SELECT DAYOFWEEK('1998-02-03');
-> 3
</programlisting>
- <para>
<!-- description_for_help_topic DAYOFYEAR -->
- </para>
<para>
<indexterm type="function">
@@ -6549,22 +6269,18 @@
<para>
Returns the day of the year for
<replaceable>date</replaceable>, in the range 1 to 366.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic DAYOFYEAR -->
- </para>
<programlisting>
mysql> SELECT DAYOFYEAR('1998-02-03');
-> 34
</programlisting>
- <para>
<!-- description_for_help_topic EXTRACT -->
- </para>
<para>
<indexterm type="function">
@@ -6584,13 +6300,11 @@
of interval type specifiers as <literal>DATE_ADD()</literal>
or <literal>DATE_SUB()</literal>, but extracts parts from the
date rather than performing date arithmetic.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic EXTRACT -->
- </para>
<programlisting>
mysql> SELECT EXTRACT(YEAR FROM '1999-07-02');
@@ -6621,13 +6335,11 @@
<para>
Given a daynumber <replaceable>N</replaceable>, returns a
<literal>DATE</literal> value.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic FROM_DAYS -->
- </para>
<programlisting>
mysql> SELECT FROM_DAYS(729669);
@@ -6641,9 +6353,7 @@
<xref linkend="mysql-calendar"/>.
</para>
- <para>
<!-- description_for_help_topic FROM_UNIXTIME -->
- </para>
<para>
<indexterm type="function">
@@ -6667,9 +6377,7 @@
the function is used in a string or numeric context.
</para>
- <para>
<!-- example_for_help_topic FROM_UNIXTIME -->
- </para>
<programlisting>
mysql> SELECT FROM_UNIXTIME(875996580);
@@ -6688,9 +6396,7 @@
<!-- end_description_for_help_topic -->
- <para>
<!-- example_for_help_topic FROM_UNIXTIME -->
- </para>
<programlisting>
mysql> SELECT FROM_UNIXTIME(UNIX_TIMESTAMP(),
@@ -6698,9 +6404,7 @@
-> '2003 6th August 06:22:58 2003'
</programlisting>
- <para>
<!-- description_for_help_topic GET_FORMAT -->
- </para>
<para>
<indexterm type="function">
@@ -6827,13 +6531,9 @@
argument is illegal,the function returns @code{NULL}.
-->
- <para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic GET_FORMAT -->
- </para>
<programlisting>
mysql> SELECT DATE_FORMAT('2003-10-03',GET_FORMAT(DATE,'EUR'));
@@ -6856,9 +6556,7 @@
<!-- INSERT STOP -->
- <para>
<!-- description_for_help_topic HOUR -->
- </para>
<para>
<indexterm type="function">
@@ -6875,13 +6573,11 @@
<para>
Returns the hour for <replaceable>time</replaceable>. The
range of the return value is 0 to 23 for time-of-day values.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic HOUR -->
- </para>
<programlisting>
mysql> SELECT HOUR('10:05:03');
@@ -6900,9 +6596,7 @@
-> 272
</programlisting>
- <para>
<!-- description_for_help_topic LAST_DAY -->
- </para>
<para>
<indexterm type="function">
@@ -6920,13 +6614,11 @@
Takes a date or datetime value and returns the corresponding
value for the last day of the month. Returns
<literal>NULL</literal> if the argument is invalid.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic LAST_DAY -->
- </para>
<programlisting>
mysql> SELECT LAST_DAY('2003-02-05');
@@ -6939,9 +6631,7 @@
-> NULL
</programlisting>
- <para>
<!-- description_for_help_topic LOCALTIME -->
- </para>
<para>
<indexterm type="function">
@@ -6959,13 +6649,11 @@
<literal>LOCALTIME</literal> and
<literal>LOCALTIME()</literal> are synonyms for
<literal>NOW()</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- description_for_help_topic LOCALTIMESTAMP -->
- </para>
<para>
<indexterm type="function">
@@ -6984,13 +6672,11 @@
<literal>LOCALTIMESTAMP</literal> and
<literal>LOCALTIMESTAMP()</literal> are synonyms for
<literal>NOW()</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- description_for_help_topic MAKEDATE -->
- </para>
<para>
<indexterm type="function">
@@ -7008,13 +6694,11 @@
Returns a date, given year and day-of-year values.
<replaceable>dayofyear</replaceable> must be greater than 0 or
the result is <literal>NULL</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic MAKEDATE -->
- </para>
<programlisting>
mysql> SELECT MAKEDATE(2001,31), MAKEDATE(2001,32);
@@ -7025,9 +6709,7 @@
-> NULL
</programlisting>
- <para>
<!-- description_for_help_topic MAKETIME -->
- </para>
<para>
<indexterm type="function">
@@ -7046,22 +6728,18 @@
<replaceable>hour</replaceable>,
<replaceable>minute</replaceable>, and
<replaceable>second</replaceable> arguments.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic MAKETIME -->
- </para>
<programlisting>
mysql> SELECT MAKETIME(12,15,30);
-> '12:15:30'
</programlisting>
- <para>
<!-- description_for_help_topic MICROSECOND -->
- </para>
<para>
<indexterm type="function">
@@ -7079,13 +6757,11 @@
Returns the microseconds from the time or datetime expression
<replaceable>expr</replaceable> as a number in the range from
<literal>0</literal> to <literal>999999</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic MICROSECOND -->
- </para>
<programlisting>
mysql> SELECT MICROSECOND('12:00:00.123456');
@@ -7094,9 +6770,7 @@
-> 10
</programlisting>
- <para>
<!-- description_for_help_topic MINUTE -->
- </para>
<para>
<indexterm type="function">
@@ -7113,22 +6787,18 @@
<para>
Returns the minute for <replaceable>time</replaceable>, in the
range <literal>0</literal> to <literal>59</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic MINUTE -->
- </para>
<programlisting>
mysql> SELECT MINUTE('98-02-03 10:05:03');
-> 5
</programlisting>
- <para>
<!-- description_for_help_topic MONTH -->
- </para>
<para>
<indexterm type="function">
@@ -7145,22 +6815,18 @@
<para>
Returns the month for <replaceable>date</replaceable>, in the
range <literal>1</literal> to <literal>12</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic MONTH -->
- </para>
<programlisting>
mysql> SELECT MONTH('1998-02-03');
-> 2
</programlisting>
- <para>
<!-- description_for_help_topic MONTHNAME -->
- </para>
<para>
<indexterm type="function">
@@ -7177,22 +6843,18 @@
<para>
Returns the full name of the month for
<replaceable>date</replaceable>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic MONTHNAME -->
- </para>
<programlisting>
mysql> SELECT MONTHNAME('1998-02-05');
-> 'February'
</programlisting>
- <para>
<!-- description_for_help_topic NOW -->
- </para>
<para>
<indexterm type="function">
@@ -7211,13 +6873,11 @@
<literal>'YYYY-MM-DD HH:MM:SS'</literal> or
<literal>YYYYMMDDHHMMSS</literal> format, depending on whether
the function is used in a string or numeric context.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic NOW -->
- </para>
<programlisting>
mysql> SELECT NOW();
@@ -7247,22 +6907,18 @@
a value in the format <literal>YYYYMM</literal>. Note that the
period argument <replaceable>P</replaceable> is
<emphasis>not</emphasis> a date value.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic PERIOD_ADD -->
- </para>
<programlisting>
mysql> SELECT PERIOD_ADD(9801,2);
-> 199803
</programlisting>
- <para>
<!-- description_for_help_topic PERIOD_DIFF -->
- </para>
<para>
<indexterm type="function">
@@ -7285,22 +6941,18 @@
that the period arguments <replaceable>P1</replaceable> and
<replaceable>P2</replaceable> are <emphasis>not</emphasis>
date values.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic PERIOD_DIFF -->
- </para>
<programlisting>
mysql> SELECT PERIOD_DIFF(9802,199703);
-> 11
</programlisting>
- <para>
<!-- description_for_help_topic QUARTER -->
- </para>
<para>
<indexterm type="function">
@@ -7318,22 +6970,18 @@
Returns the quarter of the year for
<replaceable>date</replaceable>, in the range
<literal>1</literal> to <literal>4</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic QUARTER -->
- </para>
<programlisting>
mysql> SELECT QUARTER('98-04-01');
-> 2
</programlisting>
- <para>
<!-- description_for_help_topic SECOND -->
- </para>
<para>
<indexterm type="function">
@@ -7350,22 +6998,18 @@
<para>
Returns the second for <replaceable>time</replaceable>, in the
range <literal>0</literal> to <literal>59</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic SECOND -->
- </para>
<programlisting>
mysql> SELECT SECOND('10:05:03');
-> 3
</programlisting>
- <para>
<!-- description_for_help_topic SEC_TO_TIME -->
- </para>
<para>
<indexterm type="function">
@@ -7385,13 +7029,11 @@
<literal>'HH:MM:SS'</literal> or <literal>HHMMSS</literal>
format, depending on whether the function is used in a string
or numeric context.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic SEC_TO_TIME -->
- </para>
<programlisting>
mysql> SELECT SEC_TO_TIME(2378);
@@ -7459,13 +7101,11 @@
<literal>STR_TO_DATE()</literal> returns
<literal>NULL</literal>. Starting from MySQL 5.0.3, an illegal
value also produces a warning.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic STR_TO_DATE -->
- </para>
<programlisting>
<!-- next example commented out until format string becomes optional -->
@@ -7556,13 +7196,9 @@
-> 2004-10-18
</programlisting>
- <para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- description_for_help_topic SUBTIME -->
- </para>
<para>
<indexterm type="function">
@@ -7576,9 +7212,7 @@
<literal>SUBTIME(<replaceable>expr</replaceable>,<replaceable>expr2</replaceable>)</literal>
</para>
- <para>
<!-- TODO: DESCRIPTION. Depends on SAP/MySQL mode. -->
- </para>
<para>
<literal>SUBTIME()</literal> subtracts
@@ -7587,13 +7221,11 @@
<replaceable>expr</replaceable> is a time or datetime
expression, and <replaceable>expr2</replaceable> is a time
expression.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic SUBTIME -->
- </para>
<programlisting>
mysql> SELECT SUBTIME('1997-12-31 23:59:59.999999','1 1:1:1.000002');
@@ -7602,9 +7234,7 @@
-> '-00:59:59.999999'
</programlisting>
- <para>
<!-- description_for_help_topic SYSDATE -->
- </para>
<para>
<indexterm type="function">
@@ -7621,13 +7251,11 @@
<para>
<literal>SYSDATE()</literal> is a synonym for
<literal>NOW()</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- description_for_help_topic TIME function TIME -->
- </para>
<para>
<indexterm type="function">
@@ -7644,13 +7272,11 @@
<para>
Extracts the time part of the time or datetime expression
<replaceable>expr</replaceable>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic TIME function -->
- </para>
<programlisting>
mysql> SELECT TIME('2003-12-31 01:02:03');
@@ -7659,9 +7285,7 @@
-> '01:02:03.000123'
</programlisting>
- <para>
<!-- description_for_help_topic TIMEDIFF -->
- </para>
<para>
<indexterm type="function">
@@ -7675,9 +7299,7 @@
<literal>TIMEDIFF(<replaceable>expr</replaceable>,<replaceable>expr2</replaceable>)</literal>
</para>
- <para>
<!-- TODO: DESCRIPTION. Depends on SAP/MySQL mode. -->
- </para>
<para>
<literal>TIMEDIFF()</literal> returns the time between the
@@ -7686,13 +7308,11 @@
<replaceable>expr</replaceable> and
<replaceable>expr2</replaceable> are time or date-and-time
expressions, but both must be of the same type.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic TIMEDIFF -->
- </para>
<programlisting>
mysql> SELECT TIMEDIFF('2000:01:01 00:00:00',
@@ -7703,9 +7323,7 @@
-> '46:58:57.999999'
</programlisting>
- <para>
<!-- description_for_help_topic TIMESTAMP function TIMESTAMP -->
- </para>
<para>
<indexterm type="function">
@@ -7728,13 +7346,11 @@
expression <replaceable>expr2</replaceable> to the date or
datetime expression <replaceable>expr</replaceable> and
returns theresult as a datetime value.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic TIMESTAMP function -->
- </para>
<programlisting>
mysql> SELECT TIMESTAMP('2003-12-31');
@@ -7743,9 +7359,7 @@
-> '2004-01-01 00:00:00'
</programlisting>
- <para>
<!-- description_for_help_topic TIMESTAMPADD -->
- </para>
<para>
<indexterm type="function">
@@ -7778,13 +7392,11 @@
<literal>SQL_TSI_</literal>. For example,
<literal>DAY</literal> or <literal>SQL_TSI_DAY</literal> both
are legal.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic TIMESTAMPADD function -->
- </para>
<programlisting>
mysql> SELECT TIMESTAMPADD(MINUTE,1,'2003-01-02');
@@ -7798,9 +7410,7 @@
5.0.0.
</para>
- <para>
<!-- description_for_help_topic TIMESTAMPDIFF -->
- </para>
<para>
<indexterm type="function">
@@ -7823,13 +7433,11 @@
<replaceable>interval</replaceable> are the same as those
listed in the description of the
<literal>TIMESTAMPADD()</literal> function.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic TIMESTAMPDIFF function -->
- </para>
<programlisting>
mysql> SELECT TIMESTAMPDIFF(MONTH,'2003-02-01','2003-05-01');
@@ -7843,9 +7451,7 @@
5.0.0.
</para>
- <para>
<!-- description_for_help_topic TIME_FORMAT -->
- </para>
<para>
<indexterm type="function">
@@ -7865,9 +7471,9 @@
contain only those format specifiers that handle hours,
minutes, and seconds. Other specifiers produce a
<literal>NULL</literal> value or <literal>0</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
<para>
If the <replaceable>time</replaceable> value contains an hour
@@ -7883,9 +7489,7 @@
-> '100 100 04 04 4'
</programlisting>
- <para>
<!-- description_for_help_topic TIME_TO_SEC -->
- </para>
<para>
<indexterm type="function">
@@ -7902,13 +7506,11 @@
<para>
Returns the <replaceable>time</replaceable> argument,
converted to seconds.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic TIME_TO_SEC -->
- </para>
<programlisting>
mysql> SELECT TIME_TO_SEC('22:23:00');
@@ -7917,9 +7519,7 @@
-> 2378
</programlisting>
- <para>
<!-- description_for_help_topic TO_DAYS -->
- </para>
<para>
<indexterm type="function">
@@ -7936,13 +7536,11 @@
<para>
Given a date <replaceable>date</replaceable>, returns a
daynumber (the number of days since year 0).
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic TO_DAYS -->
- </para>
<programlisting>
mysql> SELECT TO_DAYS(950501);
@@ -7978,9 +7576,7 @@
<xref linkend="mysql-calendar"/> for details.
</para>
- <para>
<!-- description_for_help_topic UNIX_TIMESTAMP -->
- </para>
<para>
<indexterm type="function">
@@ -8039,9 +7635,7 @@
See <xref linkend="cast-functions"/>.
</para>
- <para>
<!-- description_for_help_topic UTC_DATE -->
- </para>
<para>
<indexterm type="function">
@@ -8060,13 +7654,11 @@
<literal>'YYYY-MM-DD'</literal> or <literal>YYYYMMDD</literal>
format, depending on whether the function is used in a string
or numeric context.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic UTC_DATE -->
- </para>
<programlisting>
mysql> SELECT UTC_DATE(), UTC_DATE() + 0;
@@ -8092,13 +7684,11 @@
<literal>'HH:MM:SS'</literal> or <literal>HHMMSS</literal>
format, depending on whether the function is used in a string
or numeric context.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic UTC_TIME -->
- </para>
<programlisting>
mysql> SELECT UTC_TIME(), UTC_TIME() + 0;
@@ -8125,13 +7715,11 @@
<literal>'YYYY-MM-DD HH:MM:SS'</literal> or
<literal>YYYYMMDDHHMMSS</literal> format, depending on whether
the function is used in a string or numeric context.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic UTC_TIMESTAMP -->
- </para>
<programlisting>
mysql> SELECT UTC_TIMESTAMP(), UTC_TIMESTAMP() + 0;
@@ -8241,13 +7829,9 @@
</tgroup>
</informaltable>
- <para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic WEEK -->
- </para>
<programlisting>
mysql> SELECT WEEK('1998-02-20');
@@ -8309,9 +7893,7 @@
-> '52'
</programlisting>
- <para>
<!-- description_for_help_topic WEEKDAY -->
- </para>
<para>
<indexterm type="function">
@@ -8329,13 +7911,11 @@
Returns the weekday index for <replaceable>date</replaceable>
(<literal>0</literal> = Monday, <literal>1</literal> =
Tuesday, ... <literal>6</literal> = Sunday).
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic WEEKDAY -->
- </para>
<programlisting>
mysql> SELECT WEEKDAY('1998-02-03 22:23:00');
@@ -8344,9 +7924,7 @@
-> 2
</programlisting>
- <para>
<!-- description_for_help_topic WEEKOFYEAR -->
- </para>
<para>
<indexterm type="function">
@@ -8365,22 +7943,18 @@
from <literal>1</literal> to <literal>53</literal>. It is a
compatibility function that is equivalent to
<literal>WEEK(<replaceable>date</replaceable>,3)</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic WEEKOFYEAR -->
- </para>
<programlisting>
mysql> SELECT WEEKOFYEAR('1998-02-20');
-> 8
</programlisting>
- <para>
<!-- description_for_help_topic YEAR -->
- </para>
<para>
<indexterm type="function">
@@ -8397,22 +7971,18 @@
<para>
Returns the year for <replaceable>date</replaceable>, in the
range <literal>1000</literal> to <literal>9999</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic YEAR -->
- </para>
<programlisting>
mysql> SELECT YEAR('98-02-03');
-> 1998
</programlisting>
- <para>
<!-- description_for_help_topic YEARWEEK -->
- </para>
<para>
<indexterm type="function">
@@ -8434,13 +8004,11 @@
<literal>WEEK()</literal>. The year in the result may be
different from the year in the date argument for the first and
the last week of the year.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic YEARWEEK -->
- </para>
<programlisting>
mysql> SELECT YEARWEEK('1987-01-01');
@@ -8597,9 +8165,7 @@
WITH QUERY EXPANSION])</literal>
</para>
- <para>
<!-- description_for_help_topic MATCH AGAINST MATCH AGAINST BOOLEAN IN MODE MATCH AGAINST QUERY EXPANSION WITH -->
- </para>
<para>
MySQL has support for full-text indexing and searching. A
@@ -8615,9 +8181,9 @@
<literal>FULLTEXT</literal> index, and then create the index
afterwards, than to load data into a table that has an
existing <literal>FULLTEXT</literal> index.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
<para>
Constraints on full-text searching are listed in
@@ -9639,13 +9205,11 @@
<literal>BINARY</literal> or <literal>BLOB</literal>.
<literal>BINARY</literal> also causes trailing spaces to be
significant.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic BINARY operator -->
- </para>
<programlisting>
mysql> SELECT 'a' = 'A';
@@ -9722,9 +9286,7 @@
<replaceable>transcoding_name</replaceable>)</literal>
</para>
- <para>
<!-- description_for_help_topic CAST CONVERT SIGNED UNSIGNED BINARY CHAR DATE DATETIME TIME -->
- </para>
<para>
The <literal>CAST()</literal> and <literal>CONVERT()</literal>
@@ -9828,9 +9390,9 @@
The cast functions are useful when you want to create a column
with a specific type in a <literal>CREATE ... SELECT</literal>
statement:
+ </para>
<!-- end_description_for_help_topic -->
- </para>
<programlisting>
CREATE TABLE new_table SELECT CAST('2000-01-01' AS DATE);
@@ -9981,9 +9543,7 @@
<!-- end_description_for_help_topic -->
- <para>
<!-- example_for_help_topic | -->
- </para>
<programlisting>
mysql> SELECT 29 | 15;
@@ -9994,9 +9554,7 @@
The result is an unsigned 64-bit integer.
</para>
- <para>
<!-- description_for_help_topic & -->
- </para>
<para>
<indexterm type="function">
@@ -10017,13 +9575,11 @@
<para>
Bitwise AND:
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic & -->
- </para>
<programlisting>
mysql> SELECT 29 & 15;
@@ -10034,9 +9590,7 @@
The result is an unsigned 64-bit integer.
</para>
- <para>
<!-- description_for_help_topic ^ -->
- </para>
<para>
<indexterm type="function">
@@ -10057,13 +9611,11 @@
<para>
Bitwise XOR:
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic ^ -->
- </para>
<programlisting>
mysql> SELECT 1 ^ 1;
@@ -10078,9 +9630,7 @@
The result is an unsigned 64-bit integer.
</para>
- <para>
<!-- description_for_help_topic << -->
- </para>
<para>
<indexterm type="function">
@@ -10095,13 +9645,11 @@
<listitem>
<para>
<literal><<</literal>
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic << -->
- </para>
<programlisting>
mysql> SELECT 1 << 2;
@@ -10112,9 +9660,7 @@
The result is an unsigned 64-bit integer.
</para>
- <para>
<!-- description_for_help_topic >> -->
- </para>
<para>
<indexterm type="function">
@@ -10194,13 +9740,11 @@
<para>
Returns the number of bits that are set in the argument
<replaceable>N</replaceable>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic BIT_COUNT -->
- </para>
<programlisting>
mysql> SELECT BIT_COUNT(29);
@@ -10290,13 +9834,11 @@
<para>
You can use the AES functions to store data in an encrypted
form by modifying your queries:
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic AES_DECRYPT -->
- </para>
<programlisting>
INSERT INTO t VALUES (1,AES_ENCRYPT('text','password'));
@@ -10321,9 +9863,7 @@
available in MySQL.
</para>
- <para>
<!-- description_for_help_topic DECODE -->
- </para>
<para>
<indexterm type="function">
@@ -10343,13 +9883,11 @@
<replaceable>pass_str</replaceable> as the password.
<replaceable>crypt_str</replaceable> should be a string
returned from <literal>ENCODE()</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- description_for_help_topic ENCODE -->
- </para>
<para>
<indexterm type="function">
@@ -10373,13 +9911,11 @@
The result is a binary string of the same length as
<replaceable>str</replaceable>. If you want to save it in a
column, use a <literal>BLOB</literal> column type.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- description_for_help_topic DES_DECRYPT -->
- </para>
<para>
<indexterm type="function">
@@ -10426,13 +9962,11 @@
If the <replaceable>crypt_str</replaceable> argument doesn't
look like an encrypted string, MySQL returns the given
<replaceable>crypt_str</replaceable>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- description_for_help_topic DES_ENCRYPT -->
- </para>
<para>
<indexterm type="function">
@@ -10510,17 +10044,15 @@
<literal><replaceable>new_len</replaceable> =
<replaceable>orig_len</replaceable> +
(8-(<replaceable>orig_len</replaceable> % 8))+1</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
<para>
Each line in the DES key file has the following format:
</para>
- <para>
<!-- example_for_help_topic DES_ENCRYPT -->
- </para>
<programlisting>
<replaceable>key_num</replaceable> <replaceable>des_key_str</replaceable>
@@ -10555,9 +10087,7 @@
> WHERE crypted_credit_card = DES_ENCRYPT('credit_card_number');
</programlisting>
- <para>
<!-- description_for_help_topic ENCRYPT -->
- </para>
<para>
<indexterm type="function">
@@ -10578,13 +10108,11 @@
with at least two characters. If no
<replaceable>salt</replaceable> argument is given, a random
value is used.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic ENCRYPT -->
- </para>
<programlisting>
mysql> SELECT ENCRYPT('hello');
@@ -10609,9 +10137,7 @@
functions exist on all platforms.
</para>
- <para>
<!-- description_for_help_topic MD5 -->
- </para>
<para>
<indexterm type="function">
@@ -10631,13 +10157,11 @@
<literal>NULL</literal> if the argument was
<literal>NULL</literal>. The return value can, for example,
be used as a hash key.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic MD5 -->
- </para>
<programlisting>
mysql> SELECT MD5('testing');
@@ -10656,9 +10180,7 @@
<xref linkend="cast-functions"/>.
</para>
- <para>
<!-- description_for_help_topic OLD_PASSWORD -->
- </para>
<para>
<indexterm type="function">
@@ -10684,9 +10206,7 @@
<xref linkend="password-hashing"/>.
</para>
- <para>
<!-- description_for_help_topic PASSWORD -->
- </para>
<para>
<indexterm type="function">
@@ -10708,13 +10228,11 @@
for encrypting MySQL passwords for storage in the
<literal>Password</literal> column of the
<literal>user</literal> grant table.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic PASSWORD -->
- </para>
<programlisting>
mysql> SELECT PASSWORD('badpwd');
@@ -10748,9 +10266,7 @@
securely in your applications.
</para>
- <para>
<!-- description_for_help_topic SHA SHA1 -->
- </para>
<para>
<indexterm type="function">
@@ -10779,13 +10295,9 @@
cryptographically safe function for storing passwords.
</para>
- <para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic SHA -->
- </para>
<programlisting>
mysql> SELECT SHA1('abc');
@@ -10840,13 +10352,11 @@
value is always <literal>0</literal>. The intended use is
from within the <command>mysql</command> client, which
reports query execution times:
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic BENCHMARK -->
- </para>
<programlisting>
mysql> SELECT BENCHMARK(1000000,ENCODE('hello','goodbye'));
@@ -10866,9 +10376,7 @@
server machine is.
</para>
- <para>
<!-- description_for_help_topic CHARSET -->
- </para>
<para>
<indexterm type="function">
@@ -10884,13 +10392,11 @@
<para>
Returns the character set of the string argument.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic CHARSET -->
- </para>
<programlisting>
mysql> SELECT CHARSET('abc');
@@ -10918,13 +10424,11 @@
<para>
Returns the collation coercibility value of the string
argument.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic COERCIBILITY -->
- </para>
<programlisting>
mysql> SELECT COERCIBILITY('abc' COLLATE latin1_swedish_ci);
@@ -11030,9 +10534,7 @@
Lower values have higher precedence.
</para>
- <para>
<!-- description_for_help_topic COLLATION -->
- </para>
<para>
<indexterm type="function">
@@ -11049,13 +10551,11 @@
<para>
Returns the collation for the character set of the string
argument.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic COLLATION -->
- </para>
<programlisting>
mysql> SELECT COLLATION('abc');
@@ -11081,13 +10581,11 @@
<para>
Returns the connection ID (thread ID) for the connection.
Every connection has its own unique ID.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic CONNECTION_ID -->
- </para>
<programlisting>
mysql> SELECT CONNECTION_ID();
@@ -11114,13 +10612,11 @@
to the MySQL account that determines your access privileges.
It can be different from the value of
<literal>USER()</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic CURRENT_USER -->
- </para>
<programlisting>
mysql> SELECT USER();
@@ -11149,9 +10645,7 @@
<literal>utf8</literal> character set.
</para>
- <para>
<!-- description_for_help_topic DATABASE -->
- </para>
<para>
<indexterm type="function">
@@ -11168,13 +10662,11 @@
<para>
Returns the default (current) database name. In MySQL 5.0,
the string has the <literal>utf8</literal> character set.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic DATABASE -->
- </para>
<programlisting>
mysql> SELECT DATABASE();
@@ -11215,13 +10707,11 @@
a <literal>SQL_CALC_FOUND_ROWS</literal> option in the
<literal>SELECT</literal> statement, then invoke
<literal>FOUND_ROWS()</literal> afterward:
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic FOUND_ROWS -->
- </para>
<programlisting>
mysql> SELECT SQL_CALC_FOUND_ROWS * FROM <replaceable>tbl_name</replaceable>
@@ -11457,9 +10947,7 @@
<literal>SELECT</literal> or <literal>SET</literal>.
</para>
- <para>
<!-- description_for_help_topic ROW_COUNT -->
- </para>
<para>
<indexterm type="function">
@@ -11479,13 +10967,11 @@
This is the same as the row count that the
<command>mysql</command> client displays and the value from
the <literal>mysql_affected_rows()</literal> C API function.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic ROW_COUNT -->
- </para>
<programlisting>
mysql> INSERT INTO t VALUES(1),(2),(3);
@@ -11516,9 +11002,7 @@
<literal>ROW_COUNT()</literal> was added in MySQL 5.0.1.
</para>
- <para>
<!-- description_for_help_topic SESSION_USER -->
- </para>
<para>
<indexterm type="function">
@@ -11535,13 +11019,11 @@
<para>
<literal>SESSION_USER()</literal> is a synonym for
<literal>USER()</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- description_for_help_topic SYSTEM_USER -->
- </para>
<para>
<indexterm type="function">
@@ -11558,13 +11040,11 @@
<para>
<literal>SYSTEM_USER()</literal> is a synonym for
<literal>USER()</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- description_for_help_topic USER -->
- </para>
<para>
<indexterm type="function">
@@ -11580,13 +11060,11 @@
<para>
Returns the current MySQL username and hostname.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic USER -->
- </para>
<programlisting>
mysql> SELECT USER();
@@ -11621,9 +11099,7 @@
-> 'davida'
</programlisting>
- <para>
<!-- description_for_help_topic VERSION -->
- </para>
<para>
<indexterm type="function">
@@ -11640,13 +11116,11 @@
<para>
Returns a string that indicates the MySQL server version.
The string uses the <literal>utf8</literal> character set.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic VERSION -->
- </para>
<programlisting>
mysql> SELECT VERSION();
@@ -11695,21 +11169,17 @@
Returns the default value for a table column. Starting with
MySQL 5.0.2, an error results if the column has no default
value.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic DEFAULT -->
- </para>
<programlisting>
mysql> UPDATE t SET i = DEFAULT(i)+1 WHERE id < 100;
</programlisting>
- <para>
<!-- description_for_help_topic FORMAT -->
- </para>
<para>
<indexterm type="function">
@@ -11730,13 +11200,11 @@
result as a string. If <replaceable>D</replaceable> is
<literal>0</literal>, the result has no decimal point or
fractional part.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic FORMAT -->
- </para>
<programlisting>
mysql> SELECT FORMAT(12332.123456, 4);
@@ -11747,9 +11215,7 @@
-> '12,332'
</programlisting>
- <para>
<!-- description_for_help_topic GET_LOCK -->
- </para>
<para>
<indexterm type="concept">
@@ -11804,9 +11270,7 @@
<!-- end_description_for_help_topic -->
- <para>
<!-- example_for_help_topic GET_LOCK -->
- </para>
<programlisting>
mysql> SELECT GET_LOCK('lock1',10);
@@ -11828,9 +11292,7 @@
second <literal>GET_LOCK()</literal> call.
</para>
- <para>
<!-- description_for_help_topic INET_ATON -->
- </para>
<para>
<indexterm type="function">
@@ -11849,13 +11311,11 @@
a string, returns an integer that represents the numeric
value of the address. Addresses may be 4- or 8-byte
addresses.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic INET_ATON -->
- </para>
<programlisting>
mysql> SELECT INET_ATON('209.207.224.40');
@@ -11890,9 +11350,7 @@
<xref linkend="numeric-types"/>.
</para>
- <para>
<!-- description_for_help_topic INET_NTOA -->
- </para>
<para>
<indexterm type="function">
@@ -11909,22 +11367,18 @@
<para>
Given a numeric network address (4 or 8 byte), returns the
dotted-quad representation of the address as a string.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic INET_NTOA -->
- </para>
<programlisting>
mysql> SELECT INET_NTOA(3520061480);
-> '209.207.224.40'
</programlisting>
- <para>
<!-- description_for_help_topic IS_FREE_LOCK -->
- </para>
<para>
<indexterm type="function">
@@ -11945,13 +11399,11 @@
the lock), <literal>0</literal> if the lock is in use, and
<literal>NULL</literal> on errors (such as incorrect
arguments).
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- description_for_help_topic IS_USED_LOCK -->
- </para>
<para>
<indexterm type="function">
@@ -11970,13 +11422,11 @@
is in use (that is, locked). If so, it returns the
connection identifier of the client that holds the lock.
Otherwise, it returns <literal>NULL</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- description_for_help_topic MASTER_POS_WAIT -->
- </para>
<para>
<indexterm type="function">
@@ -12005,9 +11455,9 @@
function returns <literal>NULL</literal>. If the slave is
past the specified position, the function returns
immediately.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
<para>
If a <replaceable>timeout</replaceable> value is specified,
@@ -12018,9 +11468,7 @@
timeout.
</para>
- <para>
<!-- description_for_help_topic RELEASE_LOCK -->
- </para>
<para>
<indexterm type="function">
@@ -12050,13 +11498,11 @@
The <literal>DO</literal> statement is convenient to use
with <literal>RELEASE_LOCK()</literal>. See
<xref linkend="do"/>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- description_for_help_topic UUID -->
- </para>
<para>
<indexterm type="function">
@@ -12205,13 +11651,11 @@
<literal>DISTINCT</literal> option can be used as of MySQL
5.0.3 to return the averge of the distinct values of
<replaceable>expr</replaceable>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic AVG -->
- </para>
<programlisting>
mysql> SELECT student_name, AVG(test_score)
@@ -12219,9 +11663,7 @@
-> GROUP BY student_name;
</programlisting>
- <para>
<!-- description_for_help_topic BIT_AND -->
- </para>
<para>
<indexterm type="function">
@@ -12239,9 +11681,9 @@
Returns the bitwise <literal>AND</literal> of all bits in
<replaceable>expr</replaceable>. The calculation is
performed with 64-bit (<literal>BIGINT</literal>) precision.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
<para>
In MySQL 5.0, this function returns
@@ -12250,9 +11692,7 @@
<literal>BIGINT</literal> with all bits set to 1.)
</para>
- <para>
<!-- description_for_help_topic BIT_OR -->
- </para>
<para>
<indexterm type="function">
@@ -12270,18 +11710,16 @@
Returns the bitwise <literal>OR</literal> of all bits in
<replaceable>expr</replaceable>. The calculation is
performed with 64-bit (<literal>BIGINT</literal>) precision.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
<para>
This function returns <literal>0</literal> if there were no
matching rows.
</para>
- <para>
<!-- description_for_help_topic BIT_XOR -->
- </para>
<para>
<indexterm type="function">
@@ -12299,18 +11737,16 @@
Returns the bitwise <literal>XOR</literal> of all bits in
<replaceable>expr</replaceable>. The calculation is
performed with 64-bit (<literal>BIGINT</literal>) precision.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
<para>
This function returns <literal>0</literal> if there were no
matching rows.
</para>
- <para>
<!-- description_for_help_topic COUNT -->
- </para>
<para>
<indexterm type="function">
@@ -12328,13 +11764,11 @@
Returns a count of the number of non-<literal>NULL</literal>
values in the rows retrieved by a <literal>SELECT</literal>
statement.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic COUNT -->
- </para>
<programlisting>
mysql> SELECT student.student_name,COUNT(*)
@@ -12371,9 +11805,7 @@
each of which may affect the count.
</para>
- <para>
<!-- description_for_help_topic COUNT DISTINCT COUNT DISTINCT -->
- </para>
<para>
<indexterm type="function">
@@ -12395,13 +11827,11 @@
<para>
Returns a count of the number of different
non-<literal>NULL</literal> values.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic COUNT DISTINCT -->
- </para>
<programlisting>
mysql> SELECT COUNT(DISTINCT results) FROM student;
@@ -12415,9 +11845,7 @@
<literal>COUNT(DISTINCT ...)</literal>.
</para>
- <para>
<!-- description_for_help_topic GROUP_CONCAT DISTINCT SEPARATOR ORDER BY ASC DESC -->
- </para>
<para>
<indexterm type="function">
@@ -12518,9 +11946,7 @@
</para>
-->
- <para>
<!-- description_for_help_topic MIN MAX MIN MAX DISTINCT -->
- </para>
<para>
<indexterm type="function">
@@ -12564,13 +11990,11 @@
<replaceable>expr</replaceable>; this is supported, but
produces the same result as omitting
<literal>DISTINCT</literal>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- example_for_help_topic MIN MAX -->
- </para>
<programlisting>
mysql> SELECT student_name, MIN(test_score), MAX(test_score)
@@ -12588,9 +12012,7 @@
future MySQL release.
</para>
- <para>
<!-- description_for_help_topic STDDEV STD -->
- </para>
<para>
<indexterm type="function">
@@ -12625,13 +12047,11 @@
function is provided for compatibility with Oracle. As of
MySQL 5.0.3, the standard SQL function
<literal>STDDEV_POP()</literal> can be used instead.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- description_for_help_topic STDDEV_POP -->
- </para>
<para>
<indexterm type="function">
@@ -12652,13 +12072,11 @@
MySQL 5.0.3. Before 5.0.3, you can use
<literal>STD()</literal> or <literal>STDDEV()</literal>,
which are equivalent but not standard SQL.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- description_for_help_topic STDDEV_SAMP -->
- </para>
<para>
<indexterm type="function">
@@ -12677,13 +12095,11 @@
<replaceable>expr</replaceable> (the square root of
<literal>VAR_SAMP()</literal>. This function was added in
MySQL 5.0.3.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- description_for_help_topic SUM DISTINCT -->
- </para>
<para>
<indexterm type="function">
@@ -12712,13 +12128,11 @@
<literal>NULL</literal>. The <literal>DISTINCT</literal>
keyword can be used in MySQL 5.0 to sum only the distinct
values of <replaceable>expr</replaceable>.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- description_for_help_topic VAR_POP -->
- </para>
<para>
<indexterm type="function">
@@ -12740,13 +12154,11 @@
5.0.3. Before 5.0.3, you can use
<literal>VARIANCE()</literal>, which is equivalent but is
not standard SQL.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- description_for_help_topic VAR_SAMP -->
- </para>
<para>
<indexterm type="function">
@@ -12765,13 +12177,11 @@
<replaceable>expr</replaceable>. That is, the denominator is
the number of rows minus one. This function was added in
MySQL 5.0.3.
+ </para>
<!-- end_description_for_help_topic -->
- </para>
- <para>
<!-- description_for_help_topic VARIANCE -->
- </para>
<para>
<indexterm type="function">
@@ -12790,10 +12200,10 @@
<replaceable>expr</replaceable>. This is an extension to
standard SQL. As of MySQL 5.0.3, the standard SQL function
<literal>VAR_POP()</literal> can be used instead.
-
-<!-- end_description_for_help_topic -->
</para>
</listitem>
+
+<!-- end_description_for_help_topic -->
</itemizedlist>
--- 1.13/refman/functions.xml 2005-07-26 19:44:06 -05:00
+++ 1.14/refman/functions.xml 2005-07-26 21:00:53 -05:00
@@ -1938,32 +1938,32 @@
<para>
The compressed string contents are stored the following way:
+ </para>
- <itemizedlist>
-
- <listitem>
- <para>
- Empty strings are stored as empty strings.
- </para>
- </listitem>
+ <itemizedlist>
- <listitem>
- <para>
- Non-empty strings are stored as a four-byte length of
- the uncompressed string (low byte first), followed by
- the compressed string. If the string ends with space, an
- extra '<literal>.</literal>' character is added to avoid
- problems with endspace trimming should the result be
- stored in a <literal>CHAR</literal> or
- <literal>VARCHAR</literal> column. (Use of
- <literal>CHAR</literal> or <literal>VARCHAR</literal> to
- store compressed strings is not recommended. It is
- better to use a <literal>BLOB</literal> column instead.)
- </para>
- </listitem>
+ <listitem>
+ <para>
+ Empty strings are stored as empty strings.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Non-empty strings are stored as a four-byte length of the
+ uncompressed string (low byte first), followed by the
+ compressed string. If the string ends with space, an extra
+ '<literal>.</literal>' character is added to avoid
+ problems with endspace trimming should the result be
+ stored in a <literal>CHAR</literal> or
+ <literal>VARCHAR</literal> column. (Use of
+ <literal>CHAR</literal> or <literal>VARCHAR</literal> to
+ store compressed strings is not recommended. It is better
+ to use a <literal>BLOB</literal> column instead.)
+ </para>
+ </listitem>
- </itemizedlist>
- </para>
+ </itemizedlist>
<para>
<literal>COMPRESS()</literal> was added in MySQL 4.1.1.
@@ -5459,9 +5459,7 @@
<literal>ADDTIME(<replaceable>expr</replaceable>,<replaceable>expr2</replaceable>)</literal>
</para>
- <para>
<!-- TODO: DESCRIPTION. Depends on SAP/MySQL mode. -->
- </para>
<para>
<literal>ADDTIME()</literal> adds
@@ -5721,9 +5719,7 @@
<literal>DATEDIFF(<replaceable>expr</replaceable>,<replaceable>expr2</replaceable>)</literal>
</para>
- <para>
<!-- TODO: DESCRIPTION. Depends on SAP/MySQL mode. -->
- </para>
<para>
<literal>DATEDIFF()</literal> returns the number of days
@@ -6507,21 +6503,15 @@
Returns a format string. This function is useful in
combination with the <literal>DATE_FORMAT()</literal> and the
<literal>STR_TO_DATE()</literal> functions.
-
-<!-- Following is commented out because not yet implemented -->
- </para>
-
- <para>
-<!-- and when setting -->
</para>
- <para>
-<!-- the server variables @code{DATE_FORMAT}, @code{TIME_FORMAT}, and -->
- </para>
+<!--
+ Following is commented out because not yet implemented:
- <para>
-<!-- @code{DATETIME_FORMAT}. -->
- </para>
+ and when setting
+ the server variables @code{DATE_FORMAT}, @code{TIME_FORMAT}, and
+ @code{DATETIME_FORMAT}.
+-->
<para>
The three possible values for the first argument and the five
@@ -6613,13 +6603,12 @@
as for <literal>DATETIME</literal>.
</para>
-<!-- If the first argument of -->
-
-<!-- @code{GET_FORMAT()} is illegal or missing, or if the second argument -->
-
-<!-- is missing, the function returns an error. If the second argument is illegal, -->
-
-<!-- the function returns @code{NULL}. -->
+<!--
+ If the first argument of
+ @code{GET_FORMAT()} is illegal or missing, or if the second argument
+ is missing, the function returns an error. If the second argument is illegal,
+ the function returns @code{NULL}.
+-->
<!-- end_description_for_help_topic -->
@@ -6630,12 +6619,12 @@
-> '03.10.2003'
mysql> SELECT STR_TO_DATE('10.31.2003',GET_FORMAT(DATE,'USA'));
-> 2003-10-31
-<!-- Following is commented out because not yet implemented -->
-
-<!-- mysql> SET DATE_FORMAT=GET_FORMAT(DATE, 'USA'); SELECT '2003-10-31'; -->
-
-<!-- -> 10-31-2003 -->
+<!--
+ Following is commented out because not yet implemented
+mysql> SET DATE_FORMAT=GET_FORMAT(DATE, 'USA'); SELECT '2003-10-31';
+ -> 10-31-2003
+-->
</programlisting>
<para>
@@ -7156,9 +7145,7 @@
-> 3938
</programlisting>
- <para>
<!-- INSERT START -->
- </para>
<!-- description_for_help_topic STR_TO_DATE -->
@@ -7186,49 +7173,21 @@
the string contains only date or time parts.
</para>
- <para>
-<!-- NOT YET IMPLEMENTED START -->
- </para>
-
- <para>
-<!-- If @var{format_str} is not specified, values are expected to be in the -->
- </para>
-
- <para>
-<!-- following format (for the specifiers used. (See the table in the -->
- </para>
-
- <para>
-<!-- @code{DATE_FORMAT()} function description.) -->
- </para>
-
- <para>
-<!-- @multitable @columnfractions .20 .65 -->
- </para>
-
- <para>
-<!-- @item @strong{Type} @tab @strong{Format} -->
- </para>
-
- <para>
-<!-- @item @code{DATE} @tab @code{'%Y-%m-%d'} -->
- </para>
-
- <para>
-<!-- @item @code{TIME} @tab @code{'%h-%m-%s'} -->
- </para>
-
- <para>
-<!-- @item @code{TIMESTAMP} @tab @code{'%Y-%m-%d %H:%i:%s'} -->
- </para>
+<!--
+ NOT YET IMPLEMENTED START
- <para>
-<!-- @end multitable -->
- </para>
+ If @var{format_str} is not specified, values are expected to be in the
+ following format (for the specifiers used. (See the table in the
+ @code{DATE_FORMAT()} function description.)
+ @multitable @columnfractions .20 .65
+ @item @strong{Type} @tab @strong{Format}
+ @item @code{DATE} @tab @code{'%Y-%m-%d'}
+ @item @code{TIME} @tab @code{'%h-%m-%s'}
+ @item @code{TIMESTAMP} @tab @code{'%Y-%m-%d %H:%i:%s'}
+ @end multitable
- <para>
-<!-- NOT YET IMPLEMENTED STOP -->
- </para>
+ NOT YET IMPLEMENTED STOP
+-->
<para>
The date, time, or datetime values contained in
@@ -7459,9 +7418,7 @@
<literal>TIMEDIFF(<replaceable>expr</replaceable>,<replaceable>expr2</replaceable>)</literal>
</para>
- <para>
<!-- TODO: DESCRIPTION. Depends on SAP/MySQL mode. -->
- </para>
<para>
<literal>TIMEDIFF()</literal> returns the time between the
| Thread |
|---|
| • bk commit - mysqldoc@docsrva tree (paul:1.3136) | paul | 27 Jul |