Step through mysql stored procedure - mysql

Is it possible to step through a mysql stored procedure, watching the values of variables at each step.

See this related question for some ideas related to debugging stored procedures:
How do you debug MySQL stored procedures?
Edit:
I tried out the trial of Debugger for MySQL and it looks promising. You might give that a try.

Related

How to call mysql stored procedure in kitura application

I need to call MySQL stored procedures in kitura application and use it for the query result. how can I do that
The use of Stored Procedures is not something that the current release of the SwiftKuery framework has support for.
If you feel that Stored Procedure support would be of benefit to the community then please feel free to raise an issue on SwiftKueryMySQL.

mysql equivalent of oracle utl_file

I'm starting on stored procedures with mySQL and need to convert some procedures created for Oracle Database 11gR2 using UTL_FILE package to generate execution logs.
Can anyone help me, telling me if there is any similar form in mySQL?
Grateful.
Well, after long hours of searching I conclude that there are internal constraints in mySQL for direct writing text files.
The contour that occurs to me is to write the log messages and debugging on a table in the database, and then save the relevant records in a text file.
Similarly, grateful to all who may have tried to help.

SQL Server: stored procedure saves with errors

I am using SQL Server 2008 and SSMS 2012. I have a stored procedure that references a table that does not exist. The editor displays red underlines on the offending table to indicate that something is wrong.
However when I execute the query, I get the message
Command(s) completed successfully.
This is extremely annoying. I also connected to the engine from another machine and it experienced the same problem, which implies its on the server, not ssms. Is there some kind of setting on the database that determines whether the database checks the syntax of stored procedures? PLEASE HELP!
Clarification:
I know that the syntax is wrong. The problem is that SSMS allows me to execute the CREATE or ALTER statement without error even when it references a table that does not exist. I want it to fail. Usually it does, but for some reason it suddenly stopped giving errors. I want it to give me errors. How do I do this?
Your syntax is fine and that is checked when you create the stored procedure. The existence of tables is however not checked until the stored procedure is compiled and that happens when the stored procedure is executed.
What's going on is that the IDE in the management studio hasn't had the schema model refreshed. Since the local instance of SSMS doesn't know the table exists, it throws a redline under the table name; when you actually run the sproc/query, the code sent to the database evaluates properly and runs.
To refresh the SSMS local data, try pressing Ctrl-Shift-R, as described here.
Edit:
You might want to look into Deferred Name Resolution
You will not get an error message when you CREATE or ALTER, but you can check your SPs for missing dependencies with a script afterwards.
Please check my answer to the related question here (I just post a link to avoid duplication):
I'm looking for a reliable way to verify T-SQL stored procedures. Anybody got one?

phpmysqladmin procedure comment

I'm using phpMySQLAdmin to create procedure with comments in it.
But phpmysqladmin strip away comment before it sends sql to server, I don't know how to get comment into my stored procedure using phpmysqladmin. Does anyone know?
What version of phpMyAdmin are you using? It appears this may be a bug in some versions. I would recommend you try a different client. Perhaps MySQL Workbench?

mySql stored procs encryption

I am looking into ways to encrypt mySQL stored procedure source code when installed in clients local environment.
I did lot of research on this topic and had no luck except for one promising reply from gazzang.com
Here is the reply from gazzang. Let me know if someone has already tried this out.
We should be able to encrypt the table where store procs and functions are stored - mysql.proc
Thus os users won't be able to read the contents of the sp or functions.
I can't remember which internal table views are stored in but the same some apply to them.
I am not sure we could come up with a solution to encrypt the routines internal to mysql.
Other databases that do this really implement "obfuscation" internally - I think PostgreSQL does that for example.
You cannot encrypt stored procedures in a really useful way, because MySQL server will have to decrypt it anyway when it reads stored procedure from it's tables. If you encrypt the table file, your customer will login as root and make dump on mysql.proc table using native MySQL statements. If you change root password, they will always have a way to start MySQL with --skip-grant-tables switch to overcome that.