forums › forums › SQLyog › SQLyog: Bugs / Feature Requests › Sqlyog Adding 'use' Commands To Procedures
- This topic is empty.
-
AuthorPosts
-
-
November 11, 2009 at 3:44 pm #11749JosephineJMember
Hi,
Does anyone know how to stop SQLyog adding 'USE' commands to all my procedures and functions? :huh:
I'm writing them to be used on multiple schema with the same structure so they should simply use the current schema. I keep removing these 'USE' commands but if I miss one, it could cause problems.
Thanks,
Jo
-
November 11, 2009 at 4:02 pm #29996peterlaursenParticipant
When you create a SP you will do from the menu or Object Browser context menu. When I do, this template occurs:
Code:DELIMITER $$CREATE
/*[DEFINER = { user | CURRENT_USER }]*/
PROCEDURE `visifire_faq`.`blah`()
/*LANGUAGE SQL
| [NOT] DETERMINISTIC
| { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }
| SQL SECURITY { DEFINER | INVOKER }
| COMMENT 'string'*/
BEGINEND$$
DELIMITER;
There is no USE statement I can see. What program version are you using? Maybe we did with earlier versions though.
If I did not understand the problem, please detail.
-
November 11, 2009 at 4:10 pm #29997JosephineJMemberpeterlaursen wrote on Nov 11 2009, 04:02 PM:When you create a SP you will do from the menu or Object Browser context menu. When I do, this template occurs:
There is no USE statement I can see. What program version are you using? Maybe we did with earlier versions though.
If I did not understand the problem please detail.
I get the same, but when I hit F9 to execute, close the procedure and then reopen it, the USE statement is there.
BTW I'm using version 8.16.
Edit: I've just checked and every time I reopen a stored procedure, the USE command has reappeared. 🙁
-
November 11, 2009 at 4:17 pm #29998peterlaursenParticipant
OK .. ALTER produces this
Code:DELIMITER $$USE `test`$$
DROP PROCEDURE IF EXISTS `blah`$$
CREATE DEFINER=`root`@`localhost` PROCEDURE `blah`()
BEGIN
SELECT 7;
END$$DELIMITER;
I think it would be dangerous to remove that USE. Some people could get a very big surprise should they select another database after opening the template. Is it a big problem to remove that line? Also the templates are compiled in and cannot be edited by user.
-
November 12, 2009 at 1:57 pm #29999JosephineJMember
It's not a big problem. More of an annoyance as I find that it makes it harder for me to keep track of where I'm putting these procedures.
It would be nice if I could change it but it's not a showstopper.
Thanks,
Jo
-
-
AuthorPosts
- You must be logged in to reply to this topic.