Author: jstephens
Date: 2007-08-20 13:50:29 +0200 (Mon, 20 Aug 2007)
New Revision: 7471
Log:
Moved ASCII(), ORD(), WEEKOFYEAR() from supported to unsupported
functions (Fixes Docs Bug #30189).
Reordered supported and unsupported function listings
(alphabetical/canonical order).
Removed examples depending on these functions.
Modified:
trunk/refman-5.1/partitioning.xml
trunk/refman-5.2/partitioning.xml
Modified: trunk/refman-5.1/partitioning.xml
===================================================================
--- trunk/refman-5.1/partitioning.xml 2007-08-20 11:24:23 UTC (rev 7470)
+++ trunk/refman-5.1/partitioning.xml 2007-08-20 11:50:29 UTC (rev 7471)
Changed blocks: 8, Lines Added: 43, Lines Deleted: 205; 12268 bytes
@@ -1132,140 +1132,6 @@
</para>
<para>
- As with <literal>RANGE</literal> and <literal>HASH</literal>
- partitioning, if you wish to partition a table by a column whose
- value is not an integer or <literal>NULL</literal>, you must
- employ a partitioning expression based on that column which
- returns such a value. For example, suppose that the table
- containing employee data is defined as shown here:
- </para>
-
-<programlisting>
-CREATE TABLE employees (
- id INT NOT NULL,
- fname VARCHAR(30),
- lname VARCHAR(30),
- hired DATE NOT NULL DEFAULT '1970-01-01',
- separated DATE NOT NULL DEFAULT '9999-12-31',
- job_code CHAR(1),
- store_id INT
-);
-</programlisting>
-
- <remark role="todo">
- [js] The next example should probably be moved into the User
- Guide when that is written.
- </remark>
-
- <para>
- In this version of the <literal>employees</literal> table, the
- job code is a letter rather than a number. Each letter
- corresponds to a specific job, and we wish to partition the
- table in such a way that records for employees having similar
- jobs or working in the same department are grouped into the same
- partition, according to the following scheme:
- </para>
-
- <informaltable>
- <tgroup cols="2">
- <colspec colwidth="50*"/>
- <colspec colwidth="50*"/>
- <tbody>
- <row>
- <entry><emphasis role="bold">Job Category or Department</emphasis></entry>
- <entry><emphasis role="bold">Job Codes</emphasis></entry>
- </row>
- <row>
- <entry>Management</entry>
- <entry>D, M, O, P</entry>
- </row>
- <row>
- <entry>Sales</entry>
- <entry>B, L, S</entry>
- </row>
- <row>
- <entry>Technical</entry>
- <entry>A, E, G, I, T</entry>
- </row>
- <row>
- <entry>Clerical</entry>
- <entry>K, N, Y</entry>
- </row>
- <row>
- <entry>Support</entry>
- <entry>C, F, J, R, V</entry>
- </row>
- <row>
- <entry>Unassigned</entry>
- <entry><quote>Empty</quote></entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- <para>
- Since we cannot use character values in value-lists, we need to
- convert these into integers or <literal>NULL</literal>s. For
- this purpose, we can use the <literal>ASCII()</literal> function
- on the column value. A partitioned table that implements this
- scheme is shown here:
- </para>
-
-<programlisting>
-CREATE TABLE employees (
- id INT NOT NULL,
- fname VARCHAR(30),
- lname VARCHAR(30),
- hired DATE NOT NULL DEFAULT '1970-01-01',
- separated DATE NOT NULL DEFAULT '9999-12-31',
- job_code CHAR(1),
- store_id INT
-)
-PARTITION BY LIST( ASCII(job_code) ) (
- PARTITION management VALUES IN(68, 77, 79, 80),
- PARTITION sales VALUES IN(66, 76, 83),
- PARTITION technical VALUES IN(65, 69, 71, 73, 84),
- PARTITION clerical VALUES IN(75, 78, 89),
- PARTITION support VALUES IN(67, 70, 74, 82, 86),
- PARTITION unassigned VALUES IN(NULL, 0, 32)
-);
-</programlisting>
-
- <para>
- Since expressions are not permitted in partition value lists,
- you must list the ASCII codes for the letters that are to be
- matched. Note that <literal>ASCII(NULL)</literal> returns
- <literal>NULL</literal>.
- </para>
-
- <para>
- <emphasis role="bold">Important</emphasis>: If you try to insert
- a row such that the column value (or the partitioning
- expression's return value) is not found in any of the
- partitioning value lists, the <literal>INSERT</literal> query
- will fail with an error. For example, given the
- <literal>LIST</literal> partitioning scheme just outlined, this
- query will fail:
- </para>
-
-<programlisting>
-INSERT INTO employees VALUES
- (224, 'Linus', 'Torvalds', '2002-05-01', '2004-10-12', 'Q', 21);
-</programlisting>
-
- <para>
- Failure occurs because 81 (the ASCII code for the uppercase
- letter <literal>'Q'</literal> is not found in any of the value
- lists used to define any of the partitions. <emphasis>There is
- no <quote>catch-all</quote> definition for list
- partitions</emphasis> analogous to <literal>VALUES LESS
- THAN(MAXVALUE)</literal> which accommodates values not found in
- any of the value lists. In other words, <emphasis>any value
- which is to be matched must be found in one of the value
- lists</emphasis>.
- </para>
-
- <para>
As with <literal>RANGE</literal> partitioning, it is possible to
combine <literal>LIST</literal> partitioning with partitioning
by hash or key to produce a composite partitioning
@@ -4422,34 +4288,6 @@
<listitem>
<formalpara>
- <title>Character sets and collations</title>
-
- <indexterm>
- <primary>partitioning</primary>
- <secondary>and charsets/collations</secondary>
- </indexterm>
-
- <para>
- Using a function like <literal>ASCII()</literal> or
- <literal>ORD()</literal> to convert a string value (such as
- that of a <literal>CHAR</literal> or
- <literal>VARCHAR</literal> column) to an integer works only
- when the string uses an 8-bit character set. The collation
- used for the string can be any collation for the related
- character set. However, the collations
- <literal>latin1_german2_ci</literal>,
- <literal>latin2_czech_cs</literal>, and
- <literal>cp1250_czech_cs</literal> cannot be used, due to
- the fact that these collations require one-to-many character
- conversions.
- </para>
-
- </formalpara>
- </listitem>
-
- <listitem>
- <formalpara>
-
<title>Maximum number of partitions</title>
<indexterm>
@@ -5137,12 +4975,6 @@
<listitem>
<para>
- <literal>ASCII()</literal>
- </para>
- </listitem>
-
- <listitem>
- <para>
<literal>CEILING()</literal>
</para>
</listitem>
@@ -5215,12 +5047,6 @@
<listitem>
<para>
- <literal>ORD()</literal>
- </para>
- </listitem>
-
- <listitem>
- <para>
<literal>QUARTER()</literal>
</para>
</listitem>
@@ -5251,12 +5077,6 @@
<listitem>
<para>
- <literal>WEEKOFYEAR()</literal>
- </para>
- </listitem>
-
- <listitem>
- <para>
<literal>YEAR()</literal>
</para>
</listitem>
@@ -5289,19 +5109,19 @@
<listitem>
<para>
- <literal>GREATEST()</literal>
+ <literal>ASCII()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>ISNULL()</literal>
+ <literal>BIT_COUNT()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>LEAST()</literal>
+ <literal>BIT_LENGTH()</literal>
</para>
</listitem>
@@ -5313,102 +5133,114 @@
<listitem>
<para>
- <literal>IFNULL()</literal>
+ <literal>CAST()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>NULLIF()</literal>
+ <literal>CHAR_LENGTH()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>BIT_LENGTH()</literal>
+ <literal>CHARACTER_LENGTH()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>CHAR_LENGTH()</literal>
+ <literal>CONVERT()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>CHARACTER_LENGTH()</literal>
+ <literal>CRC32()</literal>
</para>
</listitem>
<listitem>
<para>
+ <literal>DATEDIFF()</literal>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
<literal>FIND_IN_SET()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>INSTR()</literal>
+ <literal>GREATEST()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>LENGTH()</literal>
+ <literal>IFNULL()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>LOCATE()</literal>
+ <literal>INET_ATON()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>OCTET_LENGTH()</literal>
+ <literal>INSTR()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>POSITION()</literal>
+ <literal>ISNULL()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>STRCMP()</literal>
+ <literal>LEAST()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>CRC32()</literal>
+ <literal>LENGTH()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>ROUND()</literal>
+ <literal>LOCATE()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>SIGN()</literal>
+ <literal>NULLIF()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>DATEDIFF()</literal>
+ <literal>OCTET_LENGTH()</literal>
</para>
</listitem>
<listitem>
<para>
+ <literal>ORD()</literal>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
<literal>PERIOD_ADD()</literal>
</para>
</listitem>
@@ -5421,46 +5253,52 @@
<listitem>
<para>
- <literal>TIMESTAMPDIFF()</literal>
+ <literal>POSITION()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>UNIX_TIMESTAMP()</literal>
+ <literal>ROUND()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>WEEK()</literal>
+ <literal>SIGN()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>CAST()</literal>
+ <literal>STRCMP()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>CONVERT()</literal>
+ <literal>TIMESTAMPDIFF()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>BIT_COUNT()</literal>
+ <literal>UNIX_TIMESTAMP()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>INET_ATON()</literal>
+ <literal>WEEK()</literal>
</para>
</listitem>
+ <listitem>
+ <para>
+ <literal>WEEKOFYEAR()</literal>
+ </para>
+ </listitem>
+
</itemizedlist>
</section>
Modified: trunk/refman-5.2/partitioning.xml
===================================================================
--- trunk/refman-5.2/partitioning.xml 2007-08-20 11:24:23 UTC (rev 7470)
+++ trunk/refman-5.2/partitioning.xml 2007-08-20 11:50:29 UTC (rev 7471)
Changed blocks: 8, Lines Added: 43, Lines Deleted: 205; 12268 bytes
@@ -1132,140 +1132,6 @@
</para>
<para>
- As with <literal>RANGE</literal> and <literal>HASH</literal>
- partitioning, if you wish to partition a table by a column whose
- value is not an integer or <literal>NULL</literal>, you must
- employ a partitioning expression based on that column which
- returns such a value. For example, suppose that the table
- containing employee data is defined as shown here:
- </para>
-
-<programlisting>
-CREATE TABLE employees (
- id INT NOT NULL,
- fname VARCHAR(30),
- lname VARCHAR(30),
- hired DATE NOT NULL DEFAULT '1970-01-01',
- separated DATE NOT NULL DEFAULT '9999-12-31',
- job_code CHAR(1),
- store_id INT
-);
-</programlisting>
-
- <remark role="todo">
- [js] The next example should probably be moved into the User
- Guide when that is written.
- </remark>
-
- <para>
- In this version of the <literal>employees</literal> table, the
- job code is a letter rather than a number. Each letter
- corresponds to a specific job, and we wish to partition the
- table in such a way that records for employees having similar
- jobs or working in the same department are grouped into the same
- partition, according to the following scheme:
- </para>
-
- <informaltable>
- <tgroup cols="2">
- <colspec colwidth="50*"/>
- <colspec colwidth="50*"/>
- <tbody>
- <row>
- <entry><emphasis role="bold">Job Category or Department</emphasis></entry>
- <entry><emphasis role="bold">Job Codes</emphasis></entry>
- </row>
- <row>
- <entry>Management</entry>
- <entry>D, M, O, P</entry>
- </row>
- <row>
- <entry>Sales</entry>
- <entry>B, L, S</entry>
- </row>
- <row>
- <entry>Technical</entry>
- <entry>A, E, G, I, T</entry>
- </row>
- <row>
- <entry>Clerical</entry>
- <entry>K, N, Y</entry>
- </row>
- <row>
- <entry>Support</entry>
- <entry>C, F, J, R, V</entry>
- </row>
- <row>
- <entry>Unassigned</entry>
- <entry><quote>Empty</quote></entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
-
- <para>
- Since we cannot use character values in value-lists, we need to
- convert these into integers or <literal>NULL</literal>s. For
- this purpose, we can use the <literal>ASCII()</literal> function
- on the column value. A partitioned table that implements this
- scheme is shown here:
- </para>
-
-<programlisting>
-CREATE TABLE employees (
- id INT NOT NULL,
- fname VARCHAR(30),
- lname VARCHAR(30),
- hired DATE NOT NULL DEFAULT '1970-01-01',
- separated DATE NOT NULL DEFAULT '9999-12-31',
- job_code CHAR(1),
- store_id INT
-)
-PARTITION BY LIST( ASCII(job_code) ) (
- PARTITION management VALUES IN(68, 77, 79, 80),
- PARTITION sales VALUES IN(66, 76, 83),
- PARTITION technical VALUES IN(65, 69, 71, 73, 84),
- PARTITION clerical VALUES IN(75, 78, 89),
- PARTITION support VALUES IN(67, 70, 74, 82, 86),
- PARTITION unassigned VALUES IN(NULL, 0, 32)
-);
-</programlisting>
-
- <para>
- Since expressions are not permitted in partition value lists,
- you must list the ASCII codes for the letters that are to be
- matched. Note that <literal>ASCII(NULL)</literal> returns
- <literal>NULL</literal>.
- </para>
-
- <para>
- <emphasis role="bold">Important</emphasis>: If you try to insert
- a row such that the column value (or the partitioning
- expression's return value) is not found in any of the
- partitioning value lists, the <literal>INSERT</literal> query
- will fail with an error. For example, given the
- <literal>LIST</literal> partitioning scheme just outlined, this
- query will fail:
- </para>
-
-<programlisting>
-INSERT INTO employees VALUES
- (224, 'Linus', 'Torvalds', '2002-05-01', '2004-10-12', 'Q', 21);
-</programlisting>
-
- <para>
- Failure occurs because 81 (the ASCII code for the uppercase
- letter <literal>'Q'</literal> is not found in any of the value
- lists used to define any of the partitions. <emphasis>There is
- no <quote>catch-all</quote> definition for list
- partitions</emphasis> analogous to <literal>VALUES LESS
- THAN(MAXVALUE)</literal> which accommodates values not found in
- any of the value lists. In other words, <emphasis>any value
- which is to be matched must be found in one of the value
- lists</emphasis>.
- </para>
-
- <para>
As with <literal>RANGE</literal> partitioning, it is possible to
combine <literal>LIST</literal> partitioning with partitioning
by hash or key to produce a composite partitioning
@@ -4422,34 +4288,6 @@
<listitem>
<formalpara>
- <title>Character sets and collations</title>
-
- <indexterm>
- <primary>partitioning</primary>
- <secondary>and charsets/collations</secondary>
- </indexterm>
-
- <para>
- Using a function like <literal>ASCII()</literal> or
- <literal>ORD()</literal> to convert a string value (such as
- that of a <literal>CHAR</literal> or
- <literal>VARCHAR</literal> column) to an integer works only
- when the string uses an 8-bit character set. The collation
- used for the string can be any collation for the related
- character set. However, the collations
- <literal>latin1_german2_ci</literal>,
- <literal>latin2_czech_cs</literal>, and
- <literal>cp1250_czech_cs</literal> cannot be used, due to
- the fact that these collations require one-to-many character
- conversions.
- </para>
-
- </formalpara>
- </listitem>
-
- <listitem>
- <formalpara>
-
<title>Maximum number of partitions</title>
<indexterm>
@@ -5135,12 +4973,6 @@
<listitem>
<para>
- <literal>ASCII()</literal>
- </para>
- </listitem>
-
- <listitem>
- <para>
<literal>CEILING()</literal>
</para>
</listitem>
@@ -5213,12 +5045,6 @@
<listitem>
<para>
- <literal>ORD()</literal>
- </para>
- </listitem>
-
- <listitem>
- <para>
<literal>QUARTER()</literal>
</para>
</listitem>
@@ -5249,12 +5075,6 @@
<listitem>
<para>
- <literal>WEEKOFYEAR()</literal>
- </para>
- </listitem>
-
- <listitem>
- <para>
<literal>YEAR()</literal>
</para>
</listitem>
@@ -5287,19 +5107,19 @@
<listitem>
<para>
- <literal>GREATEST()</literal>
+ <literal>ASCII()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>ISNULL()</literal>
+ <literal>BIT_COUNT()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>LEAST()</literal>
+ <literal>BIT_LENGTH()</literal>
</para>
</listitem>
@@ -5311,102 +5131,114 @@
<listitem>
<para>
- <literal>IFNULL()</literal>
+ <literal>CAST()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>NULLIF()</literal>
+ <literal>CHAR_LENGTH()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>BIT_LENGTH()</literal>
+ <literal>CHARACTER_LENGTH()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>CHAR_LENGTH()</literal>
+ <literal>CONVERT()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>CHARACTER_LENGTH()</literal>
+ <literal>CRC32()</literal>
</para>
</listitem>
<listitem>
<para>
+ <literal>DATEDIFF()</literal>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
<literal>FIND_IN_SET()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>INSTR()</literal>
+ <literal>GREATEST()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>LENGTH()</literal>
+ <literal>IFNULL()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>LOCATE()</literal>
+ <literal>INET_ATON()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>OCTET_LENGTH()</literal>
+ <literal>INSTR()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>POSITION()</literal>
+ <literal>ISNULL()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>STRCMP()</literal>
+ <literal>LEAST()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>CRC32()</literal>
+ <literal>LENGTH()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>ROUND()</literal>
+ <literal>LOCATE()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>SIGN()</literal>
+ <literal>NULLIF()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>DATEDIFF()</literal>
+ <literal>OCTET_LENGTH()</literal>
</para>
</listitem>
<listitem>
<para>
+ <literal>ORD()</literal>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
<literal>PERIOD_ADD()</literal>
</para>
</listitem>
@@ -5419,46 +5251,52 @@
<listitem>
<para>
- <literal>TIMESTAMPDIFF()</literal>
+ <literal>POSITION()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>UNIX_TIMESTAMP()</literal>
+ <literal>ROUND()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>WEEK()</literal>
+ <literal>SIGN()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>CAST()</literal>
+ <literal>STRCMP()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>CONVERT()</literal>
+ <literal>TIMESTAMPDIFF()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>BIT_COUNT()</literal>
+ <literal>UNIX_TIMESTAMP()</literal>
</para>
</listitem>
<listitem>
<para>
- <literal>INET_ATON()</literal>
+ <literal>WEEK()</literal>
</para>
</listitem>
+ <listitem>
+ <para>
+ <literal>WEEKOFYEAR()</literal>
+ </para>
+ </listitem>
+
</itemizedlist>
</section>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r7471 - in trunk: refman-5.1 refman-5.2 | jon | 20 Aug |