forums › forums › SQLyog › SQLyog: Bugs / Feature Requests › Delimiter Issue
- This topic is empty.
-
AuthorPosts
-
-
September 6, 2006 at 2:31 am #9841IgorMember
When creating stored procedures using SqlYog – it puts delimiter as:
DELIMITER $$;
CREATE ….
other stored proc code
DELIMITER ;$$
If you save this proc in a file and then run saved file through command line or MySQL Query Browser Tool – it'll give you an error.
Changing code to:
DELIMITER $$
CREATE ….
other stored proc code
DELIMITER ;
Solves the issue, but now it won't work under SqlYog! So even if we change it in all files – we'd have to manually change it inside SQLYog for it to compile and then change it back before checking it into CVS. As you see – this is very inconvenient.
So there must be something non standard going on in SQLYog here. I was looking for an option to change this, but I couldn't find any options on this one in SQLYog.
Can you please help / advise?
Regards.
Igor.
-
September 6, 2006 at 2:40 am #22282peterlaursenParticipant
Starting from SQLyog 5.17 we do use the same DELIMITER format as the programs from MySQL AB.
Please refer to: http://webyog.com/faq/33_7_en.html
What is the version you are using?
But this:
Quote:So there must be something non standard going on in SQLYog here... is not true. there is NO STANDARD for the DELIMITER syntax at all! The DELIMITER statement is NOT an SQL statement and it is not sent to the server! It is implemented in the client only. The purpose of the DELIMITER statement is that is shall be possible to distinguish whether a ';' (semicolon) seperates SQL-statements or not. It would be fairly possible for a graphical client to use coloring, indentation, or different fonts or whatever for this!
But we did – after multiple requests – adopt the syntax from MySQL AB in SQLyog 5.17!
-
September 6, 2006 at 2:58 am #22283IgorMemberpeterlaursen wrote on Sep 5 2006, 07:40 PM:Starting from SQLyog 5.17 we do use the same DELIMITER format as the programs from MySQL AB.
Please refer to: http://webyog.com/faq/33_7_en.html
What is the version you are using?
But this:
.. is not true. there is NO STANDARD for the DELIMITER syntax at all! The DELIMITER statement is NOT an SQL statement and it is not sent to the server! It is implemented in the client only. The purpose of the DELIMITER statement is that is shall be possible to distinguish whether a ';' (semicolon) seperates SQL-statements or not. It would be fairly possible for a graphical client to use coloring, indentation, or different fonts or whatever for this!
But we did – after multiple requests – adopt the syntax from MySQL AB in SQLyog 5.17!
Great, thanks!
Yes, I was using 5.15. I'll certainly download the latest.
I understand that DELIMITER is not a server side command, in fact, hopefully we won't need it soon in MySQL at all, as the parser should get smart enough to not need it. Oracle doesn't use it, SQL Server doesn't use it and they somehow know how to destinguish statements within stored proc vs. ones outside…
Anyway, I am glad you did this as otherwise automatic file deployments through the command line (and this is coming directly from AB, so nothing we can do about this one! :o) ) would be tricky (I was planning on parsing it out before deployment and just have DELIMITERs before and after the whole block of sps, but here you made my life easier, so thanks again!).
Best.
Igor.
-
-
AuthorPosts
- You must be logged in to reply to this topic.