5

Is there a way to associate a time out to a query sent to the MySQL server?

Expected behavior

  • MySQL server would trigger a time out if the query did not complete after a time T provided by the caller
  • No result would be returned to the caller
  • An error would be triggered instead (and caught by the caller).

Didn't find this in the MySQL documentation.
However it seems relevant: in case some indexes are missing or for some other reason, a time out would prevent the server to collapse (some queries may take hours to complete and will get cumulated in the server stack).

1 Answer 1

3

Have a look at this link from stackoverflow. It may not meet all your requirements (stated above), but I think it will help.

If you specify which programming language you are using to connect to MySQL server, you may find a better way to do it.

1
  • Thanks. I guess if java can do it, it is possible in any language.
    – Déjà vu
    Nov 22, 2010 at 2:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .