Reputation: 732
I have a stored procedure that determines and sets the next minute to review by getting the last reviewed timestamp and then determining what the lowest timestamp is after that.
The thing that bothers me about this is that while it works perfectly (so far), but MySQL workbench claims that I have 2 syntax errors:
CREATE DEFINER=`forex`@`%` PROCEDURE `set_next_minute`()
BEGIN
SET @next_minute = (
SELECT FLOOR(timestamp/60000) * 60
FROM tick
WHERE timestamp > (
(SELECT value
FROM setting
WHERE name = 'next_minute')
+ 60) * 1000
ORDER BY timestamp
LIMIT 1);
UPDATE setting
SET value = @next_minute
WHERE name = 'next_minute';
END
WHERE name = 'next_minute')
missing 'closing parenthesis'+ 60) * 1000
missing 'semicolon'Upvotes: 0
Views: 297
Reputation: 53335
The funnier of these is that it says for the closing parenthesis it expects a closing parenthesis :-).
This is certainly a parser error and needs to be addressed. Can you file a bug report at http://bugs.mysql.com?
Upvotes: 1