use a different calculation to determine initial partition

remotes/svn/2.7
Richard Fuchs 13 years ago
parent 65a6c2c90f
commit f0cc0a0246

@ -1,6 +1,6 @@
use sipstats;
alter table statistics remove partitioning;
set @stm = concat('alter table statistics partition by range (floor(timestamp)) (partition p_old values less than (', unix_timestamp() + 600, '))');
set @stm = concat('alter table statistics partition by range (floor(timestamp)) (partition p_old values less than (', coalesce((select floor(max(timestamp)) from statistics), 0) + 600, '))');
prepare st from @stm;
execute st;
deallocate prepare st;

Loading…
Cancel
Save