Author: jstephens
Date: 2005-12-02 15:18:10 +0100 (Fri, 02 Dec 2005)
New Revision: 475
Log:
Corrected some info regarding RANGE and LIST partitioning - includes fix
for Bug #15369 (SergeyP).
Modified:
trunk/refman-5.1/sql-syntax.xml
Modified: trunk/refman-5.1/sql-syntax.xml
===================================================================
--- trunk/refman-5.1/sql-syntax.xml 2005-12-02 04:20:43 UTC (rev 474)
+++ trunk/refman-5.1/sql-syntax.xml 2005-12-02 14:18:10 UTC (rev 475)
@@ -1544,7 +1544,7 @@
[LINEAR] HASH(<replaceable>expr</replaceable>)
| [LINEAR] KEY(<replaceable>column_list</replaceable>)
| RANGE(<replaceable>expr</replaceable>)
- | LIST(<replaceable>column_list</replaceable>)
+ | LIST(<replaceable>expr</replaceable>)
[PARTITIONS <replaceable>num</replaceable>]
[ SUBPARTITION BY
[LINEAR] HASH(<replaceable>expr</replaceable>)
@@ -2939,19 +2939,34 @@
with the one referencing <literal>MAXVALUE</literal>
coming last of all in the list.
</para>
+ </listitem>
+ <listitem>
<para>
+
<literal>LIST(<replaceable>expr</replaceable>)</literal>:
+ This is useful when assigning partitions based on a
+ table column with a restricted set of possible values,
+ such as a state or country code. In such a case, all
+ records pertaining to a certain state or country can be
+ assigned to a single partition, or a partition can be
+ reserved for a certain set of states or countries. It is
+ similar to <literal>RANGE</literal>, except that only
+ <literal>VALUES IN</literal> may be used to specify
+ allowable values for each partition.
+ </para>
+
+ <para>
<literal>VALUES IN</literal> is used with a list of
values to be matched. For instance, you could create a
partitioning scheme such as the following:
</para>
-
-<programlisting>
+
+ <programlisting>
CREATE TABLE client_firms (
id INT,
name VARCHAR(35)
)
-PARTITION BY RANGE (id) (
+PARTITION BY LIST (id) (
PARTITION r0 VALUES IN (1, 5, 9, 13, 17, 21),
PARTITION r1 VALUES IN (2, 6, 10, 14, 18, 22),
PARTITION r2 VALUES IN (3, 7, 11, 15, 19, 23),
@@ -2960,50 +2975,17 @@
</programlisting>
<para>
- Currently, the value list used with <literal>VALUES IN
- ...</literal> must consist of integer values only.
- </para>
-
- <para>
- (Since this table is partitioned using only
- <literal>VALUES IN</literal> expressions, you could
- instead use <literal>PARTITION BY LIST</literal>, rather
- than <literal>PARTITION BY RANGE</literal>. See next
- item.)
- </para>
-
- <para>
- In either case — <literal>VALUES LESS
- THAN</literal> or <literal>VALUES IN</literal>
—
- each partition is defined with the syntax
- <literal>PARTITION
- <replaceable>name</replaceable></literal>, where
- <replaceable>name</replaceable> is the identifier for
- the partition, followed by the <literal>VALUES
- ...</literal> clause.
- </para>
- </listitem>
-
- <listitem>
- <para>
-
<literal>LIST(<replaceable>expr</replaceable>)</literal>:
- This is useful when assigning partitions based on a
- table column with a restricted set of possible values,
- such as a state or country code. In such a case, all
- records pertaining to a certain state or country can be
- assigned to a single partition, or a partition can be
- reserved for a certain set of states or countries. It is
- similar to <literal>RANGE</literal>, except that only
- <literal>VALUES IN</literal> may be used to specify
- allowable values for each partition.
- </para>
-
- <para>
When using list partitioning, you must define at least
one partition using <literal>VALUES IN</literal>. You
cannot use <literal>VALUES LESS THAN</literal> with
<literal>PARTITION BY LIST</literal>.
</para>
+
+ <para>
+ <emphasis role="bold">Note</emphasis>: Currently, the
+ value list used with <literal>VALUES IN</literal> must
+ consist of integer values only.
+ </para>
</listitem>
<listitem>
@@ -3049,7 +3031,6 @@
integer value.
</para>
</listitem>
-
</itemizedlist>
<para>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r475 - trunk/refman-5.1 | jstephens | 2 Dec |