Using Ver 14.12 Distrib 5.0.45
(I know it's old),
file:storedprocedure.sql
contains:
DELIMITER //
CREATE PROCEDURE loadDashboard
(
IN limitStr int(11)
)
BEGIN
SELECT table123.ID
FROM table123
ORDER BY date_lastmodified LIMIT limitStr;
END //
DELIMITER ;
I've tried both executing this command-line with:
mysql -u root -p -h localhost DB < storedprocedure.sql
and from within
mysql -u root -p -h localhost DB
mysql> *copied the code in from storedprocedure.sql
The error I get is: 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 'limitStr
However, another question on StackOverflow uses this exact syntax and it worked for everyone else?