prøv noget som dette:
CREATE PROCEDURE myProc(IN t1 timestamp, IN t2 timestamp)
BEGIN
WHILE t1 <= t2 DO
INSERT INTO test (ts) Values (t1) ;
SET t1 = DATE_ADD(t1, INTERVAL 3 MINUTE);
END WHILE;
END;
CALL myProc(now(), ADDDATE(NOW(), INTERVAL 15 MINUTE));
http://sqlfiddle.com/#!2/5672e/9
Eller skift din linje:
SET StartTS = StartTS + INTERVAL 3 MINUTE;
til
SET StartTS = ADDDATE(StartTS, INTERVAL 3 MINUTE);