forced capitalization when saving a procedure

Discussion of open issues, suggestions and bugs regarding database management and administration tools for MySQL
Post Reply
trothman
Posts: 4
Joined: Mon 01 Sep 2008 12:13

forced capitalization when saving a procedure

Post by trothman » Mon 01 Sep 2008 12:23

I had to backup my DB including the stored procedures. When I loaded it into my production server the following issue occured:

Certain lowercase words were forced to uppercase by the dbForge save routine. Now I have to filter through all 200 procedures and figure out which ones were affected. Is there a save option that will not automatically force to upper case? Debugging this is a real pain and since it is a large app, I could miss some until my customers notify me :(

Here is an example: (the bold is the forced word that becomes uppercase)

BEGIN
SELECT
price, value
FROM
attribute_value
WHERE
attribute_value_id = inAttributeValueId;
END

So "value" is assumed to be a constant rather than a name of a field

Elias
Devart Team
Posts: 73
Joined: Tue 29 May 2007 14:02

Post by Elias » Mon 01 Sep 2008 12:53

Hello,

Give us detailed steps to reproduce the problem please. Do you work in procedure editor and some words are capitalized on save action?

trothman
Posts: 4
Joined: Mon 01 Sep 2008 12:13

Post by trothman » Mon 01 Sep 2008 13:19

Hi Elias,

I have a stored procedure that looks like this: (it does not change when I manipulate the procedure by saving or executing from within the ide)

CREATE DEFINER = 'root'@'localhost'
PROCEDURE sbmunchies.shopping_cart_get_attribute_value(IN inAttributeValueId INT )
BEGIN
SELECT price, value
FROM attribute_value
WHERE attribute_value_id = inAttributeValueId;
END




If I select Database -> Schema Export
and then select the "Structure and Data" option
then select the procedure as well as the table associated with the procedure to backup them up in the same file
then I continue to the options screen
I used the default options and clicked export the following is the procedure portion saved to file (note: to save space in this post I did not copy the table info as it is saved without error):


-- Definition for procedure shopping_cart_get_attribute_value
--
CREATE DEFINER = 'root' @'localhost'
PROCEDURE shopping_cart_get_attribute_value(IN inAttributeValueId INT)
BEGIN
SELECT
price, VALUE
FROM
attribute_value
WHERE
attribute_value_id = inAttributeValueId;
END
$$

DELIMITER ;



Notice how "value" has been forced to uppercase when it should remain lowercase

This is one example of many. i did a simplified save but the same results occur when I save all procedures.

I only saved a table so I can reproduce my steps to save both "Structure and Data" but in this context it was not necessary.

Let me know if this helps.

Thank you for the quick reply

Todd

Elias
Devart Team
Posts: 73
Joined: Tue 29 May 2007 14:02

Post by Elias » Mon 01 Sep 2008 13:28

Now we reproduced the problem. We'll inform when it will be fixed.

Elias
Devart Team
Posts: 73
Joined: Tue 29 May 2007 14:02

Post by Elias » Mon 01 Sep 2008 14:14

We have fixed the problem. The fix will be available in the next build
(we expect it today or tommorow). And you'll be able to reformat
your stored procedures by Sql Formatter wizzard, or by Format Document command, to fix word capitalization.
Last edited by Elias on Tue 02 Sep 2008 08:21, edited 1 time in total.

trothman
Posts: 4
Joined: Mon 01 Sep 2008 12:13

Post by trothman » Mon 01 Sep 2008 22:35

Thank you for the quick reply. This means a lot to me. technical support is the #1 factor for a products success (which I am sure you are already aware)

Best Wishes,

Todd

trothman
Posts: 4
Joined: Mon 01 Sep 2008 12:13

Post by trothman » Wed 03 Sep 2008 13:05

Hi,

I was just wondering if I should download and reinstall the latest version for the fix discussed in this thread.

Thanks,

Todd

Elias
Devart Team
Posts: 73
Joined: Tue 29 May 2007 14:02

Post by Elias » Thu 04 Sep 2008 15:30

Hi, Todd!

We will inform you about the new build. If you have to backup you
database now, you can disable procedure formatting in Generate DDL Wizard, by unchecking 'Format the text of source objects' option on the
General tab of the 'DDL generation options' page.

Elias
Devart Team
Posts: 73
Joined: Tue 29 May 2007 14:02

Post by Elias » Mon 08 Sep 2008 09:52

Hi Todd. The new build is available.

Post Reply