summaryrefslogtreecommitdiff
path: root/mysql-test/r/partition_mgm.result
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@sun.com>2008-11-04 08:43:21 +0100
committerMattias Jonsson <mattias.jonsson@sun.com>2008-11-04 08:43:21 +0100
commitabd09620db857c25805baca655442732a3ecfd08 (patch)
tree1f2ab2186dd108e5d20b6ab80b998e53dcc76626 /mysql-test/r/partition_mgm.result
parent54eaadf01c4f5fa823af021600b82274d84e1cd3 (diff)
downloadmariadb-git-abd09620db857c25805baca655442732a3ecfd08.tar.gz
Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
The partitioning clause is only a very long single line, which is very hard to interpret for a human. This patch breaks the partitioning syntax into one line for the partitioning type, and one line per partition/subpartition.
Diffstat (limited to 'mysql-test/r/partition_mgm.result')
-rw-r--r--mysql-test/r/partition_mgm.result47
1 files changed, 45 insertions, 2 deletions
diff --git a/mysql-test/r/partition_mgm.result b/mysql-test/r/partition_mgm.result
index 9ef220028b3..465bddcb3fb 100644
--- a/mysql-test/r/partition_mgm.result
+++ b/mysql-test/r/partition_mgm.result
@@ -16,14 +16,18 @@ Table Create Table
t1 CREATE TABLE `t1` (
`f_date` date DEFAULT NULL,
`f_varchar` varchar(30) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) PARTITIONS 2 */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY HASH (YEAR(f_date))
+PARTITIONS 2 */
ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f_date` date DEFAULT NULL,
`f_varchar` varchar(30) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) PARTITIONS 1 */
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY HASH (YEAR(f_date))
+PARTITIONS 1 */
drop table t1;
create table t1 (a int)
partition by list (a)
@@ -36,3 +40,42 @@ alter table t1 REORGANIZE partition p1 INTO
(partition p11 values in (1,2),
partition p12 values in (3,4));
drop table t1;
+CREATE TABLE t1 (a INT)
+/*!50100 PARTITION BY HASH (a)
+/* Test
+of multi-line
+comment */
+PARTITIONS 5 */;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*/' at line 6
+CREATE TABLE t1 (a INT)
+/*!50100 PARTITION BY HASH (a)
+-- with a single line comment embedded
+PARTITIONS 5 */;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY HASH (a)
+PARTITIONS 5 */
+DROP TABLE t1;
+CREATE TABLE t1 (a INT)
+/*!50100 PARTITION BY HASH (a)
+PARTITIONS 5 */;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY HASH (a)
+PARTITIONS 5 */
+DROP TABLE t1;
+CREATE TABLE t1 (a INT) /*!50100 PARTITION BY HASH (a) PARTITIONS 5 */;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY HASH (a)
+PARTITIONS 5 */
+DROP TABLE t1;