forums › forums › SQLyog › SQLyog: Bugs / Feature Requests › Block Comments /*….*/ Don't Work In 'restore From Sql Dump&#
- This topic is empty.
-
AuthorPosts
-
-
August 15, 2007 at 9:56 pm #10485SimeonMember
6.05 community on XP SP2. MySQL5.0.26
Create a SP like this: (Note: Definer, db name, and drop clauses removed for compatibilty)
DELIMITER $$
CREATE PROCEDURE `testSP`()
BEGIN
/* Here's a block comment
Created 20070816 by Simeon
This SP is being used to demonstrate standard block comments in the SQL Dump / Restore context
– Currently they don't work because the Asterisk, forward slash combination
is used as a delimiter in the restore process. The editor can work around this??
*/
SELECT 'Hello' greeting;
END$$
DELIMITER ;
Now right click on the database name in the object explorer, and “Backup database as SQL Dump”
Right click again on the database name, and “Restore from SQL dump”
You will see an error generated like this:
Query:
/*!50003 CREATE DEFINER=`xxx`@“ PROCEDURE `testSP`()
BEGIN
/* Here's a block comment
Created 20070816 by Simeon
This SP is being used to demonstrate block comments in the SQL Dump / Restore context
– Currently they don't work because the Asterisk, forward slash combination
is used as a delimiter in the restore process. The editor can work around this??
Error occured at:2007-08-16 09:45:31
Line no.:83
Error Code: 1064 – 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 '' at line 3
If you open the SQL Dump file in the SQLYog editor, then [Ctrl+a],[Shift=F5] the script will run with no error.
-
August 16, 2007 at 8:35 am #24684peterlaursenParticipant
The error is confirmed on MySQL 5.0.45
Could you explain “Currently they don't work because the Asterisk, forward slash combination
is used as a delimiter in the restore proces” ??
Now as we can execute this from the editor we also should when executing an external script. I think it might be an issue with 'multiline' comments.
We will have to find out now!
-
August 16, 2007 at 8:44 am #24685peterlaursenParticipant
the issue is that the SP itself is enclosed in 'version dependent conditional comments' in the DUMP file like
/*!50003 CREATE DEFINER=`root`@`localhost` PROCEDURE `testSP`()
BEGIN
/* comment */
SELECT 'Hello' greeting;
END */
And this we do not handle correctly in case of external file execution!
This will be fixed of course!
-
August 17, 2007 at 12:57 pm #24686peterlaursenParticipant
Please verify the fix for this with
Enterprise (registered): http://www.webyog.com/downloads/betas/not_…QLyog606Ent.exe
Enterprise (trial): : http://www.webyog.com/downloads/betas/not_…606EntTrial.exe
Community: http://www.webyog.com/downloads/betas/not_…d/SQLyog606.exe
-
August 19, 2007 at 11:13 pm #24687SimeonMember
😀
peterlaursen wrote on Aug 18 2007, 12:57 AM:Please verify the fix for this withEnterprise (registered): http://www.webyog.com/downloads/betas/not_…QLyog606Ent.exe
Enterprise (trial): http://www.webyog.com/downloads/betas/not_…606EntTrial.exe
Community: http://www.webyog.com/downloads/betas/not_…d/SQLyog606.exe
Yes, this has fixed the problem outlined here, and also the issue raised in “Restore From Sql Dump 'glitch' For Stored Procedure”
Thanks for your prompt fix – this has already made life much easier!
-
-
AuthorPosts
- You must be logged in to reply to this topic.