Can't view contents of stored procedure
Can't view contents of stored procedure
Whenever I try to open any of the stored procedures defined by one particular user for editing, I get the following error message:
Cannot obtain the SQL code for an object '[ProcedureName]'. Probably, you do not have enough privileges to get object metadata.
This happens no matter what user I'm connected as, including the procedure definer and the root user.
Any thoughts?
Cannot obtain the SQL code for an object '[ProcedureName]'. Probably, you do not have enough privileges to get object metadata.
This happens no matter what user I'm connected as, including the procedure definer and the root user.
Any thoughts?
Hello.
Could you please perform some tests?
Execute the following queries in dbForge Studio for MySql and send us the result. Substitute your_database_name, your_procedure_name before execute.
SHOW CREATE PROCEDURE your_database.your_procedure_name;
SELECT
*
FROM
mysql.proc
WHERE
`name` = 'your_procedure_name';
SELECT
*
FROM
information_schema.routines
WHERE
ROUTINE_NAME = 'your_procedure_name';
Could you please perform some tests?
Execute the following queries in dbForge Studio for MySql and send us the result. Substitute your_database_name, your_procedure_name before execute.
SHOW CREATE PROCEDURE your_database.your_procedure_name;
SELECT
*
FROM
mysql.proc
WHERE
`name` = 'your_procedure_name';
SELECT
*
FROM
information_schema.routines
WHERE
ROUTINE_NAME = 'your_procedure_name';
I've figured out how to recreate this problem, and from what I can tell it seems to occur when a procedure has multiple "ALTER TABLE" commands in it. Here are the steps to recreate the error:
(note: I'm using version 3.50.275)
After closing the editor window, the procedure shows up in the database explorer, you can execute it, and it shows up if you do "SHOW CREATE PROCEDURE test.procedure1". However, when you try to open it for editing, you get the same error message.
(note: I'm using version 3.50.275)
- 1. Create a new stored procedure.
2. Paste the following code in the body of the procedure:3. Click 'Compile'. It will compile properly; if you close the editor window you will be able to re-open and edit the procedure.Code: Select all
ALTER TABLE test.t1 ADD COLUMN col3 INT;
4. Add a second "ALTER TABLE" statement to the body of the procedure:5. Click compile.Code: Select all
ALTER TABLE test.t1 ADD COLUMN col3 INT; ALTER TABLE test.t1 ADD COLUMN col4 INT;
Cannot obtain the SQL code for an object 'procedure1'. Probably, you do not have enough privileges to get object metadata.
After closing the editor window, the procedure shows up in the database explorer, you can execute it, and it shows up if you do "SHOW CREATE PROCEDURE test.procedure1". However, when you try to open it for editing, you get the same error message.
Hi again,
Thanks for dealing with my bug report so quickly. However, I don't know if the issue is fully resolved yet.
I installed 3.50.305, and it works properly with the simple example I posted before. However, when I try to open one of the stored procedures that was originally giving me problems, I get a different error message:
Thanks for dealing with my bug report so quickly. However, I don't know if the issue is fully resolved yet.
I installed 3.50.305, and it works properly with the simple example I posted before. However, when I try to open one of the stored procedures that was originally giving me problems, I get a different error message:
It asks if I want to submit an error report, which I just did.dbForge Studio for MySQL has encountered an unexpected error.
Hello,
We have recieved the error report. Sorry for inconvenience. After fixing your request we performed some tests but did not find any other problems. We decided to raise an error report insted of message box in case of parse error to simplify feedback.
Could you send us a procedure sample to reproduce the bug please? You can paste it to the error report.
We have recieved the error report. Sorry for inconvenience. After fixing your request we performed some tests but did not find any other problems. We decided to raise an error report insted of message box in case of parse error to simplify feedback.
Could you send us a procedure sample to reproduce the bug please? You can paste it to the error report.