Results 1 to 3 of 3

Thread: MySQL stored procedures not allowed??

  1. #1
    Guest

    Default MySQL stored procedures not allowed??

    I created my account assuming that stored procedures would be supported. If you have no plans to support stored procedures any time soon, you can go ahead and delete my account.

  2. #2
    dreadnaut's Avatar
    dreadnaut is offline Super Moderator
    Join Date
    Feb 2010
    Posts
    1

    Default

    Stored procedures are rarely allowed on shared hosting, because badly written ones can cause problems to the server. And in any case, they were bad practice ten years ago, and they are not better now: mixing logic with data and spreading logic between the codebase and the database is only going to bring you headaches.

    If you still wanto to delete your account, go ahead.

  3. #3
    Guest

    Default

    Thanks for the reply. But how can using a stored procedure be "bad practice" if it's the only (efficient) way to accomplish an objective? A user defined function can be used in a select statement: select fieldA, fieldB, myFunction1(fieldA,fieldB) from... where myFunction2(fieldA,fieldB). Now assume that the select statement is being built on the front-end based on user input. As far as I know, there's no practical way to implement the same functionality without using the udf's. (And I need that functionality in the app I want to install.)

    As for the risk of badly written procedures, I see the problem. But doesn't the server have some kind of time out mechanism for queries? I don't know, I'm just asking. If it's possible, might it not be better to allow stored procedures with very strict limits rather than excluding them altogether?

Posting Permissions

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

SEO by vBSEO