mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-5909 MySQL BUG#11748924 PARTITIONS: TOO-LONG COMMENT CAUSES NO WARNING
This commit is contained in:
@ -1764,3 +1764,99 @@ PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY LIST (a)
|
||||
SUBPARTITION BY HASH (a) SUBPARTITIONS 2
|
||||
(PARTITION p1 VALUES IN (1) COMMENT "Comment in p1"
|
||||
(SUBPARTITION p1spFirst COMMENT "SubPartition comment in p1spFirst",
|
||||
SUBPARTITION p1spSecond COMMENT "SubPartition comment in p1spSecond"),
|
||||
PARTITION p2 VALUES IN (2) COMMENT "Comment in p2"
|
||||
(SUBPARTITION p2spFirst COMMENT "SubPartition comment in p2spFirst",
|
||||
SUBPARTITION p2spSecond COMMENT "SubPartition comment in p2spSecond"));
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY LIST (a)
|
||||
SUBPARTITION BY HASH (a)
|
||||
(PARTITION p1 VALUES IN (1)
|
||||
(SUBPARTITION p1spFirst COMMENT = 'SubPartition comment in p1spFirst' ENGINE = MyISAM,
|
||||
SUBPARTITION p1spSecond COMMENT = 'SubPartition comment in p1spSecond' ENGINE = MyISAM),
|
||||
PARTITION p2 VALUES IN (2)
|
||||
(SUBPARTITION p2spFirst COMMENT = 'SubPartition comment in p2spFirst' ENGINE = MyISAM,
|
||||
SUBPARTITION p2spSecond COMMENT = 'SubPartition comment in p2spSecond' ENGINE = MyISAM)) */
|
||||
SELECT PARTITION_NAME, SUBPARTITION_NAME, PARTITION_COMMENT FROM INFORMATION_SCHEMA.PARTITIONS
|
||||
WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test';
|
||||
PARTITION_NAME SUBPARTITION_NAME PARTITION_COMMENT
|
||||
p1 p1spFirst SubPartition comment in p1spFirst
|
||||
p1 p1spSecond SubPartition comment in p1spSecond
|
||||
p2 p2spFirst SubPartition comment in p2spFirst
|
||||
p2 p2spSecond SubPartition comment in p2spSecond
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a INT)
|
||||
PARTITION BY LIST (a)
|
||||
SUBPARTITION BY HASH (a) SUBPARTITIONS 2
|
||||
(PARTITION p1 VALUES IN (1)
|
||||
(SUBPARTITION p1spFirst COMMENT "SubPartition comment in p1spFirst",
|
||||
SUBPARTITION p1spSecond),
|
||||
PARTITION p2 VALUES IN (2) COMMENT "Comment in p2"
|
||||
(SUBPARTITION p2spFirst,
|
||||
SUBPARTITION p2spSecond COMMENT "SubPartition comment in p2spSecond"));
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY LIST (a)
|
||||
SUBPARTITION BY HASH (a)
|
||||
(PARTITION p1 VALUES IN (1)
|
||||
(SUBPARTITION p1spFirst COMMENT = 'SubPartition comment in p1spFirst' ENGINE = MyISAM,
|
||||
SUBPARTITION p1spSecond ENGINE = MyISAM),
|
||||
PARTITION p2 VALUES IN (2)
|
||||
(SUBPARTITION p2spFirst COMMENT = 'Comment in p2' ENGINE = MyISAM,
|
||||
SUBPARTITION p2spSecond COMMENT = 'SubPartition comment in p2spSecond' ENGINE = MyISAM)) */
|
||||
SELECT PARTITION_NAME, SUBPARTITION_NAME, PARTITION_COMMENT FROM INFORMATION_SCHEMA.PARTITIONS
|
||||
WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test';
|
||||
PARTITION_NAME SUBPARTITION_NAME PARTITION_COMMENT
|
||||
p1 p1spFirst SubPartition comment in p1spFirst
|
||||
p1 p1spSecond
|
||||
p2 p2spFirst Comment in p2
|
||||
p2 p2spSecond SubPartition comment in p2spSecond
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1
|
||||
(a INT ,
|
||||
KEY inx_a (a) )
|
||||
PARTITION BY RANGE (a)
|
||||
SUBPARTITION BY HASH (a) SUBPARTITIONS 2
|
||||
(PARTITION pUpTo10 VALUES LESS THAN (10) COMMENT
|
||||
"This is a long comment (2050 ascii characters) 50 pUpTo10 partition ......80-!.................. 100 ................................................................................................ 200....................................................................................................................................................................................................................................................................................................... 500 ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 1000 ..............1024-|.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 1500 .............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. 2000 ......................................2048-|++"
|
||||
(SUBPARTITION `p-10sp0` ,SUBPARTITION `p-10sp1` ),
|
||||
PARTITION pMax VALUES LESS THAN MAXVALUE COMMENT
|
||||
"This is a long comment (2050 ascii characters) 50 pMax partition comment .80-!.................. 100 ................................................................................................ 200....................................................................................................................................................................................................................................................................................................... 500 ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 1000 ..............1024-|.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 1500 .............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. 2000 ......................................2048-|++"
|
||||
(SUBPARTITION `pMaxsp0` ,SUBPARTITION `pMaxsp1` ));
|
||||
Warnings:
|
||||
Warning 1793 Comment for table partition 'pUpTo10' is too long (max = 1024)
|
||||
Warning 1793 Comment for table partition 'pMax' is too long (max = 1024)
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
KEY `inx_a` (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY RANGE (a)
|
||||
SUBPARTITION BY HASH (a)
|
||||
(PARTITION pUpTo10 VALUES LESS THAN (10)
|
||||
(SUBPARTITION `p-10sp0` COMMENT = 'This is a long comment (2050 ascii characters) 50 pUpTo10 partition ......80-!.................. 100 ................................................................................................ 200....................................................................................................................................................................................................................................................................................................... 500 ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 1000 ..............1024-|' ENGINE = MyISAM,
|
||||
SUBPARTITION `p-10sp1` COMMENT = 'This is a long comment (2050 ascii characters) 50 pUpTo10 partition ......80-!.................. 100 ................................................................................................ 200....................................................................................................................................................................................................................................................................................................... 500 ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 1000 ..............1024-|' ENGINE = MyISAM),
|
||||
PARTITION pMax VALUES LESS THAN MAXVALUE
|
||||
(SUBPARTITION pMaxsp0 COMMENT = 'This is a long comment (2050 ascii characters) 50 pMax partition comment .80-!.................. 100 ................................................................................................ 200....................................................................................................................................................................................................................................................................................................... 500 ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 1000 ..............1024-|' ENGINE = MyISAM,
|
||||
SUBPARTITION pMaxsp1 COMMENT = 'This is a long comment (2050 ascii characters) 50 pMax partition comment .80-!.................. 100 ................................................................................................ 200....................................................................................................................................................................................................................................................................................................... 500 ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 1000 ..............1024-|' ENGINE = MyISAM)) */
|
||||
SELECT PARTITION_NAME, SUBPARTITION_NAME, PARTITION_COMMENT FROM INFORMATION_SCHEMA.PARTITIONS
|
||||
WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test';
|
||||
PARTITION_NAME SUBPARTITION_NAME PARTITION_COMMENT
|
||||
pUpTo10 p-10sp0 This is a long comment (2050 ascii characters) 50 pUpTo10 partition ......80-!
|
||||
pUpTo10 p-10sp1 This is a long comment (2050 ascii characters) 50 pUpTo10 partition ......80-!
|
||||
pMax pMaxsp0 This is a long comment (2050 ascii characters) 50 pMax partition comment .80-!
|
||||
pMax pMaxsp1 This is a long comment (2050 ascii characters) 50 pMax partition comment .80-!
|
||||
DROP TABLE t1;
|
||||
|
Reference in New Issue
Block a user