Hi
Came across a fun ride today that I didn't want to get on....
Setup MySQL Partitioning as instructed here on 06/08/2014 (August) :
Works like a charm... except now I'm getting
"Error Code: 1493 VALUES LESS THAN value must be strictly increasing for each partition"
whenever my cronjob runs partition maintenance.
RTFM...
"If the interval is decreased, you will most likely get an error like this => "ERROR 1493 (HY000): VALUES LESS THAN value must be strictly increasing for each partition". My suggestion is to first delete all future partitions (outside the scope of this article) and then try and change the interval."
I tried this with no luck.
So I dug into the issue a bit more. Baring in mind this has been running :
CALL partition_maintenance(SCHEMA_NAME, 'history', 14, 24, 7);
CALL partition_maintenance(SCHEMA_NAME, 'history_log', 14, 24, 7);
CALL partition_maintenance(SCHEMA_NAME, 'history_str', 14, 24, 7);
CALL partition_maintenance(SCHEMA_NAME, 'history_text', 14, 24, 7);
CALL partition_maintenance(SCHEMA_NAME, 'history_uint', 14, 24, 7);
CALL partition_maintenance(SCHEMA_NAME, 'trends', 180, 24, 7);
CALL partition_maintenance(SCHEMA_NAME, 'trends_uint', 180, 24, 7);
without an issue since 06/08/2014 (August).
What I found was interesting. This :
SELECT partition_name, table_rows, PARTITION_ORDINAL_POSITION, PARTITION_METHOD
FROM information_schema.PARTITIONS
WHERE TABLE_SCHEMA = 'zabbix' AND TABLE_NAME = 'history'
http://pastebin.com/0G73Ry7B
show's that on the 06/10, for some reason, my UnixTimestamp fastforwarded an hour...
This mean's any new partitions that are trying to be provisioned fail as they their limit (value < clock ; where clock is the limit) is within the 1 hour range of the previous partition.
or
The partition is trys to create starts 1 hour before the previous partition finishs.
Great!
I found manual working around by manually calculating +23 hours or the last partition_description and use that as my new limit for new partitions but this code looks like a train wreck.
Anyone worked on this before or know how to get off this ride?
Something smells like daylight savings....
Came across a fun ride today that I didn't want to get on....
Setup MySQL Partitioning as instructed here on 06/08/2014 (August) :
Works like a charm... except now I'm getting
"Error Code: 1493 VALUES LESS THAN value must be strictly increasing for each partition"
whenever my cronjob runs partition maintenance.
RTFM...
"If the interval is decreased, you will most likely get an error like this => "ERROR 1493 (HY000): VALUES LESS THAN value must be strictly increasing for each partition". My suggestion is to first delete all future partitions (outside the scope of this article) and then try and change the interval."
I tried this with no luck.
So I dug into the issue a bit more. Baring in mind this has been running :
CALL partition_maintenance(SCHEMA_NAME, 'history', 14, 24, 7);
CALL partition_maintenance(SCHEMA_NAME, 'history_log', 14, 24, 7);
CALL partition_maintenance(SCHEMA_NAME, 'history_str', 14, 24, 7);
CALL partition_maintenance(SCHEMA_NAME, 'history_text', 14, 24, 7);
CALL partition_maintenance(SCHEMA_NAME, 'history_uint', 14, 24, 7);
CALL partition_maintenance(SCHEMA_NAME, 'trends', 180, 24, 7);
CALL partition_maintenance(SCHEMA_NAME, 'trends_uint', 180, 24, 7);
without an issue since 06/08/2014 (August).
What I found was interesting. This :
SELECT partition_name, table_rows, PARTITION_ORDINAL_POSITION, PARTITION_METHOD
FROM information_schema.PARTITIONS
WHERE TABLE_SCHEMA = 'zabbix' AND TABLE_NAME = 'history'
http://pastebin.com/0G73Ry7B
show's that on the 06/10, for some reason, my UnixTimestamp fastforwarded an hour...
This mean's any new partitions that are trying to be provisioned fail as they their limit (value < clock ; where clock is the limit) is within the 1 hour range of the previous partition.
or
The partition is trys to create starts 1 hour before the previous partition finishs.
Great!

I found manual working around by manually calculating +23 hours or the last partition_description and use that as my new limit for new partitions but this code looks like a train wreck.
Anyone worked on this before or know how to get off this ride?
Something smells like daylight savings....
Comment