Ad Widget

Collapse

Trouble with Partitioning

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • matt68
    Junior Member
    • Apr 2020
    • 2

    #1

    Trouble with Partitioning

    I am trying to convert to partitioning since our server is now pulling roughly 700 vps. Housekeeper is barely keeping up, and I know I have more clients to add to the system soon. That being said, can anyone see why MySQL 5.7.34 would have a problem with the following code?
    (confirmed I am using zabbixdb and history_uint exist).


    ALTER TABLE `history_uint` PARTITION BY RANGE (clock)
    (PARTITION p2021_03_21 VALUES LESS THAN (UNIX_TIMESTAMP(“2021-03-22 00:00:00”)) ENGINE = InnoDB,
    PARTITION p2021_03_22 VALUES LESS THAN (UNIX_TIMESTAMP(“2021-03-23 00:00:00”)) ENGINE = InnoDB,
    ...(wasn't going to fill this with 60 lines)
    PARTITION p2021_06_28 VALUES LESS THAN (UNIX_TIMESTAMP(“2021-06-29 00:00:00”)) ENGINE = InnoDB,
    PARTITION p2021_06_29 VALUES LESS THAN (UNIX_TIMESTAMP(“2021-06-30 00:00:00”)) ENGINE = InnoDB,
    PARTITION p2021_06_30 VALUES LESS THAN (UNIX_TIMESTAMP(“2021-07-01 00:00:00”)) ENGINE = InnoDB)
    ;

    ERROR 1064 (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 ':00:00”)) ENGINE = InnoDB,
    PARTITION p2021_03_22 VALUES LESS THAN (UNIX_TIMEST' at line 2
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    #2
    Originally posted by matt68
    I am trying to convert to partitioning since our server is now pulling roughly 700 vps. Housekeeper is barely keeping up, and I know I have more clients to add to the system soon. That being said, can anyone see why MySQL 5.7.34 would have a problem with the following code?
    Hi, at least here in the forum the quotes in the TIMESTAMP calls look incorrect.

    Markku

    Comment

    Working...