Error getting when I want to debug a stored procedure

Discussion of open issues, suggestions and bugs regarding database management and administration tools for MySQL
Post Reply
aamir777
Posts: 3
Joined: Wed 02 Mar 2011 09:42
Location: Pakistan

Error getting when I want to debug a stored procedure

Post by aamir777 » Wed 02 Mar 2011 09:57

Hi

I am using dbForege Studio for MySQL v4.50.335, I have can debug Stored Procedures.

I am getting following error when I want to debug one proc:
PROCEDURE tmp_davart_ProcName already exists.

Can you please tell me how I can fix this issue.

Thanks

Alexz
Devart Team
Posts: 165
Joined: Wed 10 Aug 2005 08:30

Post by Alexz » Wed 02 Mar 2011 11:38

As you know, MySQL server doesn't allow altering procedure. So saving the procedure in dbForge Studio for MySQL was implemented by the following scheme:
* the temporary procedure 'tmp_devart_ProcName' with old text is created to have an opportunity to restore it if there are any problems.
* the old procedure is dropped
* the new procedure is created
* if the new procedure was succesfully created, the 'tmp_devart_ProcName' procedure is dropped.
* if creation of the new procedure fails, dbForge Studio will try to restore the old procedure with the help of 'tmp_devart_ProcName'.
* if restoring of the old procedure fails you will have an opportunity to restore it using the text from the 'tmp_devart_ProcName' procedure.

Does the error occur constantly or not?
If you don't need the 'tmp_devart_ProcName' procedure, you can drop it, and the problem will be solved.

aamir777
Posts: 3
Joined: Wed 02 Mar 2011 09:42
Location: Pakistan

Post by aamir777 » Wed 02 Mar 2011 13:43

To save the time I dropped all procedures from the database and redeployed and the problem was solved.

In normal practice I wrote procs as
DROP PROCEDURE IF EXISTS `ProcName`;
CREATE PROCEDURE `ProcName`(

and when I deployed the procs it seems that dbForge did not drop the procs and when I tried to debug the proc it gave me the error.

Anyhow thanks a lot for your reply.

Alexz
Devart Team
Posts: 165
Joined: Wed 10 Aug 2005 08:30

Post by Alexz » Thu 03 Mar 2011 13:06

We are glad to hear that the problem was solved.

As for debugging of procedure, you should debug the procedure in the stored procedure editor but not in the SQL document.
In this case you will have more features of procedure debugging, such as Watch, Call Stack, editing parameters, etc.

Post Reply