Hi All,
I’m trying to create the following table:
CREATE TABLE webgram (
A varchar(250) COLLATE utf8_unicode_ci NOT NULL,
B varchar(250) COLLATE utf8_unicode_ci NOT NULL,
KEY keyA (A)
)
ENGINE=MyISAM
DEFAULT CHARSET=utf8
COLLATE=utf8_unicode_ci
PARTITION BY RANGE(ORD(A))
(
PARTITION p0 VALUES LESS THAN(30),
PARTITION p1 VALUES LESS THAN(31),
PARTITION p2 VALUES LESS THAN(32),
PARTITION p3 VALUES LESS THAN(33),
PARTITION p4 VALUES LESS THAN(34),
PARTITION p5 VALUES LESS THAN MAXVALUE
)
I’m getting the following error message:
ERROR 1552 (HY000): This partition function is not allowed
Witch is related to the ORD function, witch is not allowed???
But I’ve checked the MySQL 5.1 manual for limitations:
(See:
http://dev.mysql.com/doc/refman/5.1/en/partitioning-limitations.html)
“ Beginning with MySQL 5.1.12, only the following MySQL functions are specfically supported in partitioning expressions:
ORD()
“
Since ORD returns an integer based on the leftmost characters of the varchar field I think it should be allowed in RANGE partitioning.
I´m using MySQL-server-5.1.14-0.glibc23
Any help?