Run sql-files with `CREATE FUNCTION`-statements
Hi,
I try to run a sql-file with phpstorm (could be done with any other JB-IDE) that contains functions and views. While the views are droped and created without any problems, the functions won't run. I tried a number of things so far. The point is, that the IDE seems to ignore the DELIMITER-statement. So before I start a new bug-report, it would be nice to know, if anyone had this problem before and was able to solve it. Here is an simplified example code:
DELIMITER // CREATE DEFINER=root@localhost FUNCTION testfunc(arg_a INT, arg_b INT) RETURNS int(11) NO SQL SQL SECURITY INVOKER BEGIN RETURN a + b; END// DELIMITER ;
DBMS is MySQL. I tried `//`, `|` and `?` as a delimiter...
PS 127.100
Please sign in to leave a comment.
It seems my problem are missing `` around definier and function-name. If I wrap everything in proper `` the IDE runs the file correctly!
Thanks for reporting. The DEFINER clause parsing is fixed.