SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: store procedure

  1. #1
    SitePoint Addict
    Join Date
    Dec 2009
    Posts
    301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    store procedure

    How do I debug a store procedure in MySQL ?

    I have a store procedure with 6 inputs. I want to debug this store proc .

    How do I do it ? Is there any tool available which could help me ?

    My SQL version: 5

  2. #2
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,169
    Mentioned
    153 Post(s)
    Tagged
    0 Thread(s)
    Not sure if you are willing to spend any money, but a google search produced this and it looks promising.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jul 2007
    Location
    San Sebastian, Spain
    Posts
    93
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    There are several ways of doing it as long as you are debugging in the development environment. You can enable the MySQL general query log which logs every SQL statement to a log file and you go through these. Alternatively create a table log_table (for logging text information) and within your stored procedure perform INSERT statements into this log_table with the stored procedure parameter values, also at various points within the flow control of the stored procedure perform other INSERT statements to show how it is behaving.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •