I am getting error: Error Code: 1064. Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
What is the reason? and How do I get rid of this error?
CREATE TABLE TB_TEST_HIST(
TEST_ID INT AUTO_INCREMENT,
START_TIME DATETIME,
END_TIME DATETIME,
PRIMARY KEY(TEST_ID)
)ENGINE=INNODB PARTITION BY RANGE (START_TIME) (
PARTITION TEST_HIST_P0 VALUES LESS THAN
(ADDTIME(DATE_FORMAT(LAST_DAY(SYSDATE()) ,'%Y-%m-%d %00:00:00'), '1
0:0:0.000000')),
PARTITION TEST_HIST_P1 VALUES LESS THAN (
ADDTIME(DATE_FORMAT(LAST_DAY(SYSDATE()) ,'%Y-%m-%d %00:00:00'), '2
0:0:0.000000'))
);