Page 1 of 1

Error getting when I want to debug a stored procedure

Posted: Wed 02 Mar 2011 09:57
by aamir777
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

Posted: Wed 02 Mar 2011 11:38
by Alexz
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.

Posted: Wed 02 Mar 2011 13:43
by aamir777
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.

Posted: Thu 03 Mar 2011 13:06
by Alexz
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.