cannot create a procedure with error [1064] [42000]
ERROR 1064 (42000): states that "You have an error in your SQL syntax".
Can you specify what is being executed as 'my code'. That is where SQL syntax appears to be going wrong.
Make sure you are within the right database before calling your procedure.

eg: USE dbname;