SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
[7.0.132 beta] Database Explorer - Edit glitch

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
[7.0.132 beta] Database Explorer - Edit glitch
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 2102

Post [7.0.132 beta] Database Explorer - Edit glitch Reply with quote
Tried the following in Toad for MySQL 6.3.0.642 (though I'm not sure it's related). Selecting Edit function on a function in Database Explorer retrieved the drop-create code for the function but it seems somehow incomplete when it comes to being able to run the script.

Code:

DROP FUNCTION [mydb].[myfunction]
$$$

CREATE DEFINER='whoever'@'wherever' FUNCTION `mydb`.`myfunction` (
   xk DECIMAL(16,4), xk_1 DECIMAL(16,4), yk DECIMAL(16,4), yk_1 DECIMAL(16,4), xcsill DECIMAL(16,4)
)
   RETURNS decimal(16,4)
   CONTAINS SQL
   SQL SECURITY DEFINER
BEGIN
   DECLARE ycsill DECIMAL(16,4);

   SET ycsill = yk_1 + (xcsill - xk_1) / (xk - xk_1) * (yk - yk_1) ;
   
   RETURN ycsill;
END


It looks like the Edit routine did not do a decent job here, because while the DDL was fetched properly, both setting and resetting the DELIMITER command before and after the relevant parts and the delimiter itself at the end of the code are missing. It also produces the same incomplete structure for procedures as well, and for views too, which is not necessary anyway, as they can be dropped and created using the default ';' as delimiter.
Wed Jul 02, 2014 3:07 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2102

Post [7.0.132 beta] Database Explorer - Edit glitch 2 Reply with quote
Also, the new tab spawned by selecting Edit function/procedure/view does not retain the filter set in its parent Database Explorer which it should, imho. If that was intentional then consider this as a feature request (or at least make it optional).
Wed Jul 02, 2014 3:16 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7839

Post Reply with quote
Thank you. I have logged both issues. In the first issue, it looks like it's missing $$$ after the CREATE statement.
Wed Jul 02, 2014 7:46 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2102

Post Reply with quote
SysOp wrote:
In the first issue, it looks like it's missing $$$ after the CREATE statement.

Definitely. And "DELIMITER $$$" at the beginning of the script and "DELIMITER ;" at its end as well. Otherwise it seems to be complaining about not understanding what "$$$" is.
Wed Jul 02, 2014 7:49 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.