Bug #61947 Manual section 16.5.3 incorrect on partition pruning
Submitted: 21 Jul 2011 21:53 Modified: 24 Aug 2011 8:32
Reporter: Chris Wagner Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.5+ OS:Any
Assigned to: Jon Stephens CPU Architecture:Any
Tags: documentation, manual, Partition pruning, partitioning function

[21 Jul 2011 21:53] Chris Wagner
Description:
Section 16.5.3 of the 5.5 manual has wrong information about partition pruning.  It should state that the referenced time functions are only valid for pruning if the partitioned column is of type DATE or DATETIME.

--quote--
In MySQL 5.5, partition pruning is supported only for the TO_DAYS(), TO_SECONDS(), and YEAR() functions. In addition, beginning with MySQL 5.5.15, UNIX_TIMESTAMP() is treated as monotonic in partitioning expressions. See Section 16.4, “Partition Pruning”, for more information. 
--end quote--

http://dev.mysql.com/doc/refman/5.5/en/partitioning-limitations-functions.html
http://dev.mysql.com/doc/refman/5.5/en/partitioning-pruning.html

How to repeat:
n/a

Suggested fix:
fix verbiage.
[21 Jul 2011 22:21] Chris Wagner
Also, DIV should be listed as one of the allowed functions.  It is currently ommitted but stated elsewhere in the manual.
[22 Jul 2011 8:07] Valeriy Kravchuk
Looks like http://dev.mysql.com/doc/refman/5.5/en/partitioning-limitations-functions.html should be clarified.
[17 Aug 2011 4:37] Jon Stephens
DIV is not a function.
[17 Aug 2011 4:39] Jon Stephens
But http://dev.mysql.com/doc/refman/5.5/en/partitioning-pruning.html already states,

"Pruning can also be applied for tables partitioned on a DATE or DATETIME column when the partitioning expression uses the YEAR() or TO_DAYS() function."
[23 Aug 2011 23:54] Chris Wagner
DIV is not a "function" but it is an "operator".  The sections dealing with partition pruning are in need of organization and clarity.  In practice, functions and operators are used together and thus should be discussed together.
[23 Aug 2011 23:57] Chris Wagner
And besides, the statement "In MySQL 5.5, partition pruning is supported only for the TO_DAYS(), TO_SECONDS(), and YEAR() functions" is factually wrong since it states right above that that other functions are supported.
[24 Aug 2011 8:32] Jon Stephens
I missed the emphasis on "only" in the original report.

Fixed/closed.

-----

Author: js221926
Date: 2011-08-24 10:29:15 +0200 (Wed, 24 Aug 2011)
New Revision: 27143

Log:

Removed "only" - BUG#61947

Modified:
   trunk/refman-5.5/partitioning.xml
   trunk/refman-5.6/partitioning.xml

Modified: trunk/refman-5.5/partitioning.xml
===================================================================
--- trunk/refman-5.5/partitioning.xml	2011-08-24 08:19:36 UTC (rev 27142)
+++ trunk/refman-5.5/partitioning.xml	2011-08-24 08:29:15 UTC (rev 27143)
Changed blocks: 1, Lines Added: 2, Lines Deleted: 2; 731 bytes

@@ -6918,8 +6918,8 @@
       </informaltable>
 
       <para>
-        In MySQL &current-series;, partition pruning is supported only
-        for the <literal role="func">TO_DAYS()</literal>,
+        In MySQL &current-series;, partition pruning is supported for
+        the <literal role="func">TO_DAYS()</literal>,
         <literal role="func">TO_SECONDS()</literal>, and
         <literal role="func">YEAR()</literal> functions. In addition,
         beginning with MySQL 5.5.15,

Modified: trunk/refman-5.6/partitioning.xml
===================================================================
--- trunk/refman-5.6/partitioning.xml	2011-08-24 08:19:36 UTC (rev 27142)
+++ trunk/refman-5.6/partitioning.xml	2011-08-24 08:29:15 UTC (rev 27143)
Changed blocks: 1, Lines Added: 2, Lines Deleted: 2; 730 bytes

@@ -7973,8 +7973,8 @@
       </informaltable>
 
       <para>
-        In MySQL &current-series;, partition pruning is supported only
-        for the <literal role="func">TO_DAYS()</literal>,
+        In MySQL &current-series;, partition pruning is supported for
+        the <literal role="func">TO_DAYS()</literal>,
         <literal role="func">TO_SECONDS()</literal>, and
         <literal role="func">YEAR()</literal> functions. In addition,
         beginning with MySQL 5.6.3,