Bug #45804 SHOW PARTITIONS command
Submitted: 28 Jun 2009 3:01
Reporter: Mikiya Okuno Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Information schema Severity:S4 (Feature request)
Version:5.1.35 OS:Any
Assigned to: CPU Architecture:Any

[28 Jun 2009 3:01] Mikiya Okuno
Description:
Currently, there's no way to retrieve partition information except for using I_S.PARTITIONS table. However, it would be useful for many people if there's SHOW PARTITIONS command like below:

mysql> show partitions from t2;
+----------------+-------------+-----------------+-------------------+-------------+-----------------+-------------+------+
| Partition_Name | Part_Method | Part_Expression | Subpartition_Name | Subp_Method | Subp_Expression | Description | Rows |
+----------------+-------------+-----------------+-------------------+-------------+-----------------+-------------+------+
| p0             | HASH        | a % 4           | NULL              | NULL        | NULL            | NULL        |  767 | 
| p1             | HASH        | a % 4           | NULL              | NULL        | NULL            | NULL        |  749 | 
| p2             | HASH        | a % 4           | NULL              | NULL        | NULL            | NULL        |  757 | 
| p3             | HASH        | a % 4           | NULL              | NULL        | NULL            | NULL        |  723 | 
+----------------+-------------+-----------------+-------------------+-------------+-----------------+-------------+------+
4 rows in set (0.00 sec)

How to repeat:
n/a

Suggested fix:
see the patch
[28 Jun 2009 3:01] MySQL Verification Team
A patch for 5.1.35

Attachment: show_partitions.patch (application/octet-stream, text), 8.46 KiB.