MySQL Forums :: Partitioning :: Constant, random or timezone-dependent expressions in (sub)partitioning
Constant, random or timezone-dependent expressions in (sub)partitioning
Posted by: Carlo Rossetti
Date: September 18, 2011 02:39AM
i have this strange trouble.
MySQL VERSION: 5.5.15-LOG on window xp 32 bit.
CREATE TABLE `t_test` (
`marca_id` CHAR(5) NOT NULL DEFAULT '000'
) ENGINE=MYISAM DEFAULT CHARSET=utf8
INSERT INTO t_test
DROP FUNCTION IF EXISTS `IdToHash`;
FUNCTION `IdToHash`(stringid CHAR(6))
RETURNS INT DETERMINISTIC
RETURN CAST(stringid AS SIGNED);
this is all good, but when i add a partition:
ALTER TABLE t_test
PARTITION BY HASH(`IdToHash`(marca_id));
I obtain this error:
Query : ALTER TABLE t_test PARTITION BY HASH(`ru2a_daticase`.`IdToHash`(marca_id))
Error Code : 1064
Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed near ')
I don't understand this kind of error. Any idea?
Thank to everyone for your patience.
Edited 1 time(s). Last edit at 09/18/2011 03:23AM by Carlo Rossetti.
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.